Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added local-chains/v31.0/gateway-state.tar.gz
Binary file not shown.
16 changes: 16 additions & 0 deletions local-chains/v31.0/gateway/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
genesis:
bridgehub_address: '0x4555e7147f652fd5d8ecae6abd825b9ec5107e0a'
bytecode_supplier_address: '0xadfa35e51bc33233268e39ca495432cf0c7ecb52'
genesis_input_path: ./local-chains/v31.0/genesis.json
chain_id: 506
l1_sender:
operator_commit_sk: '0x3ba203f4d1aa1f52b6fc890083b9ca42005fa10d52c45ab43049cb0c7a1137fd'
operator_prove_sk: '0x3b238563d120e58ad6747d5d573d19abe80ac5aa22414ec737463f61187443d8'
operator_execute_sk: '0x796621a4396f414d665ab3e20ad7f3402b43d0648f23c543398cef923a2933e4'
rpc:
address: 0.0.0.0:3052
external_price_api_client:
source: Forced
forced_prices:
'0x0000000000000000000000000000000000000001': 3000

1 change: 1 addition & 0 deletions local-chains/v31.0/gateway/contracts.yaml
1 change: 1 addition & 0 deletions local-chains/v31.0/gateway/genesis.json
1 change: 1 addition & 0 deletions local-chains/v31.0/gateway/wallets.yaml
41 changes: 22 additions & 19 deletions local-chains/v31.0/genesis.json

Large diffs are not rendered by default.

Binary file modified local-chains/v31.0/l1-state.json.gz
Binary file not shown.
19 changes: 19 additions & 0 deletions local-chains/v31.0/multi_chain/chain_506.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
general:
ephemeral: true
ephemeral_state: ./local-chains/v31.0/gateway-state.tar.gz
genesis:
bridgehub_address: '0x4555e7147f652fd5d8ecae6abd825b9ec5107e0a'
bytecode_supplier_address: '0xadfa35e51bc33233268e39ca495432cf0c7ecb52'
genesis_input_path: ./local-chains/v31.0/genesis.json
chain_id: 506
l1_sender:
operator_commit_sk: '0x3ba203f4d1aa1f52b6fc890083b9ca42005fa10d52c45ab43049cb0c7a1137fd'
operator_prove_sk: '0x3b238563d120e58ad6747d5d573d19abe80ac5aa22414ec737463f61187443d8'
operator_execute_sk: '0x796621a4396f414d665ab3e20ad7f3402b43d0648f23c543398cef923a2933e4'
rpc:
address: 0.0.0.0:3052
external_price_api_client:
source: Forced
forced_prices:
'0x0000000000000000000000000000000000000001': 3000

12 changes: 7 additions & 5 deletions local-chains/v31.0/multi_chain/chain_6565.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
general:
ephemeral: true
gateway_rpc_url: http://localhost:3052
genesis:
bridgehub_address: '0x69c3388f45f7f944300141ff5735d59f15e4c9f0'
bytecode_supplier_address: '0xa96c213b3a2db7d69eb4fd786b8e8d410860c06d'
bridgehub_address: '0x4555e7147f652fd5d8ecae6abd825b9ec5107e0a'
bytecode_supplier_address: '0xadfa35e51bc33233268e39ca495432cf0c7ecb52'
genesis_input_path: ./local-chains/v31.0/genesis.json
chain_id: 6565
l1_sender:
operator_commit_sk: '0x62364ecc1a0007cc3ba165e57000a5d890f2d69d9e9b4a1e9e86af646c1f9b25'
operator_prove_sk: '0xcfa9ab3c4cf0c6e4d207cf84cb95bbf87885174182f91b9c947b2c7a6b89439d'
operator_execute_sk: '0xf292a0f460be19ab73c57c33d4a979ddf6cf4385c86d12158b393ece98ad4d30'
pubdata_mode: RelayedL2Calldata
operator_commit_sk: '0xe6ea0a41bb989b0520d51d3d342ae238d805e99c3190fc9b8acf0bc38a826c2f'
operator_prove_sk: '0x0cfe28a8ef7157c8da8facdcb5cca7c3d80bae3539f1e35489f99559085e8ca0'
operator_execute_sk: '0x7d0adab79777ca45db9ffbf5559af45e3d5d045a5a7df0c7bc111570151e8481'
rpc:
address: 0.0.0.0:3050
external_price_api_client:
Expand Down
12 changes: 7 additions & 5 deletions local-chains/v31.0/multi_chain/chain_6566.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
general:
ephemeral: true
gateway_rpc_url: http://localhost:3052
genesis:
bridgehub_address: '0x69c3388f45f7f944300141ff5735d59f15e4c9f0'
bytecode_supplier_address: '0xa96c213b3a2db7d69eb4fd786b8e8d410860c06d'
bridgehub_address: '0x4555e7147f652fd5d8ecae6abd825b9ec5107e0a'
bytecode_supplier_address: '0xadfa35e51bc33233268e39ca495432cf0c7ecb52'
genesis_input_path: ./local-chains/v31.0/genesis.json
chain_id: 6566
l1_sender:
operator_commit_sk: '0xd03068bc4c65805abe734dd83b59eb2efe5013bf99c934e94241f78a2ded2aaa'
operator_prove_sk: '0x18382cc95097e05b51834ab30572823f0ed257e6d548fc4a8e0240c7617b9b74'
operator_execute_sk: '0x43e30cab9abf28e4fbd73628bac87ee7452b302d28eb16bfa5abefdf2acfcc2b'
pubdata_mode: RelayedL2Calldata
operator_commit_sk: '0xee4e86e1adc987c66c6ebcca6e7e54d05b31f539d87217a7e2c231a31d786d23'
operator_prove_sk: '0xbb696e11b564d2748ec3161065f45dee47f5cd76a063e9b804cc1788fb6cb37d'
operator_execute_sk: '0xf4b55e4e10a71273570e9f952c76095d23819fca57d2f2cbcf618e76e4276213'
rpc:
address: 0.0.0.0:3051
external_price_api_client:
Expand Down
58 changes: 58 additions & 0 deletions local-chains/v31.0/multi_chain/contracts_506.yaml

