From dccc114255b142628d0ec9c8cd2e7be4e68eea4b Mon Sep 17 00:00:00 2001 From: Stanislav Bezkorovainyi Date: Fri, 6 Sep 2024 13:48:41 +0200 Subject: [PATCH 1/2] Remove most info from relayed L1->GW priority ops (#775) --- .../contracts/bridgehub/Bridgehub.sol | 12 +---- .../contracts/bridgehub/IBridgehub.sol | 4 +- .../chain-deps/facets/Getters.sol | 6 +-- .../chain-deps/facets/Mailbox.sol | 27 ++++------ .../facets/ZkSyncHyperchainBase.sol | 14 ++++- .../chain-interfaces/IMailbox.sol | 20 +++---- .../foundry/integration/GatewayTests.t.sol | 21 +------- .../script-out/output-deploy-l1.toml | 52 +++++++++---------- 8 files changed, 64 insertions(+), 92 deletions(-) diff --git a/l1-contracts/contracts/bridgehub/Bridgehub.sol b/l1-contracts/contracts/bridgehub/Bridgehub.sol index 8eaa029ec..77185fb50 100644 --- a/l1-contracts/contracts/bridgehub/Bridgehub.sol +++ b/l1-contracts/contracts/bridgehub/Bridgehub.sol @@ -22,7 +22,6 @@ import {BridgehubL2TransactionRequest, L2Message, L2Log, TxStatus} from "../comm import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; import {IMessageRoot} from "./IMessageRoot.sol"; import {ISTMDeploymentTracker} from "./ISTMDeploymentTracker.sol"; -import {L2CanonicalTransaction} from "../common/Messaging.sol"; import {HyperchainLimitReached, Unauthorized, STMAlreadyRegistered, STMNotRegistered, ZeroChainId, ChainIdTooBig, SharedBridgeNotSet, BridgeHubAlreadyRegistered, AddressTooLow, MsgValueMismatch, WrongMagicValue, ZeroAddress} from "../common/L1ContractErrors.sol"; /// @author Matter Labs @@ -567,25 +566,16 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus /// @notice Used to forward a transaction on the gateway to the chains mailbox (from L1). /// @param _chainId the chainId of the chain - /// @param _transaction the transaction to be forwarded - /// @param _factoryDeps the factory dependencies for the transaction /// @param _canonicalTxHash the canonical transaction hash /// @param _expirationTimestamp the expiration timestamp for the transaction function forwardTransactionOnGateway( uint256 _chainId, - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external override onlySettlementLayerRelayedSender { require(L1_CHAIN_ID != block.chainid, "BH: not in sync layer mode"); address hyperchain = hyperchainMap.get(_chainId); - IZkSyncHyperchain(hyperchain).bridgehubRequestL2TransactionOnGateway( - _transaction, - _factoryDeps, - _canonicalTxHash, - _expirationTimestamp - ); + IZkSyncHyperchain(hyperchain).bridgehubRequestL2TransactionOnGateway(_canonicalTxHash, _expirationTimestamp); } /// @notice forwards function call to Mailbox based on ChainId diff --git a/l1-contracts/contracts/bridgehub/IBridgehub.sol b/l1-contracts/contracts/bridgehub/IBridgehub.sol index 13f2cdb25..f57bef92a 100644 --- a/l1-contracts/contracts/bridgehub/IBridgehub.sol +++ b/l1-contracts/contracts/bridgehub/IBridgehub.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.21; import {IL1AssetRouter} from "../bridge/interfaces/IL1AssetRouter.sol"; -import {L2CanonicalTransaction, L2Message, L2Log, TxStatus} from "../common/Messaging.sol"; +import {L2Message, L2Log, TxStatus} from "../common/Messaging.sol"; import {IL1AssetHandler} from "../bridge/interfaces/IL1AssetHandler.sol"; import {ISTMDeploymentTracker} from "./ISTMDeploymentTracker.sol"; import {IMessageRoot} from "./IMessageRoot.sol"; @@ -206,8 +206,6 @@ interface IBridgehub is IL1AssetHandler { function forwardTransactionOnGateway( uint256 _chainId, - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external; diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol index 7542c63fe..a7e272313 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Getters.sol @@ -107,11 +107,7 @@ contract GettersFacet is ZkSyncHyperchainBase, IGetters, ILegacyGetters { /// @inheritdoc IGetters function getTotalPriorityTxs() external view returns (uint256) { - if (s.priorityQueue.getFirstUnprocessedPriorityTx() >= s.priorityTree.startIndex) { - return s.priorityTree.getTotalPriorityTxs(); - } else { - return s.priorityQueue.getTotalPriorityTxs(); - } + return _getTotalPriorityTxs(); } /// @inheritdoc IGetters diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol index 516b686a0..b9c33d023 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/Mailbox.sol @@ -366,8 +366,6 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { /// @inheritdoc IMailbox function requestL2TransactionToGatewayMailbox( uint256 _chainId, - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external override onlyL1 returns (bytes32 canonicalTxHash) { @@ -379,8 +377,6 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { BridgehubL2TransactionRequest memory wrappedRequest = _wrapRequest({ _chainId: _chainId, - _transaction: _transaction, - _factoryDeps: _factoryDeps, _canonicalTxHash: _canonicalTxHash, _expirationTimestamp: _expirationTimestamp }); @@ -389,25 +385,22 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { /// @inheritdoc IMailbox function bridgehubRequestL2TransactionOnGateway( - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external override onlyBridgehub { - _writePriorityOp(_transaction, _factoryDeps, _canonicalTxHash, _expirationTimestamp); + _writePriorityOpHash(_canonicalTxHash, _expirationTimestamp); + emit NewRelayedPriorityTransaction(_getTotalPriorityTxs(), _canonicalTxHash, _expirationTimestamp); } function _wrapRequest( uint256 _chainId, - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) internal view returns (BridgehubL2TransactionRequest memory) { // solhint-disable-next-line func-named-parameters bytes memory data = abi.encodeCall( IBridgehub(s.bridgehub).forwardTransactionOnGateway, - (_chainId, _transaction, _factoryDeps, _canonicalTxHash, _expirationTimestamp) + (_chainId, _canonicalTxHash, _expirationTimestamp) ); return BridgehubL2TransactionRequest({ @@ -494,8 +487,6 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { // slither-disable-next-line unused-return IMailbox(s.settlementLayer).requestL2TransactionToGatewayMailbox({ _chainId: s.chainId, - _transaction: transaction, - _factoryDeps: _params.request.factoryDeps, _canonicalTxHash: canonicalTxHash, _expirationTimestamp: _params.expirationTimestamp }); @@ -571,6 +562,14 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) internal { + _writePriorityOpHash(_canonicalTxHash, _expirationTimestamp); + + // Data that is needed for the operator to simulate priority queue offchain + // solhint-disable-next-line func-named-parameters + emit NewPriorityRequest(_transaction.nonce, _canonicalTxHash, _expirationTimestamp, _transaction, _factoryDeps); + } + + function _writePriorityOpHash(bytes32 _canonicalTxHash, uint64 _expirationTimestamp) internal { if (s.priorityTree.startIndex > s.priorityQueue.getFirstUnprocessedPriorityTx()) { s.priorityQueue.pushBack( PriorityOperation({ @@ -581,10 +580,6 @@ contract MailboxFacet is ZkSyncHyperchainBase, IMailbox { ); } s.priorityTree.push(_canonicalTxHash); - - // Data that is needed for the operator to simulate priority queue offchain - // solhint-disable-next-line func-named-parameters - emit NewPriorityRequest(_transaction.nonce, _canonicalTxHash, _expirationTimestamp, _transaction, _factoryDeps); } /// @notice Hashes the L2 bytecodes and returns them in the format in which they are processed by the bootloader diff --git a/l1-contracts/contracts/state-transition/chain-deps/facets/ZkSyncHyperchainBase.sol b/l1-contracts/contracts/state-transition/chain-deps/facets/ZkSyncHyperchainBase.sol index 0910fcab3..8c7674e91 100644 --- a/l1-contracts/contracts/state-transition/chain-deps/facets/ZkSyncHyperchainBase.sol +++ b/l1-contracts/contracts/state-transition/chain-deps/facets/ZkSyncHyperchainBase.sol @@ -4,13 +4,17 @@ pragma solidity 0.8.24; import {ZkSyncHyperchainStorage} from "../ZkSyncHyperchainStorage.sol"; import {ReentrancyGuard} from "../../../common/ReentrancyGuard.sol"; - +import {PriorityQueue} from "../../libraries/PriorityQueue.sol"; +import {PriorityTree} from "../../libraries/PriorityTree.sol"; import {Unauthorized} from "../../../common/L1ContractErrors.sol"; /// @title Base contract containing functions accessible to the other facets. /// @author Matter Labs /// @custom:security-contact security@matterlabs.dev contract ZkSyncHyperchainBase is ReentrancyGuard { + using PriorityQueue for PriorityQueue.Queue; + using PriorityTree for PriorityTree.Tree; + // slither-disable-next-line uninitialized-state ZkSyncHyperchainStorage internal s; @@ -64,4 +68,12 @@ contract ZkSyncHyperchainBase is ReentrancyGuard { } _; } + + function _getTotalPriorityTxs() internal view returns (uint256) { + if (s.priorityQueue.getFirstUnprocessedPriorityTx() >= s.priorityTree.startIndex) { + return s.priorityTree.getTotalPriorityTxs(); + } else { + return s.priorityQueue.getTotalPriorityTxs(); + } + } } diff --git a/l1-contracts/contracts/state-transition/chain-interfaces/IMailbox.sol b/l1-contracts/contracts/state-transition/chain-interfaces/IMailbox.sol index 5b61101fc..426c985b4 100644 --- a/l1-contracts/contracts/state-transition/chain-interfaces/IMailbox.sol +++ b/l1-contracts/contracts/state-transition/chain-interfaces/IMailbox.sol @@ -101,23 +101,14 @@ interface IMailbox is IZkSyncHyperchainBase { ) external returns (bytes32 canonicalTxHash); /// @dev On the Gateway the chain's mailbox receives the tx from the bridgehub. - function bridgehubRequestL2TransactionOnGateway( - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, - bytes32 _canonicalTxHash, - uint64 _expirationTimestamp - ) external; + function bridgehubRequestL2TransactionOnGateway(bytes32 _canonicalTxHash, uint64 _expirationTimestamp) external; /// @dev On L1 we have to forward to the Gateway's mailbox which sends to the Bridgehub on the Gw /// @param _chainId the chainId of the chain - /// @param _transaction the transaction to be relayed - /// @param _factoryDeps the factory dependencies /// @param _canonicalTxHash the canonical transaction hash /// @param _expirationTimestamp the expiration timestamp function requestL2TransactionToGatewayMailbox( uint256 _chainId, - L2CanonicalTransaction calldata _transaction, - bytes[] calldata _factoryDeps, bytes32 _canonicalTxHash, uint64 _expirationTimestamp ) external returns (bytes32 canonicalTxHash); @@ -175,4 +166,13 @@ interface IMailbox is IZkSyncHyperchainBase { L2CanonicalTransaction transaction, bytes[] factoryDeps ); + + /// @notice New relayed priority request event. It is emitted on a chain that is deployed + /// on top of the gateway when it receives a request relayed via the Bridgehub. + /// @dev IMPORTANT: this event most likely will be removed in the future, so + /// no one should rely on it for indexing purposes. + /// @param txId Serial number of the priority operation + /// @param txHash keccak256 hash of encoded transaction representation + /// @param expirationTimestamp Timestamp up to which priority request should be processed + event NewRelayedPriorityTransaction(uint256 txId, bytes32 txHash, uint64 expirationTimestamp); } diff --git a/l1-contracts/test/foundry/integration/GatewayTests.t.sol b/l1-contracts/test/foundry/integration/GatewayTests.t.sol index 496b81ad1..444eeb7e8 100644 --- a/l1-contracts/test/foundry/integration/GatewayTests.t.sol +++ b/l1-contracts/test/foundry/integration/GatewayTests.t.sol @@ -141,28 +141,9 @@ contract GatewayTests is L1ContractDeployer, HyperchainDeployer, TokenDeployer, finishMoveChain(); IBridgehub bridgehub = IBridgehub(l1Script.getBridgehubProxyAddress()); - L2CanonicalTransaction memory tx = L2CanonicalTransaction({ - txType: 255, - from: uint256(0), - to: uint256(0), - gasLimit: 72000000, - gasPerPubdataByteLimit: 800, - maxFeePerGas: 1, - maxPriorityFeePerGas: 0, - paymaster: 0, - // Note, that the priority operation id is used as "nonce" for L1->L2 transactions - nonce: 0, - value: 0, - reserved: [uint256(0), 0, 0, 0], - data: "0x", - signature: new bytes(0), - factoryDeps: new uint256[](0), - paymasterInput: "0x", - reservedDynamic: "0x" - }); vm.chainId(12345); vm.startBroadcast(SETTLEMENT_LAYER_RELAY_SENDER); - bridgehub.forwardTransactionOnGateway(mintChainId, tx, new bytes[](0), bytes32(0), 0); + bridgehub.forwardTransactionOnGateway(mintChainId, bytes32(0), 0); vm.stopBroadcast(); } diff --git a/l1-contracts/test/foundry/integration/deploy-scripts/script-out/output-deploy-l1.toml b/l1-contracts/test/foundry/integration/deploy-scripts/script-out/output-deploy-l1.toml index dba974302..4212eceab 100644 --- a/l1-contracts/test/foundry/integration/deploy-scripts/script-out/output-deploy-l1.toml +++ b/l1-contracts/test/foundry/integration/deploy-scripts/script-out/output-deploy-l1.toml @@ -2,13 +2,13 @@ create2_factory_addr = "0x4e59b44847b379578588920cA78FbF26c0B4956C" create2_factory_salt = "0x00000000000000000000000000000000000000000000000000000000000000ff" deployer_addr = "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496" era_chain_id = 9 -force_deployments_data = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000002a006c0107302b929bfaa26e37f1f16425630f553e88f5d300b535ae7a1a8235f8d00000000000000000000000000000000000000000000000000000000000100020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010e00000000000000000000000081aa7970c51812dc3a010c7d01b50e0d17dc8ad979ed796c3d846e1b70fae457404e519165deaa186a5f2357eeb1aef830c86b9600000000000000000000000000000000000000000000000000000000000100030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010e000000000000000000000000000000000000000000000000000000000000000900000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000000000000000000000000000000000000000000001629ac8f4a74ebd8df4688cdedcfe5120809a334ecdc277c65e30475a8ed6616100000000000000000000000000000000000000000000000000000000000100040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010e00000000000000000000000081aa7970c51812dc3a010c7d01b50e0d17dc8ad9349c400bc5cef9910dcd7cd1328960b14d2c095f0e5d26c14f4f8a467160578500000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c800000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000000000000000000000000000000000000000000000" +force_deployments_data = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000044016be2c4df653dc16d4f32b0da783b6ffcb4b9f102604d126f3ce7927d739f36c00000000000000000000000000000000000000000000000000000000000100020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010e00000000000000000000000081aa7970c51812dc3a010c7d01b50e0d17dc8ad9447bf69c0e623e1365f68b9682081c8aaf2005f3346a6bb9df35dc505c91cbbc00000000000000000000000000000000000000000000000000000000000100030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010e000000000000000000000000000000000000000000000000000000000000000900000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000000000000000000000000000000000000000000001542f9245b27fa8a082741b6727b86d24c07131b4afdfb66bba0b75c767bf668500000000000000000000000000000000000000000000000000000000000100040000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010e00000000000000000000000081aa7970c51812dc3a010c7d01b50e0d17dc8ad9554b5e8820768894caf758e182b80205d2a55d217795c711cc044cf83539f66000000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c800000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c800000000000000000000000000000000000000000000000000000000000000001fc36471c3e2b43168f0632490d41dc71e347fcc2b3068bbf03276e9dd6cbb5b00000000000000000000000000000000000000000000000000000000000100050000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000010002" l1_chain_id = 31337 -multicall3_addr = "0x75ACdD102012453c342E06b01365a58d1108BbDB" +multicall3_addr = "0xb4CA672635D5E33C2725B4F250Dc5D3BFC489469" owner_address = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" [contracts_config] -diamond_cut_data = "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000b98c82863a46c019895d8a241b177b47080be2d20000000000000000000000000000000000000000000000000000000000000d6000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000bc0000000000000000000000000ee3aa46ce7a642b7bf9b72ea773cfde0163dec1500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000130e18b681000000000000000000000000000000000000000000000000000000001733894500000000000000000000000000000000000000000000000000000000fc57565f000000000000000000000000000000000000000000000000000000001cc5d1030000000000000000000000000000000000000000000000000000000021f603d700000000000000000000000000000000000000000000000000000000235d9eb50000000000000000000000000000000000000000000000000000000027ae4c16000000000000000000000000000000000000000000000000000000002878fe74000000000000000000000000000000000000000000000000000000003f42d5dd0000000000000000000000000000000000000000000000000000000041cf49bb000000000000000000000000000000000000000000000000000000004623c91d000000000000000000000000000000000000000000000000000000004dd18bf5000000000000000000000000000000000000000000000000000000006223258e0000000000000000000000000000000000000000000000000000000064b554ad0000000000000000000000000000000000000000000000000000000064bf8d6600000000000000000000000000000000000000000000000000000000a9f6d94100000000000000000000000000000000000000000000000000000000b784610700000000000000000000000000000000000000000000000000000000be6f11cf00000000000000000000000000000000000000000000000000000000e76db8650000000000000000000000000000000000000000000000000000000000000000000000000000000088645d63e8477437a1506784acbfa8bc1f77c1b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002d06d49e5b00000000000000000000000000000000000000000000000000000000086a56f8000000000000000000000000000000000000000000000000000000000ec6b0b700000000000000000000000000000000000000000000000000000000fe26699e0000000000000000000000000000000000000000000000000000000018e3a941000000000000000000000000000000000000000000000000000000001de72e340000000000000000000000000000000000000000000000000000000029b98c670000000000000000000000000000000000000000000000000000000033ce93fe000000000000000000000000000000000000000000000000000000003408e470000000000000000000000000000000000000000000000000000000003591c1a000000000000000000000000000000000000000000000000000000000396073820000000000000000000000000000000000000000000000000000000039d7d4aa0000000000000000000000000000000000000000000000000000000046657fe90000000000000000000000000000000000000000000000000000000052ef6b2c000000000000000000000000000000000000000000000000000000005518c73b000000000000000000000000000000000000000000000000000000005a59033500000000000000000000000000000000000000000000000000000000631f4bac000000000000000000000000000000000000000000000000000000006a27e8b5000000000000000000000000000000000000000000000000000000006e9960c30000000000000000000000000000000000000000000000000000000074f4d30d0000000000000000000000000000000000000000000000000000000079823c9a000000000000000000000000000000000000000000000000000000007a0ed627000000000000000000000000000000000000000000000000000000007b30c8da00000000000000000000000000000000000000000000000000000000960dcf240000000000000000000000000000000000000000000000000000000098acd7a6000000000000000000000000000000000000000000000000000000009cd939e4000000000000000000000000000000000000000000000000000000009d1b5a8100000000000000000000000000000000000000000000000000000000a1954fc500000000000000000000000000000000000000000000000000000000adfca15e00000000000000000000000000000000000000000000000000000000af6a2dcd00000000000000000000000000000000000000000000000000000000b22dd78e00000000000000000000000000000000000000000000000000000000b8c2f66f00000000000000000000000000000000000000000000000000000000bd7c541200000000000000000000000000000000000000000000000000000000c3bbd2d700000000000000000000000000000000000000000000000000000000cdffacc600000000000000000000000000000000000000000000000000000000d046815600000000000000000000000000000000000000000000000000000000d86970d800000000000000000000000000000000000000000000000000000000db1f0bf900000000000000000000000000000000000000000000000000000000e5355c7500000000000000000000000000000000000000000000000000000000e81e0ba100000000000000000000000000000000000000000000000000000000ea6c029c00000000000000000000000000000000000000000000000000000000ef3f0bae00000000000000000000000000000000000000000000000000000000f5c1182c00000000000000000000000000000000000000000000000000000000facd743b00000000000000000000000000000000000000000000000000000000fd791f3c00000000000000000000000000000000000000000000000000000000000000000000000000000000d5bd18e281e0093b2dc67f4e9296b6a29f9a09b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b042901c70000000000000000000000000000000000000000000000000000000012f43dab0000000000000000000000000000000000000000000000000000000013f3756e00000000000000000000000000000000000000000000000000000000eb67241900000000000000000000000000000000000000000000000000000000263b7f8e000000000000000000000000000000000000000000000000000000006c0960f9000000000000000000000000000000000000000000000000000000007efda2ae00000000000000000000000000000000000000000000000000000000b473318e00000000000000000000000000000000000000000000000000000000dc8cc04600000000000000000000000000000000000000000000000000000000e4948f4300000000000000000000000000000000000000000000000000000000e717bab700000000000000000000000000000000000000000000000000000000000000000000000000000000b873183bf3f7af16138a74816b26a14a6ef2c2b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000400a22e22000000000000000000000000000000000000000000000000000000000f23da4300000000000000000000000000000000000000000000000000000000c37533bb000000000000000000000000000000000000000000000000000000006edd4f120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000a3a0db4be1c102227fc9037a82af66f8dc8fb41f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c4b400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000001d4c00000000000000000000000000000000000000000000000000000000004c4b40000000000000000000000000000000000000000000000000000000000000182b8000000000000000000000000000000000000000000000000000000000ee6b280000000000000000000000000a4cb26d6933d2c3e76718d30de8547bcdf8dd241" +diamond_cut_data = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000600000000000000000000000009b6fd93a7da534e2ed9c0752c8927653e70b01150000000000000000000000000000000000000000000000000000000000000d6000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000009c00000000000000000000000000000000000000000000000000000000000000bc00000000000000000000000009bc4b812a24e04455b611966e192bd866451db2300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000130e18b681000000000000000000000000000000000000000000000000000000001733894500000000000000000000000000000000000000000000000000000000fc57565f000000000000000000000000000000000000000000000000000000001cc5d1030000000000000000000000000000000000000000000000000000000021f603d700000000000000000000000000000000000000000000000000000000235d9eb50000000000000000000000000000000000000000000000000000000027ae4c16000000000000000000000000000000000000000000000000000000002878fe74000000000000000000000000000000000000000000000000000000003f42d5dd0000000000000000000000000000000000000000000000000000000041cf49bb000000000000000000000000000000000000000000000000000000004623c91d000000000000000000000000000000000000000000000000000000004dd18bf5000000000000000000000000000000000000000000000000000000006223258e0000000000000000000000000000000000000000000000000000000064b554ad0000000000000000000000000000000000000000000000000000000064bf8d6600000000000000000000000000000000000000000000000000000000a9f6d94100000000000000000000000000000000000000000000000000000000b784610700000000000000000000000000000000000000000000000000000000be6f11cf00000000000000000000000000000000000000000000000000000000e76db86500000000000000000000000000000000000000000000000000000000000000000000000000000000429df21d6d3d9a127b98bbe4115ea15ab7b4e409000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002d06d49e5b00000000000000000000000000000000000000000000000000000000086a56f8000000000000000000000000000000000000000000000000000000000ec6b0b700000000000000000000000000000000000000000000000000000000fe26699e0000000000000000000000000000000000000000000000000000000018e3a941000000000000000000000000000000000000000000000000000000001de72e340000000000000000000000000000000000000000000000000000000029b98c670000000000000000000000000000000000000000000000000000000033ce93fe000000000000000000000000000000000000000000000000000000003408e470000000000000000000000000000000000000000000000000000000003591c1a000000000000000000000000000000000000000000000000000000000396073820000000000000000000000000000000000000000000000000000000039d7d4aa0000000000000000000000000000000000000000000000000000000046657fe90000000000000000000000000000000000000000000000000000000052ef6b2c000000000000000000000000000000000000000000000000000000005518c73b000000000000000000000000000000000000000000000000000000005a59033500000000000000000000000000000000000000000000000000000000631f4bac000000000000000000000000000000000000000000000000000000006a27e8b5000000000000000000000000000000000000000000000000000000006e9960c30000000000000000000000000000000000000000000000000000000074f4d30d0000000000000000000000000000000000000000000000000000000079823c9a000000000000000000000000000000000000000000000000000000007a0ed627000000000000000000000000000000000000000000000000000000007b30c8da00000000000000000000000000000000000000000000000000000000960dcf240000000000000000000000000000000000000000000000000000000098acd7a6000000000000000000000000000000000000000000000000000000009cd939e4000000000000000000000000000000000000000000000000000000009d1b5a8100000000000000000000000000000000000000000000000000000000a1954fc500000000000000000000000000000000000000000000000000000000adfca15e00000000000000000000000000000000000000000000000000000000af6a2dcd00000000000000000000000000000000000000000000000000000000b22dd78e00000000000000000000000000000000000000000000000000000000b8c2f66f00000000000000000000000000000000000000000000000000000000bd7c541200000000000000000000000000000000000000000000000000000000c3bbd2d700000000000000000000000000000000000000000000000000000000cdffacc600000000000000000000000000000000000000000000000000000000d046815600000000000000000000000000000000000000000000000000000000d86970d800000000000000000000000000000000000000000000000000000000db1f0bf900000000000000000000000000000000000000000000000000000000e5355c7500000000000000000000000000000000000000000000000000000000e81e0ba100000000000000000000000000000000000000000000000000000000ea6c029c00000000000000000000000000000000000000000000000000000000ef3f0bae00000000000000000000000000000000000000000000000000000000f5c1182c00000000000000000000000000000000000000000000000000000000facd743b00000000000000000000000000000000000000000000000000000000fd791f3c000000000000000000000000000000000000000000000000000000000000000000000000000000008d1a32b054862e63baab0381cd000d7c75c5bcd6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000b042901c70000000000000000000000000000000000000000000000000000000012f43dab00000000000000000000000000000000000000000000000000000000eb67241900000000000000000000000000000000000000000000000000000000263b7f8e000000000000000000000000000000000000000000000000000000006c0960f9000000000000000000000000000000000000000000000000000000007efda2ae00000000000000000000000000000000000000000000000000000000b473318e00000000000000000000000000000000000000000000000000000000d077255100000000000000000000000000000000000000000000000000000000ddcc9eec00000000000000000000000000000000000000000000000000000000e4948f4300000000000000000000000000000000000000000000000000000000e717bab700000000000000000000000000000000000000000000000000000000000000000000000000000000905fe79f61bcee0d2335f83679e423c3f3eae389000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000400a22e22000000000000000000000000000000000000000000000000000000000f23da4300000000000000000000000000000000000000000000000000000000c37533bb000000000000000000000000000000000000000000000000000000006edd4f120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000064fd27c7082f2f3e4f8629977eab095b82ddc422000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c4b400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000001d4c00000000000000000000000000000000000000000000000000000000004c4b40000000000000000000000000000000000000000000000000000000000000182b8000000000000000000000000000000000000000000000000000000000ee6b280000000000000000000000000a4cb26d6933d2c3e76718d30de8547bcdf8dd241" diamond_init_batch_overhead_l1_gas = 1000000 diamond_init_max_l2_gas_per_batch = 80000000 diamond_init_max_pubdata_per_batch = 120000 @@ -23,34 +23,34 @@ recursion_node_level_vk_hash = "0x0000000000000000000000000000000000000000000000 [deployed_addresses] blob_versioned_hash_retriever_addr = "0xA4cB26d6933D2c3E76718D30de8547bCDF8dD241" -governance_addr = "0xd5Fb39C4d0167d6C6D384d7e8962423a8A9BC9F4" -native_token_vault_addr = "0x84449FFBC89C6BF0Ba5B71E3AC6A6C3dFD0A33F3" +governance_addr = "0x4c1B68B9aA94AfA75e614900315c19fA6711a44D" +native_token_vault_addr = "0x33421CD52DBE336fED66308B3782ff0D498ab728" transparent_proxy_admin_addr = "0xD718d5A27a29FF1cD22403426084bA0d479869a0" -validator_timelock_addr = "0xb90B836643Def03F00727D7e8Fd331EEC8Ec0adf" +validator_timelock_addr = "0x7fa73029C36063f9768A9c1b77b1C2b535775C1b" [deployed_addresses.bridgehub] -bridgehub_implementation_addr = "0x8D94C2Af67a96B40572b132ac3C3d8D869247204" -bridgehub_proxy_addr = "0x7D94E8030A23ED1cAEa46Dd6642Acdfe03a7F893" -message_root_implementation_addr = "0x00D6289936efaC8764eF18DEab970a2CaF4DA69d" -message_root_proxy_addr = "0xC76A3ee1eC86E3C3776aAe3BFeF69be37B4DAc4C" -stm_deployment_tracker_implementation_addr = "0x4F3f1278301A2FE7A29636C03653F63Fbc22123a" -stm_deployment_tracker_proxy_addr = "0x09742A20490b2d9D1df9E94bFbd8026fcD349CBb" +bridgehub_implementation_addr = "0xE59b6138A1E46380E9Ce0ef0F8FdbF0e9203F494" +bridgehub_proxy_addr = "0x4455192400dfCcEE887dC9CDAEEd59cCB4EeE8d4" +message_root_implementation_addr = "0xFb4701313b2d2B0AB4666E37a6b00F3e04B36299" +message_root_proxy_addr = "0x444c0EEd508E6dA7c951f7844F0bC44c0BCbf423" +stm_deployment_tracker_implementation_addr = "0xcF8c2AE6072dB4dCc31890723e5a41616B79e603" +stm_deployment_tracker_proxy_addr = "0x5A465c55c9Db2D8182F9E57d674820E146DbF6E9" [deployed_addresses.bridges] -erc20_bridge_implementation_addr = "0xdA583c78dDA194421aA45779026A097A2e6d963c" -erc20_bridge_proxy_addr = "0x8944BCDc7A23550C9bc290B197a3FF67BE18D31e" -shared_bridge_implementation_addr = "0x4E4020D1ea4B4c7EAe0267a9a00c81f2168ceA09" -shared_bridge_proxy_addr = "0x384DBe7285f29beb705E51B19f350EC6d718967E" +erc20_bridge_implementation_addr = "0xdf264da18b3E0c85b93e366C6458D8e81E87c150" +erc20_bridge_proxy_addr = "0x35eA6514dFEB8906C3b271ea23dB225517534aC1" +shared_bridge_implementation_addr = "0x7DF37de2F2BB652526aFf70636D40bD00ab476Eb" +shared_bridge_proxy_addr = "0x18cB271e64E4E3b8916c2510840DeDB6c353408B" [deployed_addresses.state_transition] -admin_facet_addr = "0xeE3aa46ce7A642B7bF9B72eA773cFDe0163DEc15" -default_upgrade_addr = "0xDa3532D626dEAa25420fa61EA84f328622da5E62" -diamond_init_addr = "0xB98c82863A46c019895D8A241B177b47080Be2D2" +admin_facet_addr = "0x9bc4B812a24E04455B611966E192bd866451db23" +default_upgrade_addr = "0x6833C753cB05aBB077D32bF86e1b8fa15f92BF05" +diamond_init_addr = "0x9B6FD93A7DA534E2Ed9C0752C8927653E70B0115" diamond_proxy_addr = "0x0000000000000000000000000000000000000000" -executor_facet_addr = "0xB873183BF3f7AF16138A74816B26a14a6Ef2C2B8" -genesis_upgrade_addr = "0x43Dc0bb98dFF37Db24808531838d73a0bc75dbEA" -getters_facet_addr = "0x88645D63e8477437a1506784aCbfa8bC1F77C1B8" -mailbox_facet_addr = "0xd5BD18e281e0093B2Dc67f4e9296B6a29F9a09b8" -state_transition_implementation_addr = "0x3cB743a54C47A7fCD41ade062207dC4503C4b8aB" -state_transition_proxy_addr = "0x71dC224e61EC6f1293Ff990dc0D31235a25EEC60" -verifier_addr = "0xa3a0Db4Be1c102227Fc9037A82aF66F8Dc8fb41F" +executor_facet_addr = "0x905fE79F61BCee0D2335f83679E423c3F3eae389" +genesis_upgrade_addr = "0x0fc0378c54E8783D9d979136aF89e0A56BceB247" +getters_facet_addr = "0x429dF21D6d3D9a127b98bbE4115EA15ab7B4e409" +mailbox_facet_addr = "0x8D1A32B054862e63bAaB0381CD000D7c75c5Bcd6" +state_transition_implementation_addr = "0x687908B2E1c5093fe888C250eBE6AA05CD98df80" +state_transition_proxy_addr = "0xF87Fc118957db8f843ab031b213f7635EaaaB74B" +verifier_addr = "0x64Fd27c7082F2f3E4F8629977eaB095b82ddC422" From 23f5e3c142d174245758f92edbdecf97aec32ebf Mon Sep 17 00:00:00 2001 From: Stanislav Breadless Date: Fri, 6 Sep 2024 14:11:56 +0200 Subject: [PATCH 2/2] fmt --- l1-contracts/contracts/bridgehub/Bridgehub.sol | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/l1-contracts/contracts/bridgehub/Bridgehub.sol b/l1-contracts/contracts/bridgehub/Bridgehub.sol index ea9ef1500..262d4c148 100644 --- a/l1-contracts/contracts/bridgehub/Bridgehub.sol +++ b/l1-contracts/contracts/bridgehub/Bridgehub.sol @@ -577,10 +577,7 @@ contract Bridgehub is IBridgehub, ReentrancyGuard, Ownable2StepUpgradeable, Paus ) external override onlySettlementLayerRelayedSender { require(L1_CHAIN_ID != block.chainid, "BH: not in sync layer mode"); address zkChain = zkChainMap.get(_chainId); - IZKChain(zkChain).bridgehubRequestL2TransactionOnGateway( - _canonicalTxHash, - _expirationTimestamp - ); + IZKChain(zkChain).bridgehubRequestL2TransactionOnGateway(_canonicalTxHash, _expirationTimestamp); } /// @notice forwards function call to Mailbox based on ChainId