From de0c384240c1c6480dc4d12c9ac6835de1b3e15b Mon Sep 17 00:00:00 2001 From: LHerskind Date: Tue, 17 Sep 2024 16:10:09 +0000 Subject: [PATCH] chore: address rebase issue --- l1-contracts/src/core/Rollup.sol | 2 +- yarn-project/end-to-end/src/e2e_synching.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/l1-contracts/src/core/Rollup.sol b/l1-contracts/src/core/Rollup.sol index 79abf27e612..a5ded45c052 100644 --- a/l1-contracts/src/core/Rollup.sol +++ b/l1-contracts/src/core/Rollup.sol @@ -390,7 +390,7 @@ contract Rollup is Leonidas, IRollup, ITestRollup { * @return bytes32 - The archive root of the block */ function archiveAt(uint256 _blockNumber) external view override(IRollup) returns (bytes32) { - if (_blockNumber < pendingBlockCount) { + if (_blockNumber <= tips.pendingBlockNumber) { return blocks[_blockNumber].archive; } return bytes32(0); diff --git a/yarn-project/end-to-end/src/e2e_synching.test.ts b/yarn-project/end-to-end/src/e2e_synching.test.ts index 7fb45556f0a..0ec53ed95ce 100644 --- a/yarn-project/end-to-end/src/e2e_synching.test.ts +++ b/yarn-project/end-to-end/src/e2e_synching.test.ts @@ -448,11 +448,11 @@ describe('e2e_l1_with_wall_time', () => { client: opts.deployL1ContractsValues!.walletClient, }); - const pendingCount = await rollup.read.pendingBlockCount(); - await rollup.write.setAssumeProvenUntilBlockNumber([pendingCount - BigInt(variant.blockCount) / 2n]); + const pendingBlockNumber = await rollup.read.getPendingBlockNumber(); + await rollup.write.setAssumeProvenThroughBlockNumber([pendingBlockNumber - BigInt(variant.blockCount) / 2n]); const timeliness = await rollup.read.TIMELINESS_PROVING_IN_SLOTS(); - const [, , slot] = await rollup.read.blocks([await rollup.read.provenBlockCount()]); + const [, , slot] = await rollup.read.blocks([(await rollup.read.getProvenBlockNumber()) + 1n]); const timeJumpTo = await rollup.read.getTimestampForSlot([slot + timeliness]); await opts.cheatCodes!.eth.warp(Number(timeJumpTo));