Large diffs are not rendered by default.

67 changes: 33 additions & 34 deletions local-chains/v31.0/multi_chain/contracts_6565.yaml

Large diffs are not rendered by default.

67 changes: 33 additions & 34 deletions local-chains/v31.0/multi_chain/contracts_6566.yaml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions local-chains/v31.0/multi_chain/wallets_506.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
deployer:
address: 0xf0efa9f96861926bdd2cf6ab897684a9cb8c5867
private_key: 0xa74227dba833a6cdbc31e1bf9323f4e8cccdba36a709878bc4c91a9c9737b16f
operator:
address: 0x1ea7a350f83849a0b3dbb1789f26ed3c62f485fa
private_key: 0xb9b8eec0a248289539f48f098fb1441e8a605e78243b9ee2be2ea8d5e272ac6c
blob_operator:
address: 0x7da4ec90a1212ca72c1ab74380e35a89368cea4e
private_key: 0x3ba203f4d1aa1f52b6fc890083b9ca42005fa10d52c45ab43049cb0c7a1137fd
prove_operator:
address: 0x8a0aea51876fccd2d8d9f4bb06adca98eda9f4c5
private_key: 0x3b238563d120e58ad6747d5d573d19abe80ac5aa22414ec737463f61187443d8
execute_operator:
address: 0x2d92fdfa82d099682ae1fd636bc7503f41dcd73a
private_key: 0x796621a4396f414d665ab3e20ad7f3402b43d0648f23c543398cef923a2933e4
fee_account:
address: 0x7518d19e9f63d0d29390f1cfce45e3b84d66e4c9
private_key: 0x35dae80ce15a5c5aa4b1bd2768c91e9b079f520af239b780603431b9f498c045
governor:
address: 0x97111082147d7c30293bb59bd21fb9309e836a61
private_key: 0x9df9ef3b8ff88c67b61fc2c2d19f3eaf7b93642c4a394b8de4d068ffc30faa31
token_multiplier_setter:
address: 0x56d2e3e233125c0accd9a78f535b3989241f2621
private_key: 0xeb5f4b8f63b64262c0414f49a84452d93fab36bc58a57f11172fc00c86612f47
32 changes: 16 additions & 16 deletions local-chains/v31.0/multi_chain/wallets_6565.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
deployer:
address: 0x3232339f0bd12ee1b6bad4b47cef766957ddd00a
private_key: 0xc60d0d0b85d4c22d231134ca186993507f2cda5f68937b31f750e942dafb5de0
address: 0x7d98507468eaf79109183e0287b9b5da5c7bd053
private_key: 0x742f45401b041f02c5fd6c08ea41fb6bc4928ee2759da5d1f7c92dcd4a981c2b
operator:
address: 0xac61d2ba8e3e4fcabc32c1dfce1e8eedf4332aa2
private_key: 0x9f26fc1d7da1f2b9ea575dca41d29412b685317faf7264ecb01b95989a0f8408
address: 0x6c8087d1fd8d2ecbc08ff099fa843e182ff45b3e
private_key: 0xe6ea0a41bb989b0520d51d3d342ae238d805e99c3190fc9b8acf0bc38a826c2f
blob_operator:
address: 0xa9a7ef1c88dfaf07472cdb3d39afda1efc6e50b3
private_key: 0x62364ecc1a0007cc3ba165e57000a5d890f2d69d9e9b4a1e9e86af646c1f9b25
address: 0x07a6db68608d27fec52d26134b78fb69d036b765
private_key: 0xf7ec9b98e8aac328a26918dfbda929aaa65249e3b462de1e48514ea97d7d23e2
prove_operator:
address: 0x43b66eaf128dcf1b18531e7abe8cf739c3c69912
private_key: 0xcfa9ab3c4cf0c6e4d207cf84cb95bbf87885174182f91b9c947b2c7a6b89439d
address: 0x092570ee15b5e662a53c90e00ab2599b34634775
private_key: 0x0cfe28a8ef7157c8da8facdcb5cca7c3d80bae3539f1e35489f99559085e8ca0
execute_operator:
address: 0x1ed7e4a8a24387954a969677d52324096da50dae
private_key: 0xf292a0f460be19ab73c57c33d4a979ddf6cf4385c86d12158b393ece98ad4d30
address: 0xbee510dfd30e22c4a7e5dfad6beb4b4d636e30d7
private_key: 0x7d0adab79777ca45db9ffbf5559af45e3d5d045a5a7df0c7bc111570151e8481
fee_account:
address: 0x1a515ab21e274e2c8286f85ac77dde6f014dd2e0
private_key: 0x026ebaefce581e7c759cd2e60b360003b7399335ac4e3bfbf78666b7adc9ce99
address: 0xdee9520886d1ba905d37c20d4241d1f0c635fc2b
private_key: 0x7890ae2c1721de9aa719df73a9de6b3e68b5a1489d76fe456a6e86577bb13e1f
governor:
address: 0x0cd32d32e48918e7d6f89c883e8f40f7b116dfa2
private_key: 0xe5fc62dec39cfc73318ca42c49b65be1eb1cf5d26f9e2e102145521a7133b0ba
address: 0x4a70bcafa24b04b1d2bca3fb1024b6531d0e2373
private_key: 0x0ee2e03b92a88484ece59568bf536a6cbcab6ec0f9f97d9251b0be937bcbce88
token_multiplier_setter:
address: 0x3ecba6930f15b098763bc8e6b59a21924ef452e3
private_key: 0xd92dec05f55c2ba90c632bab8ecdd34db770c7b8c6ce28d047d49fe8d1afeb93
address: 0xc3fa0c4b9b0f63291ebe2c2fa428f8ddc3873a2c
private_key: 0xf4e991495ab209ea213381746c06377ec94532ba93d8d25dfe48aec4c4dcfebe
32 changes: 16 additions & 16 deletions local-chains/v31.0/multi_chain/wallets_6566.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
deployer:
address: 0xc597c3461c1fbd198b29f536176f8c855c10de7e
private_key: 0x4179dda70e4364fd307fe08fa00126dfcdce32e058ed55b1ae95eba947ab6b0e
address: 0x12fa3937dd72151af4454877ffada8f61f1cadd5
private_key: 0x7f0446837c2dd6a788a4ba8d61148c0caebdb0aa6b876c1a312623cb81f8a6df
operator:
address: 0xc3de62b39bd3692d649a3a4a93c3e70a9c72cde7
private_key: 0x7c7ce08daad4abe14b1365a59c8f8c4c07999d4612b7560ada270a51442a9591
address: 0xcdd06d47833718d7cdcba0739f3fa32562380d78
private_key: 0xee4e86e1adc987c66c6ebcca6e7e54d05b31f539d87217a7e2c231a31d786d23
blob_operator:
address: 0x2ffedcd02245d3284c2237eb1ab3e5ba343f2d22
private_key: 0xd03068bc4c65805abe734dd83b59eb2efe5013bf99c934e94241f78a2ded2aaa
address: 0x50c675fff8d9fcc96e0976ddebe77cfe83904fee
private_key: 0x4487ccbac778f614bc0a92f2589eba48bd60be9a38987f641938d588cda37570
prove_operator:
address: 0xdd34dec0f25e54b4b5d4606f4ebf97352e760fbb
private_key: 0x18382cc95097e05b51834ab30572823f0ed257e6d548fc4a8e0240c7617b9b74
address: 0x9b5b7ecfb59198ee82951ba7e756e16acd01eb6e
private_key: 0xbb696e11b564d2748ec3161065f45dee47f5cd76a063e9b804cc1788fb6cb37d
execute_operator:
address: 0x5eaa8ebe03ed7def408b07563296e62a04c3244c
private_key: 0x43e30cab9abf28e4fbd73628bac87ee7452b302d28eb16bfa5abefdf2acfcc2b
address: 0xb49be03afa9dfabb2b2c44bc8ddb69048e424c10
private_key: 0xf4b55e4e10a71273570e9f952c76095d23819fca57d2f2cbcf618e76e4276213
fee_account:
address: 0x4be7d76cab8c36da6971cf8a698251124c4e1de7
private_key: 0x389b21906245e3dfa5457701b3cf2fbc39de251b6b1a7b8489f8ca5b14db17b5
address: 0xe974e3f6c0810ff47cee01ce0b62641231e34c15
private_key: 0x5bfa814929e29d4adbd6aa22f78cba6f139862c8a6af22002bb887ce7a293367
governor:
address: 0x794af37a8a2eb4caa26e8478fc178e9bb92f0161
private_key: 0x629dc8721ff095c44ea4fb1461ea07f8d0d4d773fc66986136e461a10bf9c8cf
address: 0x867aef9366b05e77e55b48cd2e94e04207f1db74
private_key: 0x62e41c513793b81afb048d94f5af304a4705d41b0f5fc332e1358f73c7f8c34d
token_multiplier_setter:
address: 0xbb49ef4af8392b94ff18e2ceabaff1653ce3819a
private_key: 0xceb7fa9e301da712fae9c31bd02f14e653db85558c6610c8df321eb06d4ef7d9
address: 0xf92745e4418e1b2512fbdf8ac74914a1526c29fd
private_key: 0xe23186f6b6eb30498158314508b124a115bc371628ab29317d9d39293337b168
10 changes: 5 additions & 5 deletions local-chains/v31.0/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ era-contracts:
# TODO: remove branch and put tag and sha when the release is done
#branch: "draft-v31-with-zksync-os"
# tag: "TBD"
sha: "052cb88fba0f8bf4acc56e06083eece97cc66c82"
sha: "4d54a438e3a6b7777919e45b9b7c843265231d80"

