Merge pull request #4651 from filecoin-project/feat/prep-for-gasb

Prep for gas balancing
This commit is contained in:
Łukasz Magiera 2020-10-30 20:18:03 +01:00 committed by GitHub
commit f380d6be43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -126,6 +126,7 @@ var prices = map[abi.ChainEpoch]Pricelist{
scale: 85639,
},
},
verifyPostDiscount: true,
verifyConsensusFault: 495422,
},
}

View File

@ -90,6 +90,7 @@ type pricelistV0 struct {
computeUnsealedSectorCidBase int64
verifySealBase int64
verifyPostLookup map[abi.RegisteredPoStProof]scalingCost
verifyPostDiscount bool
verifyConsensusFault int64
}
@ -201,7 +202,9 @@ func (pl *pricelistV0) OnVerifyPost(info proof2.WindowPoStVerifyInfo) GasCharge
}
gasUsed := cost.flat + int64(len(info.ChallengedSectors))*cost.scale
if pl.verifyPostDiscount {
gasUsed /= 2 // XXX: this is an artificial discount
}
return newGasCharge("OnVerifyPost", gasUsed, 0).
WithExtra(map[string]interface{}{