Skip to content

Commit a8cbe0c

Browse files
committed
chore: note end-hash check gas trade-off and trim test describe labels
1 parent fb7e865 commit a8cbe0c

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

l1-contracts/src/core/libraries/rollup/EpochProofLib.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ library EpochProofLib {
296296
// proof's public inputs, so nothing else pins where the segment begins. The end is already pinned transitively
297297
// (the checkpoint root binds end_inbox_rolling_hash to the last checkpoint header, whose hash verifyHeaders ties
298298
// to storage), so checking it here only trades a bare proof-verification failure for a specific error.
299+
// The end check is therefore a deliberate gas-for-diagnostics trade: it costs one cold SLOAD (2,100 gas per
300+
// submission) and can be deleted if the submit path ever needs trimming.
299301
{
300302
bytes32 expectedPreviousInboxRollingHash = STFLib.getInboxRollingHash(_start - 1);
301303
require(

yarn-project/stdlib/src/p2p/block_proposal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('Block Proposal serialization / deserialization', () => {
116116
expect(tampered.getSender()).toBeUndefined();
117117
});
118118

119-
describe('bucket reference (AZIP-22 Fast Inbox)', () => {
119+
describe('bucket reference', () => {
120120
it('round-trips with a bucket reference set', async () => {
121121
const bucketRef = InboxBucketRef.random();
122122
const proposal = await makeBlockProposal({ bucketRef });

yarn-project/stdlib/src/p2p/checkpoint_proposal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('CheckpointProposal serialization / deserialization', () => {
4343
expect(deserialized.toBuffer()).toEqual(proposal.toBuffer());
4444
});
4545

46-
describe('bucket reference (AZIP-22 Fast Inbox)', () => {
46+
describe('bucket reference', () => {
4747
it('round-trips with a bucket reference on the last block', async () => {
4848
const checkpointHeader = CheckpointHeader.random();
4949
const bucketRef = new InboxBucketRef(17n, 1_700_000_000n, checkpointHeader.inboxRollingHash);

0 commit comments

Comments
 (0)