zkstack-cli:
# TODO: remove branch and put tag and sha when the release is done
#branch: "draft-v31"
# tag: "TBD"
sha: "5cb9b972cdb34c7573955b4cebb1ed175bf77142"
sha: "236c37a947874bf7b2b06840251bd4b5566fc716"

# todo: this is not relevant for now, will be updated once migration to zksync-os-scripts is finished
#zksync-os-workflows:
zksync-os-scripts:
# TODO: remove branch and put tag and sha when the release is done
# tag: "TBD"
# sha: "TBD"
sha: "a3f4fc806ed22ac3382cca394354a68de67f904c"
4 changes: 4 additions & 0 deletions node/bin/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ pub struct GeneralConfig {
/// Disables all HTTP APIs except JSON RPC.
#[config(default_t = false, alias = "sandbox")]
pub ephemeral: bool,

/// Path to ephemeral state to load at startup.
#[config(default_t = None)]
pub ephemeral_state: Option<PathBuf>,
}

#[derive(Clone, Debug, DescribeConfig, DeserializeConfig)]
Expand Down
26 changes: 26 additions & 0 deletions node/bin/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use clap::{Parser, Subcommand};
use smart_config::{ConfigRepository, ConfigSources, Environment, Json, Yaml};
use std::process::Command;
use std::{fs, future, path::Path, time::Duration};
use tempfile::TempDir;
use tokio::signal::unix::{SignalKind, signal};
Expand Down Expand Up @@ -158,6 +159,9 @@ pub async fn main() {
// ======= Run tasks ===========
let main_stop = stop_receiver.clone(); // keep original for Prometheus
let ephemeral_enabled = config.general_config.ephemeral;
if !ephemeral_enabled && config.general_config.ephemeral_state.is_some() {
panic!("`ephemeral_state` requires `ephemeral` mode to be enabled");
}
let _ephemeral_guard = ephemeral_enabled.then(|| enable_ephemeral_mode(&mut config));
let prometheus_port = config.observability_config.prometheus.port;

Expand Down Expand Up @@ -410,6 +414,28 @@ fn enable_ephemeral_mode(config: &mut Config) -> Option<TempDir> {
// todo: consider force-disabling
// config.network_config.enabled = false;

if let Some(ephemeral_state) = &config.general_config.ephemeral_state {
tracing::info!("Loading ephemeral state from {}", ephemeral_state.display());
let status = Command::new("tar")
.args([
"-xvf",
ephemeral_state.to_string_lossy().as_ref(),
&format!(
"--one-top-level={}",
config.general_config.rocks_db_path.to_string_lossy()
),
])
.status()
.expect("failed to call `tar` command; ensure it is present on your machine");
if !status.success() {
panic!(
"`tar` command failed to decompress ephemeral state from `{}` to `{}`",
ephemeral_state.display(),
config.general_config.rocks_db_path.display(),
);
}
}

Some(tempdir)
}

Expand Down
Loading