Prep for gas balancing

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-10-29 20:34:48 +01:00
parent 32ea060e99
commit d8d9291402
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
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
gasUsed /= 2 // XXX: this is an artificial discount
if pl.verifyPostDiscount {
gasUsed /= 2 // XXX: this is an artificial discount
}
return newGasCharge("OnVerifyPost", gasUsed, 0).
WithExtra(map[string]interface{}{