diff --git a/snapshots/semver-lock.json b/snapshots/semver-lock.json index 5d0d2f1d6..1ce90dc18 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": "0xdace3db84a70b9fd9bc4dd508184bc01af55568e78974381188fde5ddbb3509a" }, "src/L1/proofs/AnchorStateRegistry.sol:AnchorStateRegistry": { "initCodeHash": "0xedf834940e0e600739722d1548955d6888e85144d165ad738353e136da000190", diff --git a/src/L1/proofs/AggregateVerifier.sol b/src/L1/proofs/AggregateVerifier.sol index acbd75fac..5c59ea364 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. @@ -809,7 +809,7 @@ contract AggregateVerifier is Clone, ReentrancyGuard, ISemver { /// only games starting on slow blocks. /// @dev Selection is on the starting block rather than the ending block so the game chain stays /// contiguous across the activation: every game satisfies - /// `end == parent.end + slowBlockInterval` for the interval its own start selects. Exactly one + /// `end == parent.end + blockInterval` for the interval its own start selects. Exactly one /// game straddles the activation and is proven under the slow-block interval, which is /// correct because provers apply fork rules per block by timestamp. /// @param startingBlock The starting L2 block number of the game. @@ -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); }