diff --git a/bootloader/test_infra/Cargo.lock b/bootloader/test_infra/Cargo.lock index 28353dc5..851f1b5b 100644 --- a/bootloader/test_infra/Cargo.lock +++ b/bootloader/test_infra/Cargo.lock @@ -575,7 +575,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "rustc-serialize", "serde", "wasm-bindgen", "windows-targets", @@ -1079,6 +1078,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + [[package]] name = "ecdsa" version = "0.14.8" @@ -1120,6 +1125,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "elsa" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714f766f3556b44e7e4776ad133fcc3445a489517c25c704ace411bb14790194" +dependencies = [ + "stable_deref_trait", +] + [[package]] name = "encoding_rs" version = "0.8.33" @@ -2115,6 +2129,26 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linkme" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f948366ad5bb46b5514ba7a7a80643726eef08b06632592699676748c8bc33b" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc28438cad73dcc90ff3466fc329a9252b1b8ba668eb0d5668ba97088cf4eef0" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.31", +] + [[package]] name = "linux-raw-sys" version = "0.4.5" @@ -2951,6 +2985,29 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus-client" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c99afa9a01501019ac3a14d71d9f94050346f55ca471ce90c799a15c58f61e2" +dependencies = [ + "dtoa", + "itoa", + "parking_lot 0.12.1", + "prometheus-client-derive-encode", +] + +[[package]] +name = "prometheus-client-derive-encode" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.31", +] + [[package]] name = "pulldown-cmark" version = "0.9.3" @@ -3421,12 +3478,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" - [[package]] name = "rustc_version" version = "0.4.0" @@ -4090,6 +4141,12 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -4733,10 +4790,32 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vise" +version = "0.1.0" +source = "git+https://github.com/matter-labs/vise.git?rev=9d097ab747b037b6e62504df1db5b975425b6bdd#9d097ab747b037b6e62504df1db5b975425b6bdd" +dependencies = [ + "elsa", + "linkme", + "once_cell", + "prometheus-client", + "vise-macros", +] + +[[package]] +name = "vise-macros" +version = "0.1.0" +source = "git+https://github.com/matter-labs/vise.git?rev=9d097ab747b037b6e62504df1db5b975425b6bdd#9d097ab747b037b6e62504df1db5b975425b6bdd" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.31", +] + [[package]] name = "vlog" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "chrono", "sentry", @@ -4748,15 +4827,15 @@ dependencies = [ [[package]] name = "vm" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "anyhow", "hex", "itertools", - "metrics", "once_cell", "thiserror", "tracing", + "vise", "zk_evm", "zksync_config", "zksync_contracts", @@ -5154,7 +5233,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "serde", "web3", @@ -5163,8 +5242,9 @@ dependencies = [ [[package]] name = "zksync_config" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ + "anyhow", "bigdecimal", "envy", "hex", @@ -5181,7 +5261,7 @@ dependencies = [ [[package]] name = "zksync_contracts" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "envy", "ethabi", @@ -5195,7 +5275,7 @@ dependencies = [ [[package]] name = "zksync_crypto" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "base64 0.13.1", "blake2 0.10.6", @@ -5210,14 +5290,13 @@ dependencies = [ [[package]] name = "zksync_dal" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "anyhow", "bigdecimal", "bincode", "hex", "itertools", - "metrics", "num 0.3.1", "once_cell", "serde", @@ -5227,6 +5306,7 @@ dependencies = [ "thiserror", "tokio", "tracing", + "vise", "zksync_config", "zksync_contracts", "zksync_health_check", @@ -5237,7 +5317,7 @@ dependencies = [ [[package]] name = "zksync_health_check" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "async-trait", "futures", @@ -5250,7 +5330,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "once_cell", "zksync_basic_types", @@ -5260,13 +5340,14 @@ dependencies = [ [[package]] name = "zksync_state" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "anyhow", "metrics", "mini-moka", "tokio", "tracing", + "vise", "zksync_dal", "zksync_storage", "zksync_types", @@ -5276,24 +5357,24 @@ dependencies = [ [[package]] name = "zksync_storage" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ - "metrics", "num_cpus", + "once_cell", "rocksdb", "tracing", + "vise", ] [[package]] name = "zksync_types" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "blake2 0.10.6", "chrono", "codegen 0.1.0", "ethereum-types 0.12.1", - "metrics", "num 0.3.1", "num_enum", "once_cell", @@ -5316,11 +5397,10 @@ dependencies = [ [[package]] name = "zksync_utils" version = "0.1.0" -source = "git+https://github.com/matter-labs/zksync-era.git?tag=v7.0.0-rc0#a43bc402a204ac92fb74ad348b68f61e24d7a84a" +source = "git+https://github.com/matter-labs/zksync-era.git?branch=mmzk_1006_fix_tracer#45ef51edf1617c90bf293e75db3171275c496950" dependencies = [ "anyhow", "bigdecimal", - "envy", "futures", "hex", "itertools", diff --git a/bootloader/test_infra/Cargo.toml b/bootloader/test_infra/Cargo.toml index c00a482c..f1bbadc7 100644 --- a/bootloader/test_infra/Cargo.toml +++ b/bootloader/test_infra/Cargo.toml @@ -7,12 +7,12 @@ edition = "2021" [dependencies] -vm = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } -zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } -zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } -zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } -zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } -vlog = { git = "https://github.com/matter-labs/zksync-era.git", tag = "v7.0.0-rc0" } +vm = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } +zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } +zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } +zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } +zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } +vlog = { git = "https://github.com/matter-labs/zksync-era.git", branch = "mmzk_1006_fix_tracer" } colored = "2.0" hex = "0.4" diff --git a/bootloader/test_infra/src/tracer.rs b/bootloader/test_infra/src/tracer.rs index 70830729..942389f2 100644 --- a/bootloader/test_infra/src/tracer.rs +++ b/bootloader/test_infra/src/tracer.rs @@ -5,7 +5,7 @@ use colored::Colorize; use once_cell::sync::OnceCell; use vm::{ DynTracer, ExecutionEndTracer, ExecutionProcessing, Halt, HistoryMode, SimpleMemory, - VmExecutionResultAndLogs, VmTracer, + TracerExecutionStatus, TracerExecutionStopReason, VmExecutionResultAndLogs, VmTracer, }; use zksync_state::{StoragePtr, WriteStorage}; use zksync_types::zkevm_test_harness::zk_evm::tracing::{BeforeExecutionData, VmLocalStateData}; @@ -73,15 +73,15 @@ impl DynTracer for BootloaderTestTracer { } impl ExecutionEndTracer for BootloaderTestTracer { - fn should_stop_execution(&self) -> bool { + fn should_stop_execution(&self) -> TracerExecutionStatus { if let Some(TestResult { test_name: _, result: Err(_), }) = self.test_result.get() { - return true; + return TracerExecutionStatus::Stop(TracerExecutionStopReason::Finish); } - return false; + return TracerExecutionStatus::Continue; } } diff --git a/package.json b/package.json index b7f87fa4..f4876dca 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "@types/chai": "^4.3.1", "@types/mocha": "^9.1.1", "@types/node": "^17.0.34", - "@typechain/hardhat": "^8.0.0", "chai": "^4.3.6", "mocha": "^10.0.0", "prettier": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index 1578fc65..13010299 100644 --- a/yarn.lock +++ b/yarn.lock @@ -859,10 +859,10 @@ lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/hardhat@^8.0.0": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-8.0.3.tgz#a114825f130405bbb8e535314003733b7ce3f91c" - integrity sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng== +"@typechain/hardhat@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-7.0.0.tgz#ffa7465328150e793007fee616ae7b76ed20784d" + integrity sha512-XB79i5ewg9Met7gMVGfgVkmypicbnI25T5clJBEooMoW2161p4zvKFpoS2O+lBppQyMrPIZkdvl2M3LMDayVcA== dependencies: fs-extra "^9.1.0"