From f49a7d2920f2a4a32346e667f74000ff70ac8f90 Mon Sep 17 00:00:00 2001 From: Roger Bai Date: Mon, 21 Sep 2026 15:06:21 -0400 Subject: [PATCH] refactor(L1): drop slow prefix from selected interval locals The values from _intervalsAt may be the fast cadence pair, so naming them slow* is misleading. Co-authored-by: Cursor --- snapshots/semver-lock.json | 2 +- src/L1/proofs/AggregateVerifier.sol | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/snapshots/semver-lock.json b/snapshots/semver-lock.json index 5d0d2f1d6..97f1b3011 100644 --- a/snapshots/semver-lock.json +++ b/snapshots/semver-lock.json @@ -25,7 +25,7 @@ }, "src/L1/proofs/AggregateVerifier.sol:AggregateVerifier": { "initCodeHash": "0x91a51808e37fa282a974cb5028e0ba517e04c903ce594b393cfda9dcc5408188", - "sourceCodeHash": "0x360867cf77ce89209c177d55c286fdca1309924cd36c23b7b5da2971089bcef2" + "sourceCodeHash": "0xe699cb9845605671253b79592d88e3bfb6b4adda84cded47c6893b12816f6a3f" }, "src/L1/proofs/AnchorStateRegistry.sol:AnchorStateRegistry": { "initCodeHash": "0xedf834940e0e600739722d1548955d6888e85144d165ad738353e136da000190", diff --git a/src/L1/proofs/AggregateVerifier.sol b/src/L1/proofs/AggregateVerifier.sol index acbd75fac..d9a6f776b 100644 --- a/src/L1/proofs/AggregateVerifier.sol +++ b/src/L1/proofs/AggregateVerifier.sol @@ -440,9 +440,9 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver { // The block number must be one block interval after the starting block number. The interval // is selected on the starting block so the game chain stays contiguous across the speedup. - (uint256 slowBlockInterval,) = _intervalsAt(startingOutputRoot.l2SequenceNumber, firstFastBlock); - if (l2SequenceNumber() != startingOutputRoot.l2SequenceNumber + slowBlockInterval) { - revert UnexpectedBlockNumber(startingOutputRoot.l2SequenceNumber + slowBlockInterval, l2SequenceNumber()); + (uint256 blockInterval,) = _intervalsAt(startingOutputRoot.l2SequenceNumber, firstFastBlock); + if (l2SequenceNumber() != startingOutputRoot.l2SequenceNumber + blockInterval) { + revert UnexpectedBlockNumber(startingOutputRoot.l2SequenceNumber + blockInterval, l2SequenceNumber()); } // Set the game as initialized. @@ -1154,10 +1154,10 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver { bytes32 startingRoot = intermediateRootIndex == 0 ? startingOutputRoot.root.raw() : intermediateOutputRoot(intermediateRootIndex - 1); - (, uint256 slowIntermediateBlockInterval) = intervalsForStartingBlock(startingOutputRoot.l2SequenceNumber); + (, uint256 intermediateBlockInterval) = intervalsForStartingBlock(startingOutputRoot.l2SequenceNumber); uint64 startingL2SequenceNumber = - uint64(startingOutputRoot.l2SequenceNumber + intermediateRootIndex * slowIntermediateBlockInterval); - uint64 endingL2SequenceNumber = startingL2SequenceNumber + uint64(slowIntermediateBlockInterval); + uint64(startingOutputRoot.l2SequenceNumber + intermediateRootIndex * intermediateBlockInterval); + uint64 endingL2SequenceNumber = startingL2SequenceNumber + uint64(intermediateBlockInterval); return (startingRoot, startingL2SequenceNumber, endingL2SequenceNumber); }