-
Notifications
You must be signed in to change notification settings - Fork 102
BatchBalancer fee charged on precommit aggregate #1497
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1497 +/- ##
======================================
Coverage 71.5% 71.5%
======================================
Files 72 72
Lines 8612 8620 +8
======================================
+ Hits 6159 6167 +8
Misses 1563 1563
Partials 890 890 |
e586232
to
88ee459
Compare
0a70226
to
26fc40a
Compare
actors/builtin/miner/monies.go
Outdated
return AggregateNetworkFee(aggregateSize, EstimatedSinglePreCommitGasUsage, baseFee) | ||
} | ||
|
||
func AggregateNetworkFee(aggregateSize int, gasUsage big.Int, baseFee abi.TokenAmount) abi.TokenAmount { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not export this? I don't think it's needed, and it's only too easy for something (Lotus) to misuse this since it shares a name with the v5 method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem
actors/builtin/miner/monies.go
Outdated
@@ -211,15 +211,25 @@ func LockedRewardFromReward(reward abi.TokenAmount) (abi.TokenAmount, *VestSpec) | |||
} | |||
|
|||
var EstimatedSingleProofGasUsage = big.NewInt(65733297) // PARAM_SPEC | |||
var BatchDiscount = builtin.BigFrac{ // PARAM_SPEC | |||
var EstimatedSingleProveCommitGasUsage = big.NewInt(49299973) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You should be able to nuke EstimatedSingleProofGasUsage above^
- Out of curiosity, where do these numbers come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are rough estimates of the mean gas used per single PreCommit and ProveCommit. Empirically measured from tests and validated with small samples of on chain gas values. Wouldn't be surprised if they need tweaking down the line.
7c7f2ad
to
0ed36e0
Compare
WIP #1492