Skip to content

Commit 81f5120

Browse files
linoscopeMaddiaa0
andauthored
fix: use non-empty block in benchmarking to include outhash (#15715)
## What Benchmarks now use non‑empty blocks with non‑zero outHashes. ## Why Storing outHash == 0 costs only 2100 gas, while "real" (non‑zero) hashes cost 22100 gas (I assume that in mainnet we will always have at least one outbox message per L2 block). Our previous gas measurement was therefore off by ~20 k gas per block. ## Testing Before: ``` | propose | 390446 | 401059 | 400462 | 416897 | 100 | ``` After: ``` | propose | 411330 | 421890 | 421316 | 437781 | 100 | ``` Co-authored-by: Maddiaa <[email protected]>
1 parent 5059646 commit 81f5120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

l1-contracts/test/benchmark/happy.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ contract BenchmarkRollupTest is FeeModelTestPoints, DecoderBase {
124124
CommitteeAttestation[] attestations;
125125
}
126126

127-
DecoderBase.Full full = load("empty_block_1");
127+
DecoderBase.Full full = load("single_tx_block_1");
128128

129129
uint256 internal constant SLOT_DURATION = 36;
130130
uint256 internal constant EPOCH_DURATION = 32;

0 commit comments

Comments
 (0)