Closed anorth closed 3 years ago
Merging #1426 (482e282) into master (d03ede5) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #1426 +/- ##
======================================
Coverage 70.2% 70.2%
======================================
Files 72 72
Lines 7779 7779
======================================
Hits 5461 5461
Misses 1435 1435
Partials 883 883
Adds a scenario test that measures the gas cost of PreCommitSectorBatch for various batch sizes. When pre-committing 1000 sectors, at the maximum batch size, the per-sector cost is reduced to 15% vs batch size of 1 (so 6.5x improvement). With smaller sector counts the relative improvement of large batches is even better (because the HAMT stays smaller).
Note that this underestimates the improvement to the current mainnet code, because the single-sector case enjoyed some state access optimisations during implementation in terms of the new PreCommitSectorBatch.
The earlier commits in this PR implement some clean-up and I was getting my head around the VM stats. Feel free to ask for reversion of or push a commit reverting anything that doesn't work for you. The TestMeasurePoRepGas output now looks like