From 478385c33daf73d38d07dafede8be79167ad45af Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 09:52:09 -0400 Subject: [PATCH 01/15] add gas test ci for l1 contracts --- .github/workflows/l1-contracts-ci.yaml | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index d761b63ed..8a08def23 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -215,3 +215,42 @@ jobs: coverage-files: ./l1-contracts/lcov.info working-directory: l1-contracts minimum-coverage: 85 # Set coverage threshold. + + gas-report: + defaults: + run: + working-directory: l1-contracts + needs: [build, lint] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Use Foundry + uses: foundry-rs/foundry-toolchain@v1 + + # Add any step generating a gas report to a temporary file named gasreport.ansi. For example: + - name: Run tests + run: yarn test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! + env: + # make fuzzing semi-deterministic to avoid noisy gas cost estimation + # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds) + FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }} + + - name: Compare gas reports + uses: Rubilmax/foundry-gas-diff@v3.18 + with: + summaryQuantile: 0.0 # only display the 10% most significant gas diffs in the summary (defaults to 20%) + sortCriteria: avg,max # sort diff rows by criteria + sortOrders: desc,asc # and directions + ignore: test-foundry/**/* # filter out gas reports from specific paths (test/ is included by default) + id: gas_diff + + - name: Add gas diff to sticky comment + if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' + uses: marocchino/sticky-pull-request-comment@v2 + with: + # delete the comment in case changes no longer impact gas costs + delete: ${{ !steps.gas_diff.outputs.markdown }} + message: ${{ steps.gas_diff.outputs.markdown }} From c0fbc65170b29db19e48c541ac4fc6be363fefe5 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 10:13:08 -0400 Subject: [PATCH 02/15] add steps --- .github/workflows/l1-contracts-ci.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 8a08def23..628d9968d 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -230,6 +230,25 @@ jobs: - name: Use Foundry uses: foundry-rs/foundry-toolchain@v1 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.18.0 + cache: yarn + + - name: Install dependencies + run: yarn + + - name: Restore artifacts cache + uses: actions/cache/restore@v3 + with: + fail-on-cache-miss: true + key: artifacts-l1-${{ github.sha }} + path: | + l1-contracts/artifacts + l1-contracts/cache + l1-contracts/typechain + # Add any step generating a gas report to a temporary file named gasreport.ansi. For example: - name: Run tests run: yarn test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! From 201cf2e5b2d6a1c9560c97414e1809f0069eeb51 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 10:39:51 -0400 Subject: [PATCH 03/15] change steps --- .github/workflows/l1-contracts-ci.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 628d9968d..e2c2932c6 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -217,13 +217,12 @@ jobs: minimum-coverage: 85 # Set coverage threshold. gas-report: - defaults: - run: - working-directory: l1-contracts needs: [build, lint] runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 + - name: Checkout the repository + uses: actions/checkout@v4 with: submodules: recursive @@ -251,7 +250,7 @@ jobs: # Add any step generating a gas report to a temporary file named gasreport.ansi. For example: - name: Run tests - run: yarn test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! + run: yarn l1 test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! env: # make fuzzing semi-deterministic to avoid noisy gas cost estimation # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds) From 0ad9176ddcb5fc916e44d54899d34ea51f050145 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 10:51:00 -0400 Subject: [PATCH 04/15] change steps --- .github/workflows/l1-contracts-ci.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index e2c2932c6..11b84aeaf 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -217,7 +217,7 @@ jobs: minimum-coverage: 85 # Set coverage threshold. gas-report: - needs: [build, lint] + needs: [build, lint, test-foundry] runs-on: ubuntu-latest steps: @@ -251,10 +251,6 @@ jobs: # Add any step generating a gas report to a temporary file named gasreport.ansi. For example: - name: Run tests run: yarn l1 test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! - env: - # make fuzzing semi-deterministic to avoid noisy gas cost estimation - # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds) - FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }} - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.18 From 6c4b29be1abaad5cd6175829d833c1be4c9c479d Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 11:22:51 -0400 Subject: [PATCH 05/15] diff cmd --- .github/workflows/l1-contracts-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 11b84aeaf..d417a8773 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -250,7 +250,7 @@ jobs: # Add any step generating a gas report to a temporary file named gasreport.ansi. For example: - name: Run tests - run: yarn l1 test:foundry --gas-report > gasreport.ansi # <- this file name should be unique in your repository! + run: yarn l1 test:foundry --gas-report | tee gasreport.ansi # <- this file name should be unique in your repository! - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.18 From 3b6a3b0c069d2f6a937141bf27532818221b688f Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Mon, 22 Jul 2024 12:15:46 -0400 Subject: [PATCH 06/15] uncomment out test --- .../StateTransitionManager/CreateNewChain.t.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol index 86239cfd9..dc48a6ede 100644 --- a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol @@ -28,13 +28,13 @@ contract createNewChainTest is StateTransitionManagerTest { }); } - // function test_SuccessfulCreationOfNewChain() public { - // createNewChain(getDiamondCutData(diamondInit)); + function test_SuccessfulCreationOfNewChain() public { + createNewChain(getDiamondCutData(diamondInit)); - // address admin = chainContractAddress.getChainAdmin(chainId); - // address newChainAddress = chainContractAddress.getHyperchain(chainId); + address admin = chainContractAddress.getChainAdmin(chainId); + address newChainAddress = chainContractAddress.getHyperchain(chainId); - // assertEq(newChainAdmin, admin); - // assertNotEq(newChainAddress, address(0)); - // } + assertEq(newChainAdmin, admin); + assertNotEq(newChainAddress, address(0)); + } } From 05293c13ea2dc7a1743c7221dfd34c31474b8922 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 08:44:48 -0400 Subject: [PATCH 07/15] message root tests --- .github/workflows/l1-contracts-ci.yaml | 2 +- .../contracts/bridgehub/MessageRoot.sol | 18 +-- .../unit/concrete/Bridgehub/MessageRoot.t.sol | 118 ++++++++++++++++++ 3 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index d417a8773..fe9b75aff 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -217,7 +217,7 @@ jobs: minimum-coverage: 85 # Set coverage threshold. gas-report: - needs: [build, lint, test-foundry] + needs: [build, lint] runs-on: ubuntu-latest steps: diff --git a/l1-contracts/contracts/bridgehub/MessageRoot.sol b/l1-contracts/contracts/bridgehub/MessageRoot.sol index c98549229..fd13c5cc1 100644 --- a/l1-contracts/contracts/bridgehub/MessageRoot.sol +++ b/l1-contracts/contracts/bridgehub/MessageRoot.sol @@ -157,15 +157,15 @@ contract MessageRoot is IMessageRoot, ReentrancyGuard { // It is expected that the root is present // `_updateTree` should be false only if the caller ensures that it is followed by updating the entire tree. - function _unsafeResetChainRoot(uint256 _index, bool _updateTree) internal { - uint256 chainId = chainIndexToId[_index]; - bytes32 initialRoot = chainTree[chainId].setup(CHAIN_TREE_EMPTY_ENTRY_HASH); - - if (_updateTree) { - // slither-disable-next-line unused-return - sharedTree.updateLeaf(_index, Messaging.chainIdLeafHash(initialRoot, chainId)); - } - } + // function _unsafeResetChainRoot(uint256 _index, bool _updateTree) internal { + // uint256 chainId = chainIndexToId[_index]; + // bytes32 initialRoot = chainTree[chainId].setup(CHAIN_TREE_EMPTY_ENTRY_HASH); + + // if (_updateTree) { + // // slither-disable-next-line unused-return + // sharedTree.updateLeaf(_index, Messaging.chainIdLeafHash(initialRoot, chainId)); + // } + // } /// IMPORTANT FIXME!!!: split into two: provide pubdata and clear state. The "provide pubdata" part should be used by SL. /// NO DA is provided here ATM !!! diff --git a/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol b/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol new file mode 100644 index 000000000..aebfd90aa --- /dev/null +++ b/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.24; + +import {Test} from "forge-std/Test.sol"; +import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; +import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; + + +// Chain tree consists of batch commitments as their leaves. We use hash of "new bytes(96)" as the hash of an empty leaf. +bytes32 constant CHAIN_TREE_EMPTY_ENTRY_HASH = bytes32( + 0x46700b4d40ac5c35af2c22dda2787a91eb567b06c924a8fb8ae9a05b20c08c21 +); + +// Chain tree consists of batch commitments as their leaves. We use hash of "new bytes(96)" as the hash of an empty leaf. +bytes32 constant SHARED_ROOT_TREE_EMPTY_HASH = bytes32( + 0x46700b4d40ac5c35af2c22dda2787a91eb567b06c924a8fb8ae9a05b20c08c21 +); + +contract MessageRootTest is Test { + address bridgeHub; + MessageRoot messageRoot; + + function setUp() public { + bridgeHub = makeAddr("bridgeHub"); + messageRoot = new MessageRoot(IBridgehub(bridgeHub)); + } + + function test_init() public { + assertEq(messageRoot.getAggregatedRoot(), CHAIN_TREE_EMPTY_ENTRY_HASH); + } + + function test_RevertWhen_addChainNotBridgeHub() public { + uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + uint256 betaChainId = uint256(uint160(makeAddr("betaChainId"))); + + assertFalse(messageRoot.chainRegistered(alphaChainId), "alpha chain 1"); + + vm.expectRevert("MR: only bridgehub"); + messageRoot.addNewChain(alphaChainId); + + assertFalse(messageRoot.chainRegistered(alphaChainId), "alpha chain 2"); + } + + function test_addNewChain() public { + uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + uint256 betaChainId = uint256(uint160(makeAddr("betaChainId"))); + + assertFalse(messageRoot.chainRegistered(alphaChainId), "alpha chain 1"); + assertFalse(messageRoot.chainRegistered(betaChainId), "beta chain 1"); + + vm.prank(bridgeHub); + vm.expectEmit(true, false, false, false); + emit MessageRoot.AddedChain(alphaChainId, 0); + messageRoot.addNewChain(alphaChainId); + + assertTrue(messageRoot.chainRegistered(alphaChainId), "alpha chain 2"); + assertFalse(messageRoot.chainRegistered(betaChainId), "beta chain 2"); + + assertEq(messageRoot.getChainRoot(alphaChainId), bytes32(0)); + } + + function test_RevertWhen_ChainNotRegistered() public { + address alphaChainSender = makeAddr("alphaChainSender"); + uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + vm.mockCall( + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + abi.encode(alphaChainSender) + ); + + + vm.prank(alphaChainSender); + vm.expectRevert("MR: not registered"); + messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + } + + function test_addChainBatchRoot() public { + address alphaChainSender = makeAddr("alphaChainSender"); + uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + vm.mockCall( + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + abi.encode(alphaChainSender) + ); + + vm.prank(bridgeHub); + messageRoot.addNewChain(alphaChainId); + + + vm.prank(alphaChainSender); + vm.expectEmit(true, false, false, false); + emit MessageRoot.Preimage(bytes32(0), bytes32(0)); + vm.expectEmit(true, false, false, false); + emit MessageRoot.AppendedChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + } + + function test_updateFullTree() public { + address alphaChainSender = makeAddr("alphaChainSender"); + uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); + vm.mockCall( + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + abi.encode(alphaChainSender) + ); + + vm.prank(bridgeHub); + messageRoot.addNewChain(alphaChainId); + + vm.prank(alphaChainSender); + messageRoot.addChainBatchRoot(alphaChainId, 1, bytes32(alphaChainId)); + + messageRoot.updateFullTree(); + + assertEq(messageRoot.getAggregatedRoot(), 0xbad7e1cf889e30252b8ce93820f79d50651b78587844bc1c588dea123effa4ea); + } +} From 51b85d5abf84e16a9ba390fa06640d30c0cf7184 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 08:59:06 -0400 Subject: [PATCH 08/15] lint --- .../unit/concrete/Bridgehub/MessageRoot.t.sol | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol b/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol index aebfd90aa..497ec4731 100644 --- a/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/Bridgehub/MessageRoot.t.sol @@ -6,7 +6,6 @@ import {Test} from "forge-std/Test.sol"; import {MessageRoot} from "contracts/bridgehub/MessageRoot.sol"; import {IBridgehub} from "contracts/bridgehub/IBridgehub.sol"; - // Chain tree consists of batch commitments as their leaves. We use hash of "new bytes(96)" as the hash of an empty leaf. bytes32 constant CHAIN_TREE_EMPTY_ENTRY_HASH = bytes32( 0x46700b4d40ac5c35af2c22dda2787a91eb567b06c924a8fb8ae9a05b20c08c21 @@ -33,7 +32,7 @@ contract MessageRootTest is Test { function test_RevertWhen_addChainNotBridgeHub() public { uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); uint256 betaChainId = uint256(uint160(makeAddr("betaChainId"))); - + assertFalse(messageRoot.chainRegistered(alphaChainId), "alpha chain 1"); vm.expectRevert("MR: only bridgehub"); @@ -45,7 +44,7 @@ contract MessageRootTest is Test { function test_addNewChain() public { uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); uint256 betaChainId = uint256(uint160(makeAddr("betaChainId"))); - + assertFalse(messageRoot.chainRegistered(alphaChainId), "alpha chain 1"); assertFalse(messageRoot.chainRegistered(betaChainId), "beta chain 1"); @@ -64,11 +63,10 @@ contract MessageRootTest is Test { address alphaChainSender = makeAddr("alphaChainSender"); uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), abi.encode(alphaChainSender) ); - vm.prank(alphaChainSender); vm.expectRevert("MR: not registered"); @@ -79,15 +77,14 @@ contract MessageRootTest is Test { address alphaChainSender = makeAddr("alphaChainSender"); uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), abi.encode(alphaChainSender) ); - + vm.prank(bridgeHub); messageRoot.addNewChain(alphaChainId); - vm.prank(alphaChainSender); vm.expectEmit(true, false, false, false); emit MessageRoot.Preimage(bytes32(0), bytes32(0)); @@ -100,11 +97,11 @@ contract MessageRootTest is Test { address alphaChainSender = makeAddr("alphaChainSender"); uint256 alphaChainId = uint256(uint160(makeAddr("alphaChainId"))); vm.mockCall( - bridgeHub, - abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), + bridgeHub, + abi.encodeWithSelector(IBridgehub.getHyperchain.selector, alphaChainId), abi.encode(alphaChainSender) ); - + vm.prank(bridgeHub); messageRoot.addNewChain(alphaChainId); From 113508baf4621b25248e6f57050faf32c8395453 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 09:03:35 -0400 Subject: [PATCH 09/15] update workflow --- .github/workflows/l1-contracts-ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index fe9b75aff..63b705038 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -258,7 +258,10 @@ jobs: summaryQuantile: 0.0 # only display the 10% most significant gas diffs in the summary (defaults to 20%) sortCriteria: avg,max # sort diff rows by criteria sortOrders: desc,asc # and directions - ignore: test-foundry/**/* # filter out gas reports from specific paths (test/ is included by default) + ignore: + - test-foundry/**/* + - l1-contracts/dev-contracts/**/* + - l1-contracts/lib/**/* id: gas_diff - name: Add gas diff to sticky comment From 8a09f31fa2e47262594c64568505a4ed14cff739 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 09:07:49 -0400 Subject: [PATCH 10/15] lint --- .github/workflows/l1-contracts-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 63b705038..50c5880c4 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -258,7 +258,7 @@ jobs: summaryQuantile: 0.0 # only display the 10% most significant gas diffs in the summary (defaults to 20%) sortCriteria: avg,max # sort diff rows by criteria sortOrders: desc,asc # and directions - ignore: + ignore: - test-foundry/**/* - l1-contracts/dev-contracts/**/* - l1-contracts/lib/**/* From 7e688f53a4325c17e0b49448e79ad09935aef963 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 09:17:09 -0400 Subject: [PATCH 11/15] fix workflow --- .github/workflows/l1-contracts-ci.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 50c5880c4..6f29eb2a7 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -258,10 +258,7 @@ jobs: summaryQuantile: 0.0 # only display the 10% most significant gas diffs in the summary (defaults to 20%) sortCriteria: avg,max # sort diff rows by criteria sortOrders: desc,asc # and directions - ignore: - - test-foundry/**/* - - l1-contracts/dev-contracts/**/* - - l1-contracts/lib/**/* + ignore: test-foundry/**/*,l1-contracts/dev-contracts/**/*,l1-contracts/lib/**/* id: gas_diff - name: Add gas diff to sticky comment From 1d4dc5710ad744d49ee37e51b71ae4a5b56a9123 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 09:31:03 -0400 Subject: [PATCH 12/15] refine workflow --- .github/workflows/l1-contracts-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/l1-contracts-ci.yaml b/.github/workflows/l1-contracts-ci.yaml index 6f29eb2a7..181e6f5cb 100644 --- a/.github/workflows/l1-contracts-ci.yaml +++ b/.github/workflows/l1-contracts-ci.yaml @@ -258,7 +258,7 @@ jobs: summaryQuantile: 0.0 # only display the 10% most significant gas diffs in the summary (defaults to 20%) sortCriteria: avg,max # sort diff rows by criteria sortOrders: desc,asc # and directions - ignore: test-foundry/**/*,l1-contracts/dev-contracts/**/*,l1-contracts/lib/**/* + ignore: test-foundry/**/*,l1-contracts/contracts/dev-contracts/**/*,l1-contracts/lib/**/*,l1-contracts/contracts/common/Dependencies.sol id: gas_diff - name: Add gas diff to sticky comment From 71c3726392dc5d29626ddc02668da8b1bb05817c Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 23 Jul 2024 16:54:49 -0400 Subject: [PATCH 13/15] add tests for STM --- .../StateTransitionManager.sol | 2 +- .../foundry/unit/concrete/Utils/Utils.sol | 3 +- .../StateTransitionManager/Admin.t.sol | 34 +++++++++++++++++++ .../CreateNewChain.t.sol | 11 ++++++ .../SetNewVersionUpgrade.t.sol | 6 ++++ .../SetValidatorTimelock.t.sol | 19 +++++++++++ 6 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/Admin.t.sol diff --git a/l1-contracts/contracts/state-transition/StateTransitionManager.sol b/l1-contracts/contracts/state-transition/StateTransitionManager.sol index f5c1aac47..b285feeba 100644 --- a/l1-contracts/contracts/state-transition/StateTransitionManager.sol +++ b/l1-contracts/contracts/state-transition/StateTransitionManager.sol @@ -102,7 +102,7 @@ contract StateTransitionManager is IStateTransitionManager, ReentrancyGuard, Own chainAddresses = new address[](keys.length); uint256 keysLength = keys.length; for (uint256 i = 0; i < keysLength; ++i) { - chainAddresses[i] = hyperchainMap.get(i); + chainAddresses[i] = hyperchainMap.get(keys[i]); } } diff --git a/l1-contracts/test/foundry/unit/concrete/Utils/Utils.sol b/l1-contracts/test/foundry/unit/concrete/Utils/Utils.sol index 7b7ad25be..6f54bcaac 100644 --- a/l1-contracts/test/foundry/unit/concrete/Utils/Utils.sol +++ b/l1-contracts/test/foundry/unit/concrete/Utils/Utils.sol @@ -208,7 +208,7 @@ library Utils { } function getGettersSelectors() public pure returns (bytes4[] memory) { - bytes4[] memory selectors = new bytes4[](29); + bytes4[] memory selectors = new bytes4[](30); selectors[0] = GettersFacet.getVerifier.selector; selectors[1] = GettersFacet.getAdmin.selector; selectors[2] = GettersFacet.getPendingAdmin.selector; @@ -238,6 +238,7 @@ library Utils { selectors[26] = GettersFacet.getTotalBatchesVerified.selector; selectors[27] = GettersFacet.getTotalBatchesExecuted.selector; selectors[28] = GettersFacet.getL2SystemContractsUpgradeTxHash.selector; + selectors[29] = GettersFacet.getProtocolVersion.selector; return selectors; } diff --git a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/Admin.t.sol b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/Admin.t.sol new file mode 100644 index 000000000..a214c0374 --- /dev/null +++ b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/Admin.t.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {IStateTransitionManager} from "contracts/state-transition/IStateTransitionManager.sol"; +import {StateTransitionManagerTest} from "./_StateTransitionManager_Shared.t.sol"; + +contract AdminTest is StateTransitionManagerTest { + function test_setPendingAdmin() public { + address newAdmin = makeAddr("newAdmin"); + + vm.expectEmit(true, true, true, false); + emit IStateTransitionManager.NewPendingAdmin(address(0), newAdmin); + chainContractAddress.setPendingAdmin(newAdmin); + } + + function test_acceptPendingAdmin() public { + address newAdmin = makeAddr("newAdmin"); + + chainContractAddress.setPendingAdmin(newAdmin); + + // Need this because in shared setup we start a prank as the governor + vm.stopPrank(); + vm.prank(newAdmin); + vm.expectEmit(true, true, true, false); + emit IStateTransitionManager.NewPendingAdmin(newAdmin, address(0)); + vm.expectEmit(true, true, true, false); + emit IStateTransitionManager.NewAdmin(address(0), newAdmin); + chainContractAddress.acceptAdmin(); + + address currentAdmin = chainContractAddress.admin(); + + assertEq(currentAdmin, newAdmin); + } +} diff --git a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol index dc48a6ede..7eef43b79 100644 --- a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/CreateNewChain.t.sol @@ -36,5 +36,16 @@ contract createNewChainTest is StateTransitionManagerTest { assertEq(newChainAdmin, admin); assertNotEq(newChainAddress, address(0)); + + address[] memory chainAddresses = chainContractAddress.getAllHyperchains(); + assertEq(chainAddresses.length, 1); + assertEq(chainAddresses[0], newChainAddress); + + uint256[] memory chainIds = chainContractAddress.getAllHyperchainChainIDs(); + assertEq(chainIds.length, 1); + assertEq(chainIds[0], chainId); + + uint256 protocolVersion = chainContractAddress.getProtocolVersion(chainId); + assertEq(protocolVersion, 0); } } diff --git a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetNewVersionUpgrade.t.sol b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetNewVersionUpgrade.t.sol index ced7e3f7d..b1153a495 100644 --- a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetNewVersionUpgrade.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetNewVersionUpgrade.t.sol @@ -16,5 +16,11 @@ contract setNewVersionUpgradeTest is StateTransitionManagerTest { assertEq(chainContractAddress.upgradeCutHash(0), newCutHash, "Diamond cut upgrade was not successful"); assertEq(chainContractAddress.protocolVersion(), 1, "New protocol version is not correct"); + + (uint32 major, uint32 minor, uint32 patch) = chainContractAddress.getSemverProtocolVersion(); + + assertEq(major, 0); + assertEq(minor, 0); + assertEq(patch, 1); } } diff --git a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetValidatorTimelock.t.sol b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetValidatorTimelock.t.sol index d290a8767..85267cf41 100644 --- a/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetValidatorTimelock.t.sol +++ b/l1-contracts/test/foundry/unit/concrete/state-transition/StateTransitionManager/SetValidatorTimelock.t.sol @@ -20,4 +20,23 @@ contract setValidatorTimelockTest is StateTransitionManagerTest { "Validator timelock update was not successful" ); } + + function test_RevertWhen_NotOwner() public { + // Need this because in shared setup we start a prank as the governor + vm.stopPrank(); + + address notOwner = makeAddr("notOwner"); + assertEq( + chainContractAddress.validatorTimelock(), + validator, + "Initial validator timelock address is not correct" + ); + + vm.prank(notOwner); + vm.expectRevert("STM: not owner or admin"); + address newValidatorTimelock = address(0x0000000000000000000000000000000000004235); + chainContractAddress.setValidatorTimelock(newValidatorTimelock); + + assertEq(chainContractAddress.validatorTimelock(), validator, "Validator should not have been updated"); + } } From 6d02751489ee4cc0708a56c492287949f419361c Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 6 Aug 2024 11:53:32 -0400 Subject: [PATCH 14/15] remove unused fn from message root --- .../contracts/bridgehub/IMessageRoot.sol | 2 - .../contracts/bridgehub/MessageRoot.sol | 42 ------------------- .../contracts/interfaces/IMessageRoot.sol | 1 - 3 files changed, 45 deletions(-) diff --git a/l1-contracts/contracts/bridgehub/IMessageRoot.sol b/l1-contracts/contracts/bridgehub/IMessageRoot.sol index 25542bab7..ecfa33682 100644 --- a/l1-contracts/contracts/bridgehub/IMessageRoot.sol +++ b/l1-contracts/contracts/bridgehub/IMessageRoot.sol @@ -11,7 +11,5 @@ interface IMessageRoot { function addChainBatchRoot(uint256 _chainId, uint256 _batchNumber, bytes32 _chainBatchRoot) external; - function clearTreeAndProvidePubdata() external returns (bytes memory pubdata); - function addNewChainIfNeeded(uint256 _chainId) external; } diff --git a/l1-contracts/contracts/bridgehub/MessageRoot.sol b/l1-contracts/contracts/bridgehub/MessageRoot.sol index fd13c5cc1..a4aa9ef63 100644 --- a/l1-contracts/contracts/bridgehub/MessageRoot.sol +++ b/l1-contracts/contracts/bridgehub/MessageRoot.sol @@ -154,46 +154,4 @@ contract MessageRoot is IMessageRoot, ReentrancyGuard { // slither-disable-next-line unused-return sharedTree.updateAllLeaves(newLeaves); } - - // It is expected that the root is present - // `_updateTree` should be false only if the caller ensures that it is followed by updating the entire tree. - // function _unsafeResetChainRoot(uint256 _index, bool _updateTree) internal { - // uint256 chainId = chainIndexToId[_index]; - // bytes32 initialRoot = chainTree[chainId].setup(CHAIN_TREE_EMPTY_ENTRY_HASH); - - // if (_updateTree) { - // // slither-disable-next-line unused-return - // sharedTree.updateLeaf(_index, Messaging.chainIdLeafHash(initialRoot, chainId)); - // } - // } - - /// IMPORTANT FIXME!!!: split into two: provide pubdata and clear state. The "provide pubdata" part should be used by SL. - /// NO DA is provided here ATM !!! - /// @notice To be called by the bootloader by the L1Messenger at the end of the batch to produce the final root and send it to the underlying layer. - /// @return pubdata The pubdata to be relayed to the DA layer. - function clearTreeAndProvidePubdata() external returns (bytes memory) { - // FIXME: access control: only to be called by the l1 messenger. - // uint256 cachedChainCount = chainCount; - // // We will send the updated roots for all chains. - // // While it will mean that we'll pay even for unchanged roots: - // // - It is the simplest approach - // // - The alternative is to send pairs of (chainId, root), which is less efficient if at least half of the chains are active. - // // - // // There are of course ways to optimize it further, but it will be done in the future. - // bytes memory pubdata = new bytes(cachedChainCount * 32); - // for (uint256 i = 0; i < cachedChainCount; i++) { - // // It is the responsibility of each chain to provide the roots of its L2->L1 messages if it wants to see those. - // // However, for the security of the system as a whole, the chain roots need to be provided for all chains. - // bytes32 chainRoot = chainTree[chainIndexToId[i]].root(); - // assembly { - // mstore(add(pubdata, add(32, mul(i, 32))), chainRoot) - // } - // // Clearing up the state. - // // Note that it *does not* delete any storage slots, so in terms of pubdata savings, it is useless. - // // However, the chains paid for these changes anyway, so it is considered acceptable. - // // In the future, further optimizations will be available. - // _unsafeResetChainRoot(i, false); - // } - // updateFullTree(); - } } diff --git a/system-contracts/contracts/interfaces/IMessageRoot.sol b/system-contracts/contracts/interfaces/IMessageRoot.sol index 0983b71a4..f158b4918 100644 --- a/system-contracts/contracts/interfaces/IMessageRoot.sol +++ b/system-contracts/contracts/interfaces/IMessageRoot.sol @@ -3,6 +3,5 @@ pragma solidity 0.8.20; interface IMessageRoot { - function clearTreeAndProvidePubdata() external returns (bytes memory pubdata); function getAggregatedRoot() external view returns (bytes32 aggregatedRoot); } From 69e9ba75951bdaafc4b16b8382df1d49285e3f96 Mon Sep 17 00:00:00 2001 From: Zach Kolodny Date: Tue, 6 Aug 2024 13:50:17 -0400 Subject: [PATCH 15/15] bump hashes --- system-contracts/SystemContractsHashes.json | 52 ++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/system-contracts/SystemContractsHashes.json b/system-contracts/SystemContractsHashes.json index 545473d36..d1972eab3 100644 --- a/system-contracts/SystemContractsHashes.json +++ b/system-contracts/SystemContractsHashes.json @@ -3,49 +3,49 @@ "contractName": "AccountCodeStorage", "bytecodePath": "artifacts-zk/contracts-preprocessed/AccountCodeStorage.sol/AccountCodeStorage.json", "sourceCodePath": "contracts-preprocessed/AccountCodeStorage.sol", - "bytecodeHash": "0x0100005d0d5963b3b09cf356e290f28e43e05db5d9c1469fac8c8dc7b3abf2af", + "bytecodeHash": "0x0100005d4ef45dc2f9203f11d4f10a5cc9d8fc90c94038348907f9951d62920d", "sourceCodeHash": "0x69d2533e5481ff13e65f4442e650f4b90c46a48ac643cac9798bbbf421194353" }, { "contractName": "BootloaderUtilities", "bytecodePath": "artifacts-zk/contracts-preprocessed/BootloaderUtilities.sol/BootloaderUtilities.json", "sourceCodePath": "contracts-preprocessed/BootloaderUtilities.sol", - "bytecodeHash": "0x010007c76573d4e76a30b911b65daa0af4a643ec8f9414262521b2491b505e49", + "bytecodeHash": "0x010007c7cd7174a30f11c5f0a0caaa072403120d61beef26c0563ba50b0a19a0", "sourceCodeHash": "0x26060f33c7c63bd1f8a1a2f3b368b97ef8dd939bc53e95090f2c556248b99dce" }, { "contractName": "ComplexUpgrader", "bytecodePath": "artifacts-zk/contracts-preprocessed/ComplexUpgrader.sol/ComplexUpgrader.json", "sourceCodePath": "contracts-preprocessed/ComplexUpgrader.sol", - "bytecodeHash": "0x0100004dd7c52ea918d3bab6d8850449b80692184d0297b3c042eaae751225fe", + "bytecodeHash": "0x0100004dd93c94ac92e4bfebaa1613c8e614b0189e1a1da02e550c87777fede1", "sourceCodeHash": "0xdde7c49a94cc3cd34c3e7ced1b5ba45e4740df68d26243871edbe393e7298f7a" }, { "contractName": "Compressor", "bytecodePath": "artifacts-zk/contracts-preprocessed/Compressor.sol/Compressor.json", "sourceCodePath": "contracts-preprocessed/Compressor.sol", - "bytecodeHash": "0x0100013f1d46c6bcfb0caabd15a0dc907f91460e085260c2fe40a108a505513a", + "bytecodeHash": "0x0100013f46aaf4388b6deb1da3c32c958bf354bd5dcbf58e000a2f7b84b7255c", "sourceCodeHash": "0xb0cec0016f481ce023478f71727fbc0d82e967ddc0508e4d47f5c52292a3f790" }, { "contractName": "ContractDeployer", "bytecodePath": "artifacts-zk/contracts-preprocessed/ContractDeployer.sol/ContractDeployer.json", "sourceCodePath": "contracts-preprocessed/ContractDeployer.sol", - "bytecodeHash": "0x010004e5a00bf6227b8b2203553a4557b7bc326647c20c1173f21707792f02ad", + "bytecodeHash": "0x010004e56946cb9626a0f1ddcbc9fb3bc0e38d35cea63885e887a4193506b54a", "sourceCodeHash": "0x1657e45c2ff4d6a892afaf71dab71bb8dc7db2c6863e66240e83dfdd2535420d" }, { "contractName": "Create2Factory", "bytecodePath": "artifacts-zk/contracts-preprocessed/Create2Factory.sol/Create2Factory.json", "sourceCodePath": "contracts-preprocessed/Create2Factory.sol", - "bytecodeHash": "0x01000049a7d2acae5204fb196e8eec1dde41171b0da737cea75dbd49e80f9be6", + "bytecodeHash": "0x01000049c41dac96c98ae1c3c2bebef5265c912470ccaad8de3178fd4f952370", "sourceCodeHash": "0x217e65f55c8add77982171da65e0db8cc10141ba75159af582973b332a4e098a" }, { "contractName": "DefaultAccount", "bytecodePath": "artifacts-zk/contracts-preprocessed/DefaultAccount.sol/DefaultAccount.json", "sourceCodePath": "contracts-preprocessed/DefaultAccount.sol", - "bytecodeHash": "0x0100055de356de05b75c83195567a6688d9050a17b58ccc5c5c91d05cd2bfb6d", + "bytecodeHash": "0x0100055d06870300325a282f315e80d5f23404614262b4116564262b7f6f516d", "sourceCodeHash": "0xeb5ac8fc83e1c8619db058a9b6973958bd6ed1b6f4938f8f4541d702f12e085d" }, { @@ -59,63 +59,63 @@ "contractName": "ImmutableSimulator", "bytecodePath": "artifacts-zk/contracts-preprocessed/ImmutableSimulator.sol/ImmutableSimulator.json", "sourceCodePath": "contracts-preprocessed/ImmutableSimulator.sol", - "bytecodeHash": "0x0100003bd47713cb1de6f8839bd2f1f8679a4360da7f423e2f3eaa6bb3e86028", + "bytecodeHash": "0x0100003b22c0da6d42c2bdcb2548fca995f2ecfdbc431360d7364d69d64440f8", "sourceCodeHash": "0x4212e99cbc1722887cfb5b4cb967f278ac8642834786f0e3c6f3b324a9316815" }, { "contractName": "KnownCodesStorage", "bytecodePath": "artifacts-zk/contracts-preprocessed/KnownCodesStorage.sol/KnownCodesStorage.json", "sourceCodePath": "contracts-preprocessed/KnownCodesStorage.sol", - "bytecodeHash": "0x0100006fc57f216e7189ec08828a4fe4b1e67cb7336ca0173e5fe6e44e830f7f", + "bytecodeHash": "0x0100006fea745ee8452ea9c25847b06ec1b04f2a399560f6be79153d07553e7b", "sourceCodeHash": "0x8da495a9fc5aa0d7d20a165a4fc8bc77012bec29c472015ea5ecc0a2bd706137" }, { "contractName": "L1Messenger", "bytecodePath": "artifacts-zk/contracts-preprocessed/L1Messenger.sol/L1Messenger.json", "sourceCodePath": "contracts-preprocessed/L1Messenger.sol", - "bytecodeHash": "0x010001e7bdcf36d7fd4cbb1eb1c27a709d5c27fd346d282df7d3d5293435ff52", + "bytecodeHash": "0x010001e77b18a51af80352e423ffcfcf7265b85fdf6cec25854773f009c7c5c6", "sourceCodeHash": "0xa208b9cc261e873a7902a2e7c388d252f8d46f965562052a1544c354c3d6f096" }, { "contractName": "L2BaseToken", "bytecodePath": "artifacts-zk/contracts-preprocessed/L2BaseToken.sol/L2BaseToken.json", "sourceCodePath": "contracts-preprocessed/L2BaseToken.sol", - "bytecodeHash": "0x01000105a82f8eec41fbe25de2a833b9816fb171de7e2f650a44ad085dc08bc9", + "bytecodeHash": "0x010001056f6dd9c97bd5fbf9ad44130184713a7b8ad52b5650051f7a69888a5f", "sourceCodeHash": "0x4cdafafd4cfdf410b31641e14487ea657be3af25e5ec1754fcd7ad67ec23d8be" }, { "contractName": "L2GenesisUpgrade", "bytecodePath": "artifacts-zk/contracts-preprocessed/L2GenesisUpgrade.sol/L2GenesisUpgrade.json", "sourceCodePath": "contracts-preprocessed/L2GenesisUpgrade.sol", - "bytecodeHash": "0x010000974222230beff5f3bdcfb4b58940fe547a2907fc7417d4dd26a7abe07f", + "bytecodeHash": "0x01000097b1655a8c65edba54e363ea8779c10b9b094a33c0e432a75b66311482", "sourceCodeHash": "0xcb190d0dfd41bbc809409a8aa04a4847b86edfe010b1d75e23b4c8d07b13a9d0" }, { "contractName": "MsgValueSimulator", "bytecodePath": "artifacts-zk/contracts-preprocessed/MsgValueSimulator.sol/MsgValueSimulator.json", "sourceCodePath": "contracts-preprocessed/MsgValueSimulator.sol", - "bytecodeHash": "0x0100005dec0422e4514f78cc4ad2435ba011998d59b584c77438d9505eb03b4a", + "bytecodeHash": "0x0100005da1a0a5544aa0ff74faf3ccf199cb7eb96de4d480645cab60abb31c62", "sourceCodeHash": "0x4834adf62dbaefa1a1c15d36b5ad1bf2826e7d888a17be495f7ed4e4ea381aa8" }, { "contractName": "NonceHolder", "bytecodePath": "artifacts-zk/contracts-preprocessed/NonceHolder.sol/NonceHolder.json", "sourceCodePath": "contracts-preprocessed/NonceHolder.sol", - "bytecodeHash": "0x010000db7a7a40b0058bfc4d65c3067ecfc59be76f3e4e46a82197ed36dce36f", + "bytecodeHash": "0x010000db40bae05cc6a07f252460f2d434c7ca6c4c215ac93e7a364bfbe2c8af", "sourceCodeHash": "0xaa2ed3a26af30032c00a612ac327e0cdf5288b7c932ae903462355f863f950cb" }, { "contractName": "PubdataChunkPublisher", "bytecodePath": "artifacts-zk/contracts-preprocessed/PubdataChunkPublisher.sol/PubdataChunkPublisher.json", "sourceCodePath": "contracts-preprocessed/PubdataChunkPublisher.sol", - "bytecodeHash": "0x0100004bb2b5083d5de7af7f05491bbd733d3b90917168c461f25dd0e0eda0c0", + "bytecodeHash": "0x0100004bf15739ec4061594a3af7eefc9bd23171e758460cd9b62a61326ca5d1", "sourceCodeHash": "0xc442fd1abb821c95e8229f4ef1575f789e89d60d1001489f5ac9250155cd11dc" }, { "contractName": "SystemContext", "bytecodePath": "artifacts-zk/contracts-preprocessed/SystemContext.sol/SystemContext.json", "sourceCodePath": "contracts-preprocessed/SystemContext.sol", - "bytecodeHash": "0x010001a7276ef9e99743b84cd8ba4d7f8bc15359c73fec896f68e3c9c458e5a4", + "bytecodeHash": "0x010001a7273821c26fd3cecf5cba13c713ac0863c52306dc6cc6325a25bf40b1", "sourceCodeHash": "0x532a962209042f948e8a13e3f4cf12b6d53631e0fc5fa53083c7e2d8062771c0" }, { @@ -185,35 +185,35 @@ "contractName": "bootloader_test", "bytecodePath": "bootloader/build/artifacts/bootloader_test.yul.zbin", "sourceCodePath": "bootloader/build/bootloader_test.yul", - "bytecodeHash": "0x010003cb0d9a7fd2cd5a66c58de8f4a53b1b7e35eaaa18a73b6da4ac74e45f4e", - "sourceCodeHash": "0x492c3bae09bfa1016e848fcb8e914b56ac0638a21a55b3f13e403acb8f06ca38" + "bytecodeHash": "0x010003cb0617f94a9ef85b8d99ca605ad0a4d6307a27cc9e1f63bce4161274ad", + "sourceCodeHash": "0x5a83a36a9c32a275584bc1471fddce46468d361ad972a398ce94dafdd4095c15" }, { "contractName": "fee_estimate", "bytecodePath": "bootloader/build/artifacts/fee_estimate.yul.zbin", "sourceCodePath": "bootloader/build/fee_estimate.yul", - "bytecodeHash": "0x010009554a9569ee48f845ec9b0068714ff68b99f65764db567d4d3f2922f734", - "sourceCodeHash": "0x52a157b3320e621fda2ee069dcecdc7df466263db343bb4af054e6647c282790" + "bytecodeHash": "0x010009556abe078c6aa331ef2b4a253234a2fec2e253da04639e230e65d39d63", + "sourceCodeHash": "0xfbcf27dcb278cb19aa2830e1a060150bb7a70430f7453622c15df4e854db41a8" }, { "contractName": "gas_test", "bytecodePath": "bootloader/build/artifacts/gas_test.yul.zbin", "sourceCodePath": "bootloader/build/gas_test.yul", - "bytecodeHash": "0x010008db84b2abb44133921b7598dec788a7c8df0dc76a06da46e54a2ac0f422", - "sourceCodeHash": "0x027e26ad98372a45fae1d70ef9e1b4efcbf5bc51bd400de5c0ce5650d55b7b43" + "bytecodeHash": "0x010008dbc08ccbee5ed443a0b8b2478710c59eb2647d1d1a86c69cd815a54569", + "sourceCodeHash": "0xb266eb5395ec756fa3fd89faf065c1f0678704296585da37d87f70e71c3b9be1" }, { "contractName": "playground_batch", "bytecodePath": "bootloader/build/artifacts/playground_batch.yul.zbin", "sourceCodePath": "bootloader/build/playground_batch.yul", - "bytecodeHash": "0x0100095b12c6e008ba4e00bc8bddb609d99125d2bbdd423bcb377afc344729a0", - "sourceCodeHash": "0x1f3a2b06df0a4a4ddd8164e0542cb07e309a51408bd21ff6ecfa1df3aea47cbb" + "bytecodeHash": "0x0100095be2849088e6c70607dfe687563aba539bc1e576b68c9f719847791bba", + "sourceCodeHash": "0xb2481246d5c6c4b82fb361b7559d14e3374111946a603288b36dfa491bb462a4" }, { "contractName": "proved_batch", "bytecodePath": "bootloader/build/artifacts/proved_batch.yul.zbin", "sourceCodePath": "bootloader/build/proved_batch.yul", - "bytecodeHash": "0x010008eb70b467979695d3f240d8db04b1b179dd02c0d7fd45a027fb4bd9ecaf", - "sourceCodeHash": "0x310e9a53b96b1861fee5eff8f4e338f88005a7d0012068fb0ee7f1b5476e5d96" + "bytecodeHash": "0x010008eb5b4e5f60e1a9a6ef185290ea38081796c84ebb84901eca32f0b94793", + "sourceCodeHash": "0xe47787d4d1f883a021054eaee00d7fb4f0ef7613b5fde99f2cd1c58f5cb9354f" } ]