diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index bd6b9237cdd0..5a0e1cf7cdff 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -140,7 +140,7 @@ jobs: ci_run cat /tmp/sccache_log.txt || true integration: - name: Integration (consensus=${{ matrix.consensus }}, base_token=${{ matrix.base_token }}, sync_layer = ${{ matrix.sync_layer }}) + name: Integration (consensus=${{ matrix.consensus }}, base_token=${{ matrix.base_token }}, gateway = ${{ matrix.gateway }}) strategy: # In matrix jobs, fail-fast is true by default. # To be consistent with the rest of the workflow we disable it explicitly. @@ -151,7 +151,7 @@ jobs: # FIXME: support custom tokens base_token: ["Eth"] # FIXME: run tests even when not using synclayer - sync_layer: [true] + gateway: [true] env: SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,da_dispatcher${{ matrix.consensus && ',consensus' || '' }}${{ matrix.base_token == 'Custom' && ',base_token_ratio_persister' || '' }}" diff --git a/contracts b/contracts index 2b3d4af22ab5..8534b30112c2 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 2b3d4af22ab50625db6f24df659b0bd1f10ce036 +Subproject commit 8534b30112c24ab6339db77fe6d484b87b1ec072 diff --git a/core/lib/contracts/src/lib.rs b/core/lib/contracts/src/lib.rs index 020b26c08da0..dfce1bc7b22f 100644 --- a/core/lib/contracts/src/lib.rs +++ b/core/lib/contracts/src/lib.rs @@ -415,10 +415,10 @@ impl BaseSystemContracts { BaseSystemContracts::load_with_bootloader(bootloader_bytecode) } - pub fn playground_sync_layer() -> Self { + pub fn playground_gateway() -> Self { let bootloader_bytecode = read_zbin_bytecode( "contracts/system-contracts/bootloader/build/artifacts/playground_batch.yul.zbin", - // "etc/multivm_bootloaders/vm_sync_layer/playground_batch.yul/playground_batch.yul.zbin", + // "etc/multivm_bootloaders/vm_gateway/playground_batch.yul/playground_batch.yul.zbin", ); BaseSystemContracts::load_with_bootloader(bootloader_bytecode) } @@ -486,10 +486,10 @@ impl BaseSystemContracts { BaseSystemContracts::load_with_bootloader(bootloader_bytecode) } - pub fn estimate_gas_sync_layer() -> Self { + pub fn estimate_gas_gateway() -> Self { let bootloader_bytecode = read_zbin_bytecode( "contracts/system-contracts/bootloader/build/artifacts/fee_estimate.yul.zbin", - // "etc/multivm_bootloaders/vm_sync_layer/fee_estimate.yul/fee_estimate.yul.zbin", + // "etc/multivm_bootloaders/vm_gateway/fee_estimate.yul/fee_estimate.yul.zbin", ); BaseSystemContracts::load_with_bootloader(bootloader_bytecode) } diff --git a/core/node/api_server/src/tx_sender/mod.rs b/core/node/api_server/src/tx_sender/mod.rs index 5a1c39109039..afe71dfb4d14 100644 --- a/core/node/api_server/src/tx_sender/mod.rs +++ b/core/node/api_server/src/tx_sender/mod.rs @@ -108,7 +108,7 @@ pub struct MultiVMBaseSystemContracts { /// Contracts to be used after the 1.5.0 upgrade pub(crate) vm_1_5_0_increased_memory: BaseSystemContracts, /// Contracts to be used after the 1.5.0 upgrade - pub(crate) sync_layer: BaseSystemContracts, + pub(crate) gateway: BaseSystemContracts, } impl MultiVMBaseSystemContracts { @@ -138,7 +138,7 @@ impl MultiVMBaseSystemContracts { ProtocolVersionId::Version21 | ProtocolVersionId::Version22 => self.post_1_4_2, ProtocolVersionId::Version23 => self.vm_1_5_0_small_memory, ProtocolVersionId::Version24 => self.vm_1_5_0_increased_memory, - ProtocolVersionId::Version25 | ProtocolVersionId::Version26 => self.sync_layer, + ProtocolVersionId::Version25 | ProtocolVersionId::Version26 => self.gateway, } } } @@ -182,7 +182,7 @@ impl ApiContracts { vm_1_5_0_small_memory: BaseSystemContracts::estimate_gas_1_5_0_small_memory(), vm_1_5_0_increased_memory: BaseSystemContracts::estimate_gas_post_1_5_0_increased_memory(), - sync_layer: BaseSystemContracts::estimate_gas_sync_layer(), + gateway: BaseSystemContracts::estimate_gas_gateway(), }, eth_call: MultiVMBaseSystemContracts { pre_virtual_blocks: BaseSystemContracts::playground_pre_virtual_blocks(), @@ -196,7 +196,7 @@ impl ApiContracts { vm_1_5_0_small_memory: BaseSystemContracts::playground_1_5_0_small_memory(), vm_1_5_0_increased_memory: BaseSystemContracts::playground_post_1_5_0_increased_memory(), - sync_layer: BaseSystemContracts::playground_sync_layer(), + gateway: BaseSystemContracts::playground_gateway(), }, } } diff --git a/core/node/api_server/src/web3/namespaces/zks.rs b/core/node/api_server/src/web3/namespaces/zks.rs index b9263730c288..a8f1935af7d0 100644 --- a/core/node/api_server/src/web3/namespaces/zks.rs +++ b/core/node/api_server/src/web3/namespaces/zks.rs @@ -360,7 +360,7 @@ impl ZksNamespace { // Create a client for pinging the RPC. let client: Client = Client::http( - std::env::var("SYNC_LAYER_API_WEB3_JSON_RPC_HTTP_URL") + std::env::var("GATEWAY_API_WEB3_JSON_RPC_HTTP_URL") .unwrap() .parse() .unwrap(), diff --git a/etc/env/base/chain.toml b/etc/env/base/chain.toml index 8b9b20af9745..a4cf4325500f 100644 --- a/etc/env/base/chain.toml +++ b/etc/env/base/chain.toml @@ -90,8 +90,8 @@ fee_model_version = "V2" validation_computational_gas_limit = 300000 save_call_traces = true -bootloader_hash = "0x010008eb70b467979695d3f240d8db04b1b179dd02c0d7fd45a027fb4bd9ecaf" -default_aa_hash = "0x0100055de356de05b75c83195567a6688d9050a17b58ccc5c5c91d05cd2bfb6d" +bootloader_hash = "0x010008eb2ba1ec6290b553a401b9609363d9cc89796b3dd1aad8fb24cd88702e" +default_aa_hash = "0x0100055dbf6d8f56faa896e4cc8e987aa24aaaee5fe85fc17243d908b9b74f69" protective_reads_persistence_enabled = false diff --git a/etc/env/base/contracts.toml b/etc/env/base/contracts.toml index 27b81d90c9bb..560a6ec2f1c1 100644 --- a/etc/env/base/contracts.toml +++ b/etc/env/base/contracts.toml @@ -28,8 +28,8 @@ RECURSION_NODE_LEVEL_VK_HASH = "0x1186ec268d49f1905f8d9c1e9d39fc33e98c74f91d91a2 RECURSION_LEAF_LEVEL_VK_HASH = "0x101e08b00193e529145ee09823378ef51a3bc8966504064f1f6ba3f1ba863210" RECURSION_CIRCUITS_SET_VKS_HASH = "0x18c1639094f58177409186e8c48d9f577c9410901d2f1d486b3e7d6cf553ae4c" GENESIS_TX_HASH = "0xb99ebfea46cbe05a21cd80fe5597d97b204befc52a16303f579c607dc1ac2e2e" -GENESIS_ROOT = "0x53b2db8a7a5954757679b80a3403f077b7e1b8f398383a0075d95eadae08366c" -GENESIS_BATCH_COMMITMENT = "0x8933c43b571c2bd43bc73fbaaa2ea8de7e07fcedcbd58935400f1c18620c396f" +GENESIS_ROOT = "0x405ddf3e881479826ae5e09316adde62c0251510723570b7a26a0092d84a87d2" +GENESIS_BATCH_COMMITMENT = "0x97a8d80434646aa54503cf65a9b5282fb166399af69e7bb43c95b2587657ef28" PRIORITY_TX_MAX_GAS_LIMIT = 72000000 DEPLOY_L2_BRIDGE_COUNTERPART_GAS_LIMIT = 10000000 GENESIS_ROLLUP_LEAF_INDEX = "71" diff --git a/etc/multivm_bootloaders/vm_sync_layer/fee_estimate.yul/fee_estimate.yul.zbin b/etc/multivm_bootloaders/vm_gateway/fee_estimate.yul/fee_estimate.yul.zbin similarity index 100% rename from etc/multivm_bootloaders/vm_sync_layer/fee_estimate.yul/fee_estimate.yul.zbin rename to etc/multivm_bootloaders/vm_gateway/fee_estimate.yul/fee_estimate.yul.zbin diff --git a/etc/multivm_bootloaders/vm_sync_layer/gas_test.yul/gas_test.yul.zbin b/etc/multivm_bootloaders/vm_gateway/gas_test.yul/gas_test.yul.zbin similarity index 100% rename from etc/multivm_bootloaders/vm_sync_layer/gas_test.yul/gas_test.yul.zbin rename to etc/multivm_bootloaders/vm_gateway/gas_test.yul/gas_test.yul.zbin diff --git a/etc/multivm_bootloaders/vm_sync_layer/playground_batch.yul/playground_batch.yul.zbin b/etc/multivm_bootloaders/vm_gateway/playground_batch.yul/playground_batch.yul.zbin similarity index 100% rename from etc/multivm_bootloaders/vm_sync_layer/playground_batch.yul/playground_batch.yul.zbin rename to etc/multivm_bootloaders/vm_gateway/playground_batch.yul/playground_batch.yul.zbin diff --git a/etc/multivm_bootloaders/vm_sync_layer/proved_batch.yul/proved_batch.yul.zbin b/etc/multivm_bootloaders/vm_gateway/proved_batch.yul/proved_batch.yul.zbin similarity index 100% rename from etc/multivm_bootloaders/vm_sync_layer/proved_batch.yul/proved_batch.yul.zbin rename to etc/multivm_bootloaders/vm_gateway/proved_batch.yul/proved_batch.yul.zbin diff --git a/infrastructure/zk/src/contract.ts b/infrastructure/zk/src/contract.ts index 24b942393f3b..864a4468bbb2 100644 --- a/infrastructure/zk/src/contract.ts +++ b/infrastructure/zk/src/contract.ts @@ -11,44 +11,44 @@ export async function build(zkSyncNetwork: boolean): Promise { } const syncLayerEnvVars = [ - 'SYNC_LAYER_CREATE2_FACTORY_ADDR', + 'GATEWAY_CREATE2_FACTORY_ADDR', - 'SYNC_LAYER_STATE_TRANSITION_PROXY_ADDR', - 'SYNC_LAYER_STATE_TRANSITION_IMPL_ADDR', + 'GATEWAY_STATE_TRANSITION_PROXY_ADDR', + 'GATEWAY_STATE_TRANSITION_IMPL_ADDR', - 'SYNC_LAYER_DIAMOND_INIT_ADDR', - 'SYNC_LAYER_DEFAULT_UPGRADE_ADDR', - 'SYNC_LAYER_GENESIS_UPGRADE_ADDR', - 'SYNC_LAYER_GOVERNANCE_ADDR', - 'SYNC_LAYER_ADMIN_FACET_ADDR', - 'SYNC_LAYER_EXECUTOR_FACET_ADDR', - 'SYNC_LAYER_GETTERS_FACET_ADDR', - 'SYNC_LAYER_MAILBOX_FACET_ADDR', + 'GATEWAY_DIAMOND_INIT_ADDR', + 'GATEWAY_DEFAULT_UPGRADE_ADDR', + 'GATEWAY_GENESIS_UPGRADE_ADDR', + 'GATEWAY_GOVERNANCE_ADDR', + 'GATEWAY_ADMIN_FACET_ADDR', + 'GATEWAY_EXECUTOR_FACET_ADDR', + 'GATEWAY_GETTERS_FACET_ADDR', + 'GATEWAY_MAILBOX_FACET_ADDR', - 'SYNC_LAYER_VERIFIER_ADDR', - 'SYNC_LAYER_VALIDATOR_TIMELOCK_ADDR', + 'GATEWAY_VERIFIER_ADDR', + 'GATEWAY_VALIDATOR_TIMELOCK_ADDR', - // 'SYNC_LAYER_TRANSPARENT_PROXY_ADMIN_ADDR', + // 'GATEWAY_TRANSPARENT_PROXY_ADMIN_ADDR', - 'SYNC_LAYER_L1_MULTICALL3_ADDR', - 'SYNC_LAYER_BLOB_VERSIONED_HASH_RETRIEVER_ADDR', + 'GATEWAY_L1_MULTICALL3_ADDR', + 'GATEWAY_BLOB_VERSIONED_HASH_RETRIEVER_ADDR', - 'SYNC_LAYER_API_WEB3_JSON_RPC_HTTP_URL', - 'SYNC_LAYER_CHAIN_ID', + 'GATEWAY_API_WEB3_JSON_RPC_HTTP_URL', + 'GATEWAY_CHAIN_ID', - 'SYNC_LAYER_BRIDGEHUB_IMPL_ADDR', - 'SYNC_LAYER_BRIDGEHUB_PROXY_ADDR', + 'GATEWAY_BRIDGEHUB_IMPL_ADDR', + 'GATEWAY_BRIDGEHUB_PROXY_ADDR', - // 'SYNC_LAYER_TRANSPARENT_PROXY_ADMIN_ADDR', + // 'GATEWAY_TRANSPARENT_PROXY_ADMIN_ADDR', - // 'SYNC_LAYER_L1_SHARED_BRIDGE_IMPL_ADDR', - // 'SYNC_LAYER_L1_SHARED_BRIDGE_PROXY_ADDR', - // 'SYNC_LAYER_L1_ERC20_BRIDGE_IMPL_ADDR', - // 'SYNC_LAYER_L1_ERC20_BRIDGE_PROXY_ADDR', + // 'GATEWAY_L1_SHARED_BRIDGE_IMPL_ADDR', + // 'GATEWAY_L1_SHARED_BRIDGE_PROXY_ADDR', + // 'GATEWAY_L1_ERC20_BRIDGE_IMPL_ADDR', + // 'GATEWAY_L1_ERC20_BRIDGE_PROXY_ADDR', 'CONTRACTS_STM_ASSET_INFO', - 'SYNC_LAYER_DIAMOND_PROXY_ADDR', - 'SYNC_LAYER_L1_RELAYED_SL_DA_VALIDATOR' + 'GATEWAY_DIAMOND_PROXY_ADDR', + 'GATEWAY_L1_RELAYED_SL_DA_VALIDATOR' ]; const USER_FACING_ENV_VARS = ['CONTRACTS_USER_FACING_DIAMOND_PROXY_ADDR', 'CONTRACTS_USER_FACING_BRIDGEHUB_PROXY_ADDR']; @@ -63,15 +63,15 @@ export async function prepareSyncLayer(): Promise { ); const paramsFromEnv = [ - `SYNC_LAYER_API_WEB3_JSON_RPC_HTTP_URL=${process.env.API_WEB3_JSON_RPC_HTTP_URL}`, - `SYNC_LAYER_CHAIN_ID=${process.env.CHAIN_ETH_ZKSYNC_NETWORK_ID}` + `GATEWAY_API_WEB3_JSON_RPC_HTTP_URL=${process.env.API_WEB3_JSON_RPC_HTTP_URL}`, + `GATEWAY_CHAIN_ID=${process.env.CHAIN_ETH_ZKSYNC_NETWORK_ID}` ].join('\n'); const deployLog = fs .readFileSync('sync-layer-prep.log') .toString() - .replace(/CONTRACTS/g, 'SYNC_LAYER') + + .replace(/CONTRACTS/g, 'GATEWAY') + '\n' + paramsFromEnv; @@ -102,14 +102,14 @@ async function migrateToSyncLayer() { const migrationLog = fs .readFileSync('sync-layer-migration.log') .toString() - .replace(/CONTRACTS/g, 'SYNC_LAYER'); + .replace(/CONTRACTS/g, 'GATEWAY'); const envFile = `etc/env/l2-inits/${process.env.ZKSYNC_ENV!}.init.env`; console.log('Writing to', envFile); // FIXME: consider creating new sync_layer_* variable. - updateContractsEnv(envFile, migrationLog, ['SYNC_LAYER_DIAMOND_PROXY_ADDR']); - env.modify('CONTRACTS_DIAMOND_PROXY_ADDR', process.env.SYNC_LAYER_DIAMOND_PROXY_ADDR!, envFile, true); + updateContractsEnv(envFile, migrationLog, ['GATEWAY_DIAMOND_PROXY_ADDR']); + env.modify('CONTRACTS_DIAMOND_PROXY_ADDR', process.env.GATEWAY_DIAMOND_PROXY_ADDR!, envFile, true); } async function prepareValidatorsOnSyncLayer() { @@ -125,7 +125,7 @@ async function recoverFromFailedMigrationToSyncLayer(failedTxSLHash: string) { /// FIXME: generally we should use a different approach for config maintaining within sync layer /// the chain should retain both "sync_layer" and "contracts_" contracts and be able to switch between them async function updateConfigOnSyncLayer() { - const specialParams = ['SYNC_LAYER_API_WEB3_JSON_RPC_HTTP_URL', 'SYNC_LAYER_CHAIN_ID']; + const specialParams = ['GATEWAY_API_WEB3_JSON_RPC_HTTP_URL', 'GATEWAY_CHAIN_ID']; const envFile = `etc/env/l2-inits/${process.env.ZKSYNC_ENV!}.init.env`; @@ -140,15 +140,13 @@ async function updateConfigOnSyncLayer() { if (specialParams.includes(envVar)) { continue; } - const contractsVar = envVar.replace(/SYNC_LAYER/g, 'CONTRACTS'); + const contractsVar = envVar.replace(/GATEWAY/g, 'CONTRACTS'); env.modify(contractsVar, process.env[envVar]!, envFile, false); } env.modify('BRIDGE_LAYER_WEB3_URL', process.env.ETH_CLIENT_WEB3_URL!, envFile, false); - env.modify('ETH_CLIENT_WEB3_URL', process.env.SYNC_LAYER_API_WEB3_JSON_RPC_HTTP_URL!, envFile, false); + env.modify('ETH_CLIENT_WEB3_URL', process.env.GATEWAY_API_WEB3_JSON_RPC_HTTP_URL!, envFile, false); env.modify('L1_RPC_ADDRESS', process.env.ETH_CLIENT_WEB3_URL!, envFile, false); - env.modify('ETH_CLIENT_CHAIN_ID', process.env.SYNC_LAYER_CHAIN_ID!, envFile, false); - - console.log('b'); + env.modify('ETH_CLIENT_CHAIN_ID', process.env.GATEWAY_CHAIN_ID!, envFile, false); env.modify('CHAIN_ETH_NETWORK', 'localhostL2', envFile, false);