Prep for gas balancing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
32ea060e99
commit
d8d9291402
@ -126,6 +126,7 @@ var prices = map[abi.ChainEpoch]Pricelist{
|
|||||||
scale: 85639,
|
scale: 85639,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
verifyPostDiscount: true,
|
||||||
verifyConsensusFault: 495422,
|
verifyConsensusFault: 495422,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,7 @@ type pricelistV0 struct {
|
|||||||
computeUnsealedSectorCidBase int64
|
computeUnsealedSectorCidBase int64
|
||||||
verifySealBase int64
|
verifySealBase int64
|
||||||
verifyPostLookup map[abi.RegisteredPoStProof]scalingCost
|
verifyPostLookup map[abi.RegisteredPoStProof]scalingCost
|
||||||
|
verifyPostDiscount bool
|
||||||
verifyConsensusFault int64
|
verifyConsensusFault int64
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +202,9 @@ func (pl *pricelistV0) OnVerifyPost(info proof2.WindowPoStVerifyInfo) GasCharge
|
|||||||
}
|
}
|
||||||
|
|
||||||
gasUsed := cost.flat + int64(len(info.ChallengedSectors))*cost.scale
|
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).
|
return newGasCharge("OnVerifyPost", gasUsed, 0).
|
||||||
WithExtra(map[string]interface{}{
|
WithExtra(map[string]interface{}{
|
||||||
|
Loading…
Reference in New Issue
Block a user