diff --git a/Cargo.lock b/Cargo.lock index 4fe36ac3..96ac4209 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4437,7 +4437,7 @@ dependencies = [ [[package]] name = "multivm" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "vlog", "vm", @@ -5488,7 +5488,7 @@ dependencies = [ [[package]] name = "prometheus_exporter" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "metrics", @@ -7911,7 +7911,7 @@ dependencies = [ [[package]] name = "vlog" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "chrono", "sentry", @@ -7923,7 +7923,7 @@ dependencies = [ [[package]] name = "vm" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "hex", @@ -7943,7 +7943,7 @@ dependencies = [ [[package]] name = "vm_1_3_2" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "ethabi 18.0.0", @@ -7964,7 +7964,7 @@ dependencies = [ [[package]] name = "vm_m5" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "hex", "itertools 0.10.5", @@ -7985,7 +7985,7 @@ dependencies = [ [[package]] name = "vm_m6" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "hex", "itertools 0.10.5", @@ -8007,7 +8007,7 @@ dependencies = [ [[package]] name = "vm_virtual_blocks" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "hex", @@ -8576,7 +8576,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "serde", "serde_json", @@ -8586,7 +8586,7 @@ dependencies = [ [[package]] name = "zksync_circuit_breaker" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "async-trait", @@ -8609,7 +8609,7 @@ dependencies = [ [[package]] name = "zksync_config" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "bigdecimal", @@ -8628,7 +8628,7 @@ dependencies = [ [[package]] name = "zksync_contracts" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "envy", "ethabi 18.0.0", @@ -8642,7 +8642,7 @@ dependencies = [ [[package]] name = "zksync_core" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "actix-cors", "actix-rt", @@ -8704,7 +8704,7 @@ dependencies = [ [[package]] name = "zksync_crypto" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "base64 0.13.1", "blake2 0.10.6", @@ -8719,7 +8719,7 @@ dependencies = [ [[package]] name = "zksync_dal" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "bigdecimal", @@ -8746,7 +8746,7 @@ dependencies = [ [[package]] name = "zksync_eth_client" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "async-trait", @@ -8766,7 +8766,7 @@ dependencies = [ [[package]] name = "zksync_eth_signer" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "async-trait", "hex", @@ -8785,7 +8785,7 @@ dependencies = [ [[package]] name = "zksync_health_check" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "async-trait", "futures 0.3.28", @@ -8798,7 +8798,7 @@ dependencies = [ [[package]] name = "zksync_mempool" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "tracing", "zksync_types", @@ -8807,7 +8807,7 @@ dependencies = [ [[package]] name = "zksync_merkle_tree" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "leb128", "once_cell", @@ -8823,7 +8823,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "once_cell", "zksync_basic_types", @@ -8833,7 +8833,7 @@ dependencies = [ [[package]] name = "zksync_object_store" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "async-trait", @@ -8851,7 +8851,7 @@ dependencies = [ [[package]] name = "zksync_prover_utils" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "async-trait", @@ -8871,7 +8871,7 @@ dependencies = [ [[package]] name = "zksync_queued_job_processor" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "async-trait", @@ -8883,7 +8883,7 @@ dependencies = [ [[package]] name = "zksync_state" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "itertools 0.10.5", @@ -8900,7 +8900,7 @@ dependencies = [ [[package]] name = "zksync_storage" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "num_cpus", "once_cell", @@ -8912,7 +8912,7 @@ dependencies = [ [[package]] name = "zksync_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "blake2 0.10.6", "chrono", @@ -8941,7 +8941,7 @@ dependencies = [ [[package]] name = "zksync_utils" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "bigdecimal", @@ -8963,7 +8963,7 @@ dependencies = [ [[package]] name = "zksync_verification_key_generator_and_server" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "anyhow", "bincode", @@ -8983,7 +8983,7 @@ dependencies = [ [[package]] name = "zksync_web3_decl" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?rev=691a7008f6d1f88fb9a5b6b8d92592e1199f37ea#691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" +source = "git+https://github.com/matter-labs/zksync-era.git?rev=e1deecd697e488831de3133e7507cc1cdb06a141#e1deecd697e488831de3133e7507cc1cdb06a141" dependencies = [ "bigdecimal", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 52839f72..d6890df8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,14 +11,14 @@ categories = ["cryptography"] publish = false # We don't want to publish our binaries. [dependencies] -zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -vm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } -zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "691a7008f6d1f88fb9a5b6b8d92592e1199f37ea" } +zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +vm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } +zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "e1deecd697e488831de3133e7507cc1cdb06a141" } diff --git a/src/fork.rs b/src/fork.rs index f898508c..c0fe871e 100644 --- a/src/fork.rs +++ b/src/fork.rs @@ -283,6 +283,7 @@ const SUPPORTED_VERSIONS: &[ProtocolVersionId] = &[ ProtocolVersionId::Version13, ProtocolVersionId::Version14, ProtocolVersionId::Version15, + ProtocolVersionId::Version16, ]; pub fn supported_protocol_versions(version: ProtocolVersionId) -> bool { @@ -318,8 +319,7 @@ impl ForkDetails { let block = client .get_block_by_hash(root_hash, true) .await - .ok() - .flatten() + .expect("failed retrieving block") .unwrap_or_else(|| { panic!( "Could not find block #{:?} ({:#x}) in {:?}", @@ -372,9 +372,11 @@ impl ForkDetails { pub async fn from_network_tx(fork: &str, tx: H256, cache_config: CacheConfig) -> Self { let (url, client) = Self::fork_to_url_and_client(fork); let tx_details = client.get_transaction_by_hash(tx).await.unwrap().unwrap(); - let overwrite_chain_id = Some(L2ChainId::try_from(tx_details.chain_id).unwrap_or_else( - |err| panic!("erroneous chain id {}: {:?}", tx_details.chain_id, err,), - )); + let overwrite_chain_id = Some( + L2ChainId::try_from(tx_details.chain_id.as_u64()).unwrap_or_else(|err| { + panic!("erroneous chain id {}: {:?}", tx_details.chain_id, err,) + }), + ); let miniblock_number = MiniblockNumber(tx_details.block_number.unwrap().as_u32()); // We have to sync to the one-miniblock before the one where transaction is. let l2_miniblock = miniblock_number.saturating_sub(1) as u64; diff --git a/src/node.rs b/src/node.rs index 92763478..b2fa90d7 100644 --- a/src/node.rs +++ b/src/node.rs @@ -2121,7 +2121,7 @@ impl EthNamespaceT for max_priority_fee_per_gas: Some( info.tx.common_data.fee.max_priority_fee_per_gas, ), - chain_id, + chain_id: U256::from(chain_id), l1_batch_number: Some(U64::from(info.batch_number as u64)), l1_batch_tx_index: None, }) diff --git a/src/testing.rs b/src/testing.rs index fd3027bf..cf2b5c69 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -275,7 +275,7 @@ impl TransactionResponseBuilder { "type": "0xff", "maxFeePerGas": "0x0", "maxPriorityFeePerGas": "0x0", - "chainId": 260, + "chainId": "0x104", "l1BatchNumber": "0x1", "l1BatchTxIndex": "0x0", })