diff --git a/.eslintignore b/.eslintignore
index 6773d535d8c..6bde0a2282e 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -5,4 +5,8 @@ build/
dist/
volumes/
.tslintrc.js
-bellman-cuda
\ No newline at end of file
+bellman-cuda
+
+# Ignore contract submodules
+contracts
+etc/system-contracts
\ No newline at end of file
diff --git a/.github/workflows/build-core-template.yml b/.github/workflows/build-core-template.yml
index 6c7f5c92260..7845ed9ced2 100644
--- a/.github/workflows/build-core-template.yml
+++ b/.github/workflows/build-core-template.yml
@@ -82,8 +82,10 @@ jobs:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
run: |
+ ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
+ ci_run gcloud auth configure-docker us-docker.pkg.dev,asia-docker.pkg.dev -q
+ ci_run rustup default nightly-2023-07-21
ci_run zk docker $DOCKER_ACTION $COMPONENT -- --public
-
- name: Show sccache stats
if: always()
run: |
diff --git a/.github/workflows/build-docker-from-tag.yml b/.github/workflows/build-docker-from-tag.yml
index 9dcd114b680..0d499a33c7a 100644
--- a/.github/workflows/build-docker-from-tag.yml
+++ b/.github/workflows/build-docker-from-tag.yml
@@ -25,6 +25,8 @@ jobs:
runs-on: [ubuntu-latest]
outputs:
image_tag_suffix: ${{ steps.set.outputs.image_tag_suffix }}
+ prover_fri_cpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.cpu_short_commit_sha }}
+ prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
@@ -42,6 +44,20 @@ jobs:
version=$(cut -d "-" -f2 <<< ${git_tag})
echo "image_tag_suffix=${version}" >> $GITHUB_OUTPUT
+ - name: Generate outputs with Prover FRI setup data keys IDs
+ id: extract-prover-fri-setup-key-ids
+ run: |
+ declare -A json_files=(
+ ["cpu"]="setup-data-cpu-keys.json"
+ ["gpu"]="setup-data-gpu-keys.json"
+ )
+ for type in "${!json_files[@]}"; do
+ file=${json_files[$type]}
+ value=$(jq -r '.us' "./prover/$file")
+ short_sha=$(echo $value | sed 's|gs://matterlabs-setup-data-us/\(.*\)/|\1|')
+ echo "${type}_short_commit_sha=$short_sha" >> $GITHUB_OUTPUT
+ done
+
build-push-core-images:
name: Build and push image
needs: [setup]
@@ -84,5 +100,5 @@ jobs:
uses: ./.github/workflows/build-prover-fri-gpu-gar.yml
if: contains(github.ref_name, 'prover')
with:
- setup_keys_id: 2d33a27-gpu
+ setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
diff --git a/.github/workflows/release-test-stage.yml b/.github/workflows/release-test-stage.yml
index 0b6bd5d6b4c..ba90843f863 100644
--- a/.github/workflows/release-test-stage.yml
+++ b/.github/workflows/release-test-stage.yml
@@ -27,7 +27,8 @@ jobs:
uses: tj-actions/changed-files@v37
with:
files_yaml: |
- # If you want to exclude some files, please adjust here.
+ # TODO: make it more granular, as already implemented in CI workflow
+ # We don't want to be rebuilding and redeploying all the Docker images when eg. only document have changed
prover:
- prover/**
core:
@@ -40,6 +41,8 @@ jobs:
runs-on: [matterlabs-deployer-stage]
outputs:
image_tag_suffix: ${{ steps.generate-tag-suffix.outputs.image_tag_suffix }}
+ prover_fri_cpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.cpu_short_commit_sha }}
+ prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
@@ -52,6 +55,20 @@ jobs:
ts=$(date +%s%N | cut -b1-13)
echo "image_tag_suffix=${sha}-${ts}" >> $GITHUB_OUTPUT
+ - name: Generate outputs with Prover FRI setup data keys IDs
+ id: extract-prover-fri-setup-key-ids
+ run: |
+ declare -A json_files=(
+ ["cpu"]="setup-data-cpu-keys.json"
+ ["gpu"]="setup-data-gpu-keys.json"
+ )
+ for type in "${!json_files[@]}"; do
+ file=${json_files[$type]}
+ value=$(jq -r '.us' "./prover/$file")
+ short_sha=$(echo $value | sed 's|gs://matterlabs-setup-data-us/\(.*\)/|\1|')
+ echo "${type}_short_commit_sha=$short_sha" >> $GITHUB_OUTPUT
+ done
+
build-push-core-images:
name: Build and push images
needs: [setup, changed_files]
@@ -94,5 +111,5 @@ jobs:
uses: ./.github/workflows/build-prover-fri-gpu-gar.yml
if: needs.changed_files.outputs.prover == 'true' || needs.changed_files.outputs.all == 'true'
with:
- setup_keys_id: 2d33a27-gpu
+ setup_keys_id: ${{ needs.setup.outputs.prover_fri_gpu_key_id }}
image_tag_suffix: ${{ needs.setup.outputs.image_tag_suffix }}
diff --git a/.markdownlintignore b/.markdownlintignore
index 05ba7370295..17f362751de 100644
--- a/.markdownlintignore
+++ b/.markdownlintignore
@@ -1,2 +1,6 @@
# Ignore submodule
bellman-cuda
+
+# Ignore contract submodules
+contracts
+etc/system-contracts
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
index aab23740d8e..a68a572643c 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,3 +2,7 @@
bellman-cuda
sdk/zksync-rs/CHANGELOG.md
CHANGELOG.md
+
+# Ignore contract submodules
+contracts
+etc/system-contracts
diff --git a/.solhintignore b/.solhintignore
new file mode 100644
index 00000000000..24b618546bb
--- /dev/null
+++ b/.solhintignore
@@ -0,0 +1,3 @@
+# Ignore contract submodules
+contracts
+etc/system-contracts
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index 610e4496684..29e9b3be3b9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9,13 +9,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8"
dependencies = [
"bitflags 1.3.2",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-core",
"futures-sink",
"memchr",
"pin-project-lite",
"tokio",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tracing",
]
@@ -36,19 +36,19 @@ dependencies = [
[[package]]
name = "actix-http"
-version = "3.3.1"
+version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74"
+checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9"
dependencies = [
"actix-codec",
"actix-rt",
"actix-service",
"actix-utils",
- "ahash 0.8.3",
- "base64 0.21.2",
- "bitflags 1.3.2",
+ "ahash 0.8.5",
+ "base64 0.21.5",
+ "bitflags 2.4.1",
"brotli",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"bytestring",
"derive_more",
"encoding_rs",
@@ -68,19 +68,19 @@ dependencies = [
"sha1",
"smallvec",
"tokio",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tracing",
- "zstd 0.12.3+zstd.1.5.2",
+ "zstd 0.12.4",
]
[[package]]
name = "actix-macros"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6"
+checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [
"quote 1.0.33",
- "syn 1.0.109",
+ "syn 2.0.38",
]
[[package]]
@@ -98,9 +98,9 @@ dependencies = [
[[package]]
name = "actix-rt"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e"
+checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d"
dependencies = [
"actix-macros",
"futures-core",
@@ -109,18 +109,17 @@ dependencies = [
[[package]]
name = "actix-server"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327"
+checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4"
dependencies = [
"actix-rt",
"actix-service",
"actix-utils",
"futures-core",
"futures-util",
- "mio 0.8.8",
- "num_cpus",
- "socket2",
+ "mio 0.8.9",
+ "socket2 0.5.5",
"tokio",
"tracing",
]
@@ -148,9 +147,9 @@ dependencies = [
[[package]]
name = "actix-web"
-version = "4.3.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96"
+checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9"
dependencies = [
"actix-codec",
"actix-http",
@@ -161,8 +160,8 @@ dependencies = [
"actix-service",
"actix-utils",
"actix-web-codegen",
- "ahash 0.7.6",
- "bytes 1.4.0",
+ "ahash 0.8.5",
+ "bytes 1.5.0",
"bytestring",
"cfg-if 1.0.0",
"cookie",
@@ -170,7 +169,6 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
- "http",
"itoa",
"language-tags",
"log",
@@ -182,21 +180,21 @@ dependencies = [
"serde_json",
"serde_urlencoded",
"smallvec",
- "socket2",
+ "socket2 0.5.5",
"time",
"url",
]
[[package]]
name = "actix-web-codegen"
-version = "4.2.0"
+version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9"
+checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"
dependencies = [
"actix-router",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 1.0.109",
+ "syn 2.0.38",
]
[[package]]
@@ -212,9 +210,9 @@ dependencies = [
[[package]]
name = "addr2line"
-version = "0.19.0"
+version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
"gimli",
]
@@ -270,9 +268,9 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.7.6"
+version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
+checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd"
dependencies = [
"getrandom 0.2.10",
"once_cell",
@@ -281,30 +279,22 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.8.3"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
+checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d"
dependencies = [
"cfg-if 1.0.0",
"getrandom 0.2.10",
"once_cell",
"version_check",
+ "zerocopy",
]
[[package]]
name = "aho-corasick"
-version = "0.7.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "aho-corasick"
-version = "1.0.2"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
dependencies = [
"memchr",
]
@@ -356,30 +346,29 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.3.2"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163"
+checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
- "is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.0"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
[[package]]
name = "anstyle-parse"
-version = "0.2.0"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
dependencies = [
"utf8parse",
]
@@ -395,9 +384,9 @@ dependencies = [
[[package]]
name = "anstyle-wincon"
-version = "1.0.1"
+version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188"
+checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
dependencies = [
"anstyle",
"windows-sys 0.48.0",
@@ -405,9 +394,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.71"
+version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8"
+checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]]
name = "arr_macro"
@@ -453,9 +442,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "arrayvec"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8868f09ff8cea88b079da74ae569d9b8c62a23c68c746240b704ee6f7525c89c"
+checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "assert_matches"
@@ -465,9 +454,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
[[package]]
name = "async-compression"
-version = "0.3.15"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a"
+checksum = "f658e2baef915ba0f26f1f7c42bfb8e12f532a01f449a090ded75ae7a07e9ba2"
dependencies = [
"brotli",
"flate2",
@@ -475,15 +464,15 @@ dependencies = [
"memchr",
"pin-project-lite",
"tokio",
- "zstd 0.11.2+zstd.1.5.2",
- "zstd-safe 5.0.2+zstd.1.5.2",
+ "zstd 0.13.0",
+ "zstd-safe 7.0.0",
]
[[package]]
name = "async-lock"
-version = "2.7.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
+checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b"
dependencies = [
"event-listener",
]
@@ -505,20 +494,20 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "async-trait"
-version = "0.1.73"
+version = "0.1.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
+checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -558,14 +547,14 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "axum"
-version = "0.6.19"
+version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c"
+checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
dependencies = [
"async-trait",
"axum-core",
"bitflags 1.3.2",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-util",
"http",
"http-body",
@@ -594,7 +583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
dependencies = [
"async-trait",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-util",
"http",
"http-body",
@@ -610,7 +599,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c1a6197b2120bb2185a267f6515038558b019e92b832bb0320e96d66268dcf9"
dependencies = [
- "fastrand",
+ "fastrand 1.9.0",
"futures-core",
"pin-project",
"tokio",
@@ -618,15 +607,15 @@ dependencies = [
[[package]]
name = "backtrace"
-version = "0.3.67"
+version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca"
+checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
dependencies = [
"addr2line",
"cc",
"cfg-if 1.0.0",
"libc",
- "miniz_oxide 0.6.2",
+ "miniz_oxide",
"object",
"rustc-demangle",
]
@@ -645,15 +634,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
-
-[[package]]
-name = "base64"
-version = "0.21.2"
+version = "0.21.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
+checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
[[package]]
name = "base64ct"
@@ -675,7 +658,7 @@ name = "bellman_ce"
version = "0.3.2"
source = "git+https://github.com/matter-labs/bellman?branch=dev#5520aa2274afe73d281373c92b007a2ecdebfbea"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bit-vec",
"blake2s_const 0.6.0 (git+https://github.com/matter-labs/bellman?branch=dev)",
"blake2s_simd",
@@ -698,7 +681,7 @@ name = "bellman_ce"
version = "0.3.2"
source = "git+https://github.com/matter-labs/bellman?branch=snark-wrapper#e01e5fa08a97a113e76ec8a69d06fe6cc2c82d17"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bit-vec",
"blake2s_const 0.6.0 (git+https://github.com/matter-labs/bellman?branch=snark-wrapper)",
"blake2s_simd",
@@ -750,12 +733,12 @@ dependencies = [
"lazycell",
"peeking_take_while",
"prettyplease",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -775,9 +758,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.3.2"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dbe3c979c178231552ecba20214a8272df4e09f232a87aef4320cf06539aded"
+checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
[[package]]
name = "bitvec"
@@ -934,7 +917,7 @@ name = "block_reverter"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.3.4",
+ "clap 4.4.6",
"serde_json",
"tokio",
"vlog",
@@ -949,7 +932,7 @@ name = "boojum"
version = "0.1.0"
source = "git+https://github.com/matter-labs/era-boojum.git?branch=main#84754b066959c8fdfb77edf730fc13ed87404907"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bincode",
"blake2 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
"const_format",
@@ -977,9 +960,9 @@ dependencies = [
[[package]]
name = "brotli"
-version = "3.3.4"
+version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"
+checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -988,9 +971,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
-version = "2.3.4"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744"
+checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -998,9 +981,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.5.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5"
+checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019"
dependencies = [
"memchr",
"serde",
@@ -1008,9 +991,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.13.0"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1"
+checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "byte-slice-cast"
@@ -1026,15 +1009,15 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
[[package]]
name = "bytecount"
-version = "0.6.3"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c"
+checksum = "d1a12477b7237a01c11a80a51278165f9ba0edd28fa6db00a65ab230320dc58c"
[[package]]
name = "byteorder"
-version = "1.4.3"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
@@ -1048,9 +1031,9 @@ dependencies = [
[[package]]
name = "bytes"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
+checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "bytestring"
@@ -1058,7 +1041,7 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
]
[[package]]
@@ -1074,18 +1057,18 @@ dependencies = [
[[package]]
name = "camino"
-version = "1.1.4"
+version = "1.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"
+checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"
dependencies = [
"serde",
]
[[package]]
name = "cargo-platform"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27"
+checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36"
dependencies = [
"serde",
]
@@ -1111,11 +1094,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.0.79"
+version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"jobserver",
+ "libc",
]
[[package]]
@@ -1151,7 +1135,7 @@ dependencies = [
"num-traits",
"serde",
"wasm-bindgen",
- "windows-targets 0.48.0",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -1245,44 +1229,42 @@ checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"bitflags 1.3.2",
"clap_lex 0.2.4",
- "indexmap",
+ "indexmap 1.9.3",
"textwrap 0.16.0",
]
[[package]]
name = "clap"
-version = "4.3.4"
+version = "4.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80672091db20273a15cf9fdd4e47ed43b5091ec9841bf4c6145c9dfbbcae09ed"
+checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956"
dependencies = [
"clap_builder",
"clap_derive",
- "once_cell",
]
[[package]]
name = "clap_builder"
-version = "4.3.4"
+version = "4.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1458a1df40e1e2afebb7ab60ce55c1fa8f431146205aa5f4887e0b111c27636"
+checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45"
dependencies = [
"anstream",
"anstyle",
- "bitflags 1.3.2",
- "clap_lex 0.5.0",
+ "clap_lex 0.5.1",
"strsim 0.10.0",
]
[[package]]
name = "clap_derive"
-version = "4.3.2"
+version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f"
+checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873"
dependencies = [
"heck 0.4.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -1296,9 +1278,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b"
+checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
[[package]]
name = "cloudabi"
@@ -1331,7 +1313,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff61280aed771c3070e7dcc9e050c66f1eb1e3b96431ba66f9f74641d02fc41d"
dependencies = [
- "indexmap",
+ "indexmap 1.9.3",
]
[[package]]
@@ -1346,7 +1328,7 @@ version = "4.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"memchr",
]
@@ -1370,26 +1352,26 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3"
[[package]]
name = "const-oid"
-version = "0.9.2"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"
+checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f"
[[package]]
name = "const_format"
-version = "0.2.31"
+version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c990efc7a285731f9a4378d81aff2f0e85a2c8781a05ef0f8baa8dac54d0ff48"
+checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673"
dependencies = [
"const_format_proc_macros",
]
[[package]]
name = "const_format_proc_macros"
-version = "0.2.31"
+version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e026b6ce194a874cb9cf32cd5772d1ef9767cc8fcb5765948d74f37a9d8b2bf6"
+checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"unicode-xid 0.2.4",
]
@@ -1444,9 +1426,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]]
name = "cpufeatures"
-version = "0.2.8"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
+checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4"
dependencies = [
"libc",
]
@@ -1739,10 +1721,10 @@ dependencies = [
[[package]]
name = "cs_derive"
version = "0.1.0"
-source = "git+https://github.com/matter-labs/era-boojum.git?branch=main#2771569baab9a59690d88cee6ba9b295c8a1e4c4"
+source = "git+https://github.com/matter-labs/era-boojum.git?branch=main#84754b066959c8fdfb77edf730fc13ed87404907"
dependencies = [
"proc-macro-error",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -1753,7 +1735,7 @@ version = "0.1.0"
source = "git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3#ed8ab8984cae05d00d9d62196753c8d40df47c7d"
dependencies = [
"proc-macro-error",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"serde",
"syn 1.0.109",
@@ -1770,9 +1752,9 @@ dependencies = [
[[package]]
name = "ctrlc"
-version = "3.4.0"
+version = "3.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e"
+checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf"
dependencies = [
"nix",
"windows-sys 0.48.0",
@@ -1796,7 +1778,7 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610"
dependencies = [
"fnv",
"ident_case",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"strsim 0.10.0",
"syn 1.0.109",
@@ -1815,15 +1797,15 @@ dependencies = [
[[package]]
name = "dashmap"
-version = "5.4.0"
+version = "5.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc"
+checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
dependencies = [
"cfg-if 1.0.0",
- "hashbrown 0.12.3",
+ "hashbrown 0.14.2",
"lock_api",
"once_cell",
- "parking_lot_core 0.9.8",
+ "parking_lot_core 0.9.9",
]
[[package]]
@@ -1853,17 +1835,27 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"
dependencies = [
- "const-oid 0.9.2",
+ "const-oid 0.9.5",
"zeroize",
]
+[[package]]
+name = "deranged"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
+dependencies = [
+ "powerfmt",
+ "serde",
+]
+
[[package]]
name = "derivative"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -1875,7 +1867,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [
"convert_case 0.4.0",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"rustc_version",
"syn 1.0.109",
@@ -1956,9 +1948,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
dependencies = [
"serde",
]
@@ -2000,9 +1992,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "encoding_rs"
-version = "0.8.32"
+version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394"
+checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
dependencies = [
"cfg-if 1.0.0",
]
@@ -2020,6 +2012,19 @@ dependencies = [
"termcolor",
]
+[[package]]
+name = "env_logger"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0"
+dependencies = [
+ "humantime",
+ "is-terminal",
+ "log",
+ "regex",
+ "termcolor",
+]
+
[[package]]
name = "envy"
version = "0.4.2"
@@ -2030,24 +2035,19 @@ dependencies = [
]
[[package]]
-name = "errno"
-version = "0.3.1"
+name = "equivalent"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
-dependencies = [
- "errno-dragonfly",
- "libc",
- "windows-sys 0.48.0",
-]
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
-name = "errno-dragonfly"
-version = "0.1.2"
+name = "errno"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860"
dependencies = [
- "cc",
"libc",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -2126,7 +2126,7 @@ dependencies = [
"fixed-hash 0.8.0",
"impl-rlp",
"impl-serde 0.4.0",
- "primitive-types 0.12.1",
+ "primitive-types 0.12.2",
"uint",
]
@@ -2151,6 +2151,12 @@ dependencies = [
"instant",
]
+[[package]]
+name = "fastrand"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+
[[package]]
name = "ff"
version = "0.12.1"
@@ -2180,10 +2186,10 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b96fbccd88dbb1fac4ee4a07c2fcc4ca719a74ffbd9d2b9d41d8c8eb073d8b20"
dependencies = [
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-integer",
"num-traits",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"serde",
"syn 1.0.109",
@@ -2201,6 +2207,12 @@ dependencies = [
"winapi 0.3.9",
]
+[[package]]
+name = "finl_unicode"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6"
+
[[package]]
name = "firestorm"
version = "0.5.1"
@@ -2233,12 +2245,12 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.26"
+version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
+checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
dependencies = [
"crc32fast",
- "miniz_oxide 0.7.1",
+ "miniz_oxide",
]
[[package]]
@@ -2285,10 +2297,10 @@ dependencies = [
"byteorder",
"digest 0.9.0",
"hex",
- "indexmap",
+ "indexmap 1.9.3",
"itertools",
"lazy_static",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-derive 0.2.5",
"num-integer",
"num-traits",
@@ -2317,10 +2329,10 @@ dependencies = [
"derivative",
"digest 0.9.0",
"hex",
- "indexmap",
+ "indexmap 1.9.3",
"itertools",
"lazy_static",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-derive 0.2.5",
"num-integer",
"num-traits",
@@ -2439,9 +2451,9 @@ version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -2528,9 +2540,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.27.3"
+version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
+checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
[[package]]
name = "glob"
@@ -2540,11 +2552,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
-version = "0.4.10"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc"
+checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d"
dependencies = [
- "aho-corasick 0.7.20",
+ "aho-corasick",
"bstr",
"fnv",
"log",
@@ -2586,9 +2598,9 @@ dependencies = [
[[package]]
name = "gloo-utils"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8e8fc851e9c7b9852508bc6e3f690f452f474417e8545ec9857b7f7377036b5"
+checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e"
dependencies = [
"js-sys",
"serde",
@@ -2604,7 +2616,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "644f40175857d0b8d7b6cad6cd9594284da5041387fa2ddff30ab6d8faef65eb"
dependencies = [
"async-trait",
- "base64 0.21.2",
+ "base64 0.21.5",
"google-cloud-metadata",
"google-cloud-token",
"home",
@@ -2637,8 +2649,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "215abab97e07d144428425509c1dad07e57ea72b84b21bcdb6a8a5f12a5c4932"
dependencies = [
"async-stream",
- "base64 0.21.2",
- "bytes 1.4.0",
+ "base64 0.21.5",
+ "bytes 1.5.0",
"futures-util",
"google-cloud-auth",
"google-cloud-metadata",
@@ -2699,20 +2711,20 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.3.19"
+version = "0.3.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782"
+checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http",
- "indexmap",
+ "indexmap 1.9.3",
"slab",
"tokio",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tracing",
]
@@ -2724,9 +2736,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
[[package]]
name = "handlebars"
-version = "4.3.7"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d"
+checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683"
dependencies = [
"log",
"pest",
@@ -2742,7 +2754,7 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
dependencies = [
- "ahash 0.7.6",
+ "ahash 0.7.7",
]
[[package]]
@@ -2757,9 +2769,15 @@ version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
dependencies = [
- "ahash 0.8.3",
+ "ahash 0.8.5",
]
+[[package]]
+name = "hashbrown"
+version = "0.14.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
+
[[package]]
name = "hashlink"
version = "0.7.0"
@@ -2781,13 +2799,12 @@ dependencies = [
[[package]]
name = "headers"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584"
+checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270"
dependencies = [
- "base64 0.13.1",
- "bitflags 1.3.2",
- "bytes 1.4.0",
+ "base64 0.21.5",
+ "bytes 1.5.0",
"headers-core",
"http",
"httpdate",
@@ -2833,18 +2850,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "hermit-abi"
-version = "0.3.1"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
+checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
[[package]]
name = "hex"
@@ -2906,7 +2914,7 @@ version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"fnv",
"itoa",
]
@@ -2917,16 +2925,16 @@ version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"http",
"pin-project-lite",
]
[[package]]
name = "http-range-header"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29"
+checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
[[package]]
name = "httparse"
@@ -2936,9 +2944,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "humantime"
@@ -2948,11 +2956,11 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.26"
+version = "0.14.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4"
+checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-channel",
"futures-core",
"futures-util",
@@ -2963,7 +2971,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
+ "socket2 0.4.10",
"tokio",
"tower-service",
"tracing",
@@ -2972,10 +2980,11 @@ dependencies = [
[[package]]
name = "hyper-rustls"
-version = "0.24.0"
+version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7"
+checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97"
dependencies = [
+ "futures-util",
"http",
"hyper",
"log",
@@ -2991,7 +3000,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"hyper",
"native-tls",
"tokio",
@@ -3006,16 +3015,16 @@ checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678"
[[package]]
name = "iana-time-zone"
-version = "0.1.57"
+version = "0.1.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613"
+checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
- "windows",
+ "windows-core",
]
[[package]]
@@ -3058,7 +3067,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
dependencies = [
- "parity-scale-codec 3.6.1",
+ "parity-scale-codec 3.6.5",
]
[[package]]
@@ -3094,7 +3103,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -3109,11 +3118,21 @@ dependencies = [
"hashbrown 0.12.3",
]
+[[package]]
+name = "indexmap"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.14.2",
+]
+
[[package]]
name = "insta"
-version = "1.29.0"
+version = "1.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a28d25139df397cbca21408bb742cf6837e04cdbebf1b07b760caf971d6a972"
+checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc"
dependencies = [
"console",
"lazy_static",
@@ -3132,17 +3151,6 @@ dependencies = [
"cfg-if 1.0.0",
]
-[[package]]
-name = "io-lifetimes"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
-dependencies = [
- "hermit-abi 0.3.1",
- "libc",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "iovec"
version = "0.1.4"
@@ -3154,9 +3162,9 @@ dependencies = [
[[package]]
name = "ipnet"
-version = "2.7.2"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f"
+checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "ipnetwork"
@@ -3176,12 +3184,11 @@ dependencies = [
[[package]]
name = "is-terminal"
-version = "0.4.7"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
+checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
dependencies = [
- "hermit-abi 0.3.1",
- "io-lifetimes",
+ "hermit-abi 0.3.3",
"rustix",
"windows-sys 0.48.0",
]
@@ -3197,15 +3204,15 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "jobserver"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
+checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"
dependencies = [
"libc",
]
@@ -3277,7 +3284,7 @@ version = "18.0.0"
source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540"
dependencies = [
"proc-macro-crate 0.1.5",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -3316,7 +3323,7 @@ name = "jsonrpc-server-utils"
version = "18.0.0"
source = "git+https://github.com/matter-labs/jsonrpc.git?branch=master#12c53e3e20c09c2fb9966a4ef1b0ea63de172540"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures 0.3.28",
"globset",
"jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)",
@@ -3376,7 +3383,7 @@ dependencies = [
"thiserror",
"tokio",
"tokio-rustls",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tracing",
"webpki-roots 0.24.0",
]
@@ -3436,7 +3443,7 @@ checksum = "21dc12b1d4f16a86e8c522823c4fab219c88c03eb7c924ec0501a64bf12e058b"
dependencies = [
"heck 0.4.1",
"proc-macro-crate 1.3.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -3456,7 +3463,7 @@ dependencies = [
"soketto",
"tokio",
"tokio-stream",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tower",
"tracing",
]
@@ -3504,7 +3511,7 @@ version = "8.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378"
dependencies = [
- "base64 0.21.2",
+ "base64 0.21.5",
"pem",
"ring",
"serde",
@@ -3572,9 +3579,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libc"
-version = "0.2.146"
+version = "0.2.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b"
+checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
[[package]]
name = "libloading"
@@ -3588,9 +3595,9 @@ dependencies = [
[[package]]
name = "libm"
-version = "0.2.7"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
+checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "librocksdb-sys"
@@ -3608,9 +3615,9 @@ dependencies = [
[[package]]
name = "libz-sys"
-version = "1.1.9"
+version = "1.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db"
+checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b"
dependencies = [
"cc",
"pkg-config",
@@ -3625,29 +3632,29 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linkme"
-version = "0.3.15"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f948366ad5bb46b5514ba7a7a80643726eef08b06632592699676748c8bc33b"
+checksum = "91ed2ee9464ff9707af8e9ad834cffa4802f072caad90639c583dd3c62e6e608"
dependencies = [
"linkme-impl",
]
[[package]]
name = "linkme-impl"
-version = "0.3.15"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc28438cad73dcc90ff3466fc329a9252b1b8ba668eb0d5668ba97088cf4eef0"
+checksum = "ba125974b109d512fccbc6c0244e7580143e460895dfd6ea7f8bbb692fd94396"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "linux-raw-sys"
-version = "0.3.8"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
+checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f"
[[package]]
name = "loadnext"
@@ -3685,13 +3692,12 @@ dependencies = [
[[package]]
name = "local-channel"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c"
+checksum = "e0a493488de5f18c8ffcba89eebb8532ffc562dc400490eb65b84893fae0b178"
dependencies = [
"futures-core",
"futures-sink",
- "futures-util",
"local-waker",
]
@@ -3703,9 +3709,9 @@ checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1"
[[package]]
name = "lock_api"
-version = "0.4.10"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16"
+checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
dependencies = [
"autocfg 1.1.0",
"scopeguard",
@@ -3713,9 +3719,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.19"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
name = "mach"
@@ -3752,9 +3758,9 @@ dependencies = [
[[package]]
name = "matchit"
-version = "0.7.0"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40"
+checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
[[package]]
name = "maybe-uninit"
@@ -3764,18 +3770,19 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "md-5"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca"
+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
+ "cfg-if 1.0.0",
"digest 0.10.7",
]
[[package]]
name = "memchr"
-version = "2.5.0"
+version = "2.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
[[package]]
name = "memoffset"
@@ -3800,7 +3807,7 @@ name = "merkle_tree_consistency_checker"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.3.4",
+ "clap 4.4.6",
"tracing",
"vlog",
"zksync_config",
@@ -3815,7 +3822,7 @@ version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5"
dependencies = [
- "ahash 0.8.3",
+ "ahash 0.8.5",
"metrics-macros",
"portable-atomic",
]
@@ -3826,9 +3833,9 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a4964177ddfdab1e3a2b37aec7cf320e14169abb0ed73999f558136409178d5"
dependencies = [
- "base64 0.21.2",
+ "base64 0.21.5",
"hyper",
- "indexmap",
+ "indexmap 1.9.3",
"ipnet",
"metrics",
"metrics-util",
@@ -3844,9 +3851,9 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -3882,9 +3889,9 @@ dependencies = [
[[package]]
name = "mini-moka"
-version = "0.10.0"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cafc5ec7807288595f9c20c86e6ce6d262b722f61e0547fe7e6e6e6451b58d5"
+checksum = "23e0b72e7c9042467008b10279fc732326bd605459ae03bda88825909dd19b56"
dependencies = [
"crossbeam-channel 0.5.8",
"crossbeam-utils 0.8.16",
@@ -3901,15 +3908,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-[[package]]
-name = "miniz_oxide"
-version = "0.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
-dependencies = [
- "adler",
-]
-
[[package]]
name = "miniz_oxide"
version = "0.7.1"
@@ -3940,9 +3938,9 @@ dependencies = [
[[package]]
name = "mio"
-version = "0.8.8"
+version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
+checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
dependencies = [
"libc",
"log",
@@ -3989,6 +3987,7 @@ dependencies = [
"vise",
"zk_evm 1.3.1",
"zk_evm 1.3.3 (git+https://github.com/matter-labs/era-zk_evm.git?tag=v1.3.3-rc2)",
+ "zk_evm 1.4.0",
"zksync_contracts",
"zksync_eth_signer",
"zksync_state",
@@ -4029,14 +4028,13 @@ dependencies = [
[[package]]
name = "nix"
-version = "0.26.2"
+version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
+checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.1",
"cfg-if 1.0.0",
"libc",
- "static_assertions",
]
[[package]]
@@ -4093,12 +4091,12 @@ dependencies = [
[[package]]
name = "num"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606"
+checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af"
dependencies = [
- "num-bigint 0.4.3",
- "num-complex 0.4.3",
+ "num-bigint 0.4.4",
+ "num-complex 0.4.4",
"num-integer",
"num-iter",
"num-rational 0.4.1",
@@ -4119,9 +4117,9 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
+checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
dependencies = [
"autocfg 1.1.0",
"num-integer",
@@ -4131,9 +4129,9 @@ dependencies = [
[[package]]
name = "num-bigint-dig"
-version = "0.8.2"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2399c9463abc5f909349d8aa9ba080e0b88b3ce2885389b60b993f39b1a56905"
+checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
dependencies = [
"byteorder",
"lazy_static",
@@ -4158,9 +4156,9 @@ dependencies = [
[[package]]
name = "num-complex"
-version = "0.4.3"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
+checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214"
dependencies = [
"num-traits",
]
@@ -4182,7 +4180,7 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -4238,16 +4236,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg 1.1.0",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
-version = "0.2.15"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
dependencies = [
"autocfg 1.1.0",
"libm",
@@ -4255,11 +4253,11 @@ dependencies = [
[[package]]
name = "num_cpus"
-version = "1.15.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi 0.2.6",
+ "hermit-abi 0.3.3",
"libc",
]
@@ -4279,16 +4277,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
dependencies = [
"proc-macro-crate 1.3.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "object"
-version = "0.30.4"
+version = "0.32.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385"
+checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0"
dependencies = [
"memchr",
]
@@ -4323,7 +4321,7 @@ version = "0.10.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c"
dependencies = [
- "bitflags 2.3.2",
+ "bitflags 2.4.1",
"cfg-if 1.0.0",
"foreign-types",
"libc",
@@ -4338,9 +4336,9 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -4374,9 +4372,9 @@ dependencies = [
[[package]]
name = "os_str_bytes"
-version = "6.5.1"
+version = "6.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac"
+checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
[[package]]
name = "overload"
@@ -4449,7 +4447,7 @@ version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bitvec 0.20.4",
"byte-slice-cast",
"impl-trait-for-tuples",
@@ -4459,15 +4457,15 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.6.1"
+version = "3.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967"
+checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bitvec 1.0.1",
"byte-slice-cast",
"impl-trait-for-tuples",
- "parity-scale-codec-derive 3.6.1",
+ "parity-scale-codec-derive 3.6.5",
"serde",
]
@@ -4478,19 +4476,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27"
dependencies = [
"proc-macro-crate 1.3.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
[[package]]
name = "parity-scale-codec-derive"
-version = "3.6.1"
+version = "3.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110"
+checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260"
dependencies = [
"proc-macro-crate 1.3.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -4531,7 +4529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.8",
+ "parking_lot_core 0.9.9",
]
[[package]]
@@ -4550,15 +4548,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447"
+checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
dependencies = [
"cfg-if 1.0.0",
"libc",
- "redox_syscall 0.3.5",
+ "redox_syscall 0.4.1",
"smallvec",
- "windows-targets 0.48.0",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -4573,9 +4571,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.12"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
+checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
name = "pbkdf2"
@@ -4631,19 +4629,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
-version = "2.6.0"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70"
+checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4"
dependencies = [
+ "memchr",
"thiserror",
"ucd-trie",
]
[[package]]
name = "pest_derive"
-version = "2.6.0"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb"
+checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8"
dependencies = [
"pest",
"pest_generator",
@@ -4651,22 +4650,22 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.6.0"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e"
+checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a"
dependencies = [
"pest",
"pest_meta",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "pest_meta"
-version = "2.6.0"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411"
+checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d"
dependencies = [
"once_cell",
"pest",
@@ -4675,29 +4674,29 @@ dependencies = [
[[package]]
name = "pin-project"
-version = "1.1.0"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead"
+checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.0"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07"
+checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "pin-project-lite"
-version = "0.2.9"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]]
name = "pin-utils"
@@ -4745,9 +4744,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
[[package]]
name = "plotters"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
dependencies = [
"num-traits",
"plotters-backend",
@@ -4758,24 +4757,30 @@ dependencies = [
[[package]]
name = "plotters-backend"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
[[package]]
name = "plotters-svg"
-version = "0.3.3"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
dependencies = [
"plotters-backend",
]
[[package]]
name = "portable-atomic"
-version = "1.3.3"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b559898e0b4931ed2d3b959ab0c2da4d99cc644c4b0b1a35b4d344027f474023"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "ppv-lite86"
@@ -4785,12 +4790,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "prettyplease"
-version = "0.2.6"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1"
+checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
dependencies = [
- "proc-macro2 1.0.66",
- "syn 2.0.27",
+ "proc-macro2 1.0.69",
+ "syn 2.0.38",
]
[[package]]
@@ -4808,9 +4813,9 @@ dependencies = [
[[package]]
name = "primitive-types"
-version = "0.12.1"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66"
+checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2"
dependencies = [
"fixed-hash 0.8.0",
"impl-codec 0.6.0",
@@ -4835,7 +4840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
- "toml_edit 0.19.10",
+ "toml_edit 0.19.15",
]
[[package]]
@@ -4845,7 +4850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
"version_check",
@@ -4857,7 +4862,7 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"version_check",
]
@@ -4879,9 +4884,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.66"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
+checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
dependencies = [
"unicode-ident",
]
@@ -4904,9 +4909,9 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -4979,7 +4984,7 @@ version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
]
[[package]]
@@ -5195,9 +5200,9 @@ dependencies = [
[[package]]
name = "rayon"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
dependencies = [
"either",
"rayon-core",
@@ -5205,14 +5210,12 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
dependencies = [
- "crossbeam-channel 0.5.8",
"crossbeam-deque 0.8.3",
"crossbeam-utils 0.8.16",
- "num_cpus",
]
[[package]]
@@ -5242,6 +5245,15 @@ dependencies = [
"bitflags 1.3.2",
]
+[[package]]
+name = "redox_syscall"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
[[package]]
name = "redox_users"
version = "0.4.3"
@@ -5255,14 +5267,14 @@ dependencies = [
[[package]]
name = "regex"
-version = "1.9.1"
+version = "1.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575"
+checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
dependencies = [
- "aho-corasick 1.0.2",
+ "aho-corasick",
"memchr",
- "regex-automata 0.3.2",
- "regex-syntax 0.7.3",
+ "regex-automata 0.4.3",
+ "regex-syntax 0.8.2",
]
[[package]]
@@ -5276,13 +5288,13 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.3.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf"
+checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
dependencies = [
- "aho-corasick 1.0.2",
+ "aho-corasick",
"memchr",
- "regex-syntax 0.7.3",
+ "regex-syntax 0.8.2",
]
[[package]]
@@ -5293,9 +5305,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
-version = "0.7.3"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "remove_dir_all"
@@ -5308,12 +5320,12 @@ dependencies = [
[[package]]
name = "reqwest"
-version = "0.11.18"
+version = "0.11.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
+checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
dependencies = [
- "base64 0.21.2",
- "bytes 1.4.0",
+ "base64 0.21.5",
+ "bytes 1.5.0",
"encoding_rs",
"futures-core",
"futures-util",
@@ -5337,17 +5349,18 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "system-configuration",
"tokio",
"tokio-native-tls",
"tokio-rustls",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
- "webpki-roots 0.22.6",
+ "webpki-roots 0.25.2",
"winreg",
]
@@ -5357,7 +5370,7 @@ version = "0.4.1"
source = "git+https://github.com/matter-labs/rescue-poseidon.git?branch=poseidon2#c4a788471710bdb7aa0f59e8756b45ef93cdd2b2"
dependencies = [
"addchain",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"blake2 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder",
"derivative",
@@ -5379,7 +5392,7 @@ version = "0.4.1"
source = "git+https://github.com/matter-labs/rescue-poseidon#d059b5042df5ed80e151f05751410b524a54d16c"
dependencies = [
"addchain",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"blake2 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder",
"franklin-crypto 0.0.5 (git+https://github.com/matter-labs/franklin-crypto?branch=dev)",
@@ -5436,7 +5449,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"rustc-hex",
]
@@ -5455,7 +5468,7 @@ name = "rocksdb_util"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.3.4",
+ "clap 4.4.6",
"tempfile",
"zksync_config",
"zksync_storage",
@@ -5510,13 +5523,12 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.37.20"
+version = "0.38.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0"
+checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.4.1",
"errno",
- "io-lifetimes",
"libc",
"linux-raw-sys",
"windows-sys 0.48.0",
@@ -5524,13 +5536,13 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.21.2"
+version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f"
+checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8"
dependencies = [
"log",
"ring",
- "rustls-webpki 0.100.3",
+ "rustls-webpki",
"sct",
]
@@ -5548,21 +5560,11 @@ dependencies = [
[[package]]
name = "rustls-pemfile"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
-dependencies = [
- "base64 0.21.2",
-]
-
-[[package]]
-name = "rustls-webpki"
-version = "0.100.3"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3"
+checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2"
dependencies = [
- "ring",
- "untrusted",
+ "base64 0.21.5",
]
[[package]]
@@ -5577,15 +5579,15 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.12"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
+checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "salsa20"
@@ -5607,18 +5609,18 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3"
+checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
dependencies = [
- "windows-sys 0.42.0",
+ "windows-sys 0.48.0",
]
[[package]]
name = "scopeguard"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "scrypt"
@@ -5699,9 +5701,9 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.9.1"
+version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8"
+checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
@@ -5712,9 +5714,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.9.0"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7"
+checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
dependencies = [
"core-foundation-sys",
"libc",
@@ -5722,9 +5724,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.17"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"
+checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
dependencies = [
"serde",
]
@@ -5737,9 +5739,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]]
name = "sentry"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e0bd2cbc3398be701a933e5b7357a4b6b1f94038d2054f118cba90b481a9fbe"
+checksum = "0097a48cd1999d983909f07cb03b15241c5af29e5e679379efac1c06296abecc"
dependencies = [
"httpdate",
"native-tls",
@@ -5756,9 +5758,9 @@ dependencies = [
[[package]]
name = "sentry-backtrace"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9cf043f9bcb6c9ae084b7f10fb363a697c924badcbe7dac2dbeecea31271ed0c"
+checksum = "18a7b80fa1dd6830a348d38a8d3a9761179047757b7dca29aef82db0118b9670"
dependencies = [
"backtrace",
"once_cell",
@@ -5768,9 +5770,9 @@ dependencies = [
[[package]]
name = "sentry-contexts"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16bde19e361cff463253371dbabee51dab416c6f9285d6e62106539f96d12079"
+checksum = "7615dc588930f1fd2e721774f25844ae93add2dbe2d3c2f995ce5049af898147"
dependencies = [
"hostname",
"libc",
@@ -5782,9 +5784,9 @@ dependencies = [
[[package]]
name = "sentry-core"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe345c342f17e48b65451f424ce0848405b6b3a84fa0007ba444b84754bf760a"
+checksum = "8f51264e4013ed9b16558cce43917b983fa38170de2ca480349ceb57d71d6053"
dependencies = [
"once_cell",
"rand 0.8.5",
@@ -5795,9 +5797,9 @@ dependencies = [
[[package]]
name = "sentry-debug-images"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be9460cda9409f799f839510ff3b2ab8db6e457f3085298e18eefc463948e157"
+checksum = "2fe6180fa564d40bb942c9f0084ffb5de691c7357ead6a2b7a3154fae9e401dd"
dependencies = [
"findshlibs",
"once_cell",
@@ -5806,9 +5808,9 @@ dependencies = [
[[package]]
name = "sentry-panic"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "063ac270f11157e435f8b133a007669a3e1a7920e23374485357a8692996188f"
+checksum = "323160213bba549f9737317b152af116af35c0410f4468772ee9b606d3d6e0fa"
dependencies = [
"sentry-backtrace",
"sentry-core",
@@ -5816,9 +5818,9 @@ dependencies = [
[[package]]
name = "sentry-tracing"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc167b6746500ea4bb86c2c13afe7ca6f75f2ed1bcfd84243e870780b8ced529"
+checksum = "38033822128e73f7b6ca74c1631cef8868890c6cb4008a291cf73530f87b4eac"
dependencies = [
"sentry-backtrace",
"sentry-core",
@@ -5828,13 +5830,13 @@ dependencies = [
[[package]]
name = "sentry-types"
-version = "0.31.4"
+version = "0.31.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62d10a5962144f5fb65bb1290551623e6b976f442cb2fcb4e1dfe9fe6f8e8df4"
+checksum = "0e663b3eb62ddfc023c9cf5432daf5f1a4f6acb1df4d78dd80b740b32dd1a740"
dependencies = [
"debugid",
- "getrandom 0.2.10",
"hex",
+ "rand 0.8.5",
"serde",
"serde_json",
"thiserror",
@@ -5845,22 +5847,22 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.175"
+version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b"
+checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.175"
+version = "1.0.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4"
+checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -5915,7 +5917,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
dependencies = [
"darling",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -5958,9 +5960,9 @@ dependencies = [
[[package]]
name = "sha1"
-version = "0.10.5"
+version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
@@ -6034,18 +6036,18 @@ dependencies = [
[[package]]
name = "sharded-slab"
-version = "0.1.4"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]]
name = "shlex"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
+checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380"
[[package]]
name = "signal-hook-registry"
@@ -6068,9 +6070,9 @@ dependencies = [
[[package]]
name = "similar"
-version = "2.2.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
+checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597"
[[package]]
name = "simple_asn1"
@@ -6078,7 +6080,7 @@ version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085"
dependencies = [
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-traits",
"thiserror",
"time",
@@ -6107,18 +6109,18 @@ checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1"
[[package]]
name = "slab"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg 1.1.0",
]
[[package]]
name = "smallvec"
-version = "1.10.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
+checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a"
dependencies = [
"serde",
]
@@ -6126,25 +6128,33 @@ dependencies = [
[[package]]
name = "snark_wrapper"
version = "0.1.0"
-source = "git+https://github.com/matter-labs/snark-wrapper.git?branch=main#450ea6c9f3ede11e149b86ad3a072e673f9846e7"
+source = "git+https://github.com/matter-labs/snark-wrapper.git?branch=main#52f9ef98a7e6c86b405dd0ec42291dacf6e2bcb4"
dependencies = [
- "boojum",
"derivative",
- "franklin-crypto 0.0.5 (git+https://github.com/matter-labs/franklin-crypto?branch=snark_wrapper)",
"rand 0.4.6",
"rescue_poseidon 0.4.1 (git+https://github.com/matter-labs/rescue-poseidon.git?branch=poseidon2)",
]
[[package]]
name = "socket2"
-version = "0.4.9"
+version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
+checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
dependencies = [
"libc",
"winapi 0.3.9",
]
+[[package]]
+name = "socket2"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+dependencies = [
+ "libc",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "soketto"
version = "0.7.1"
@@ -6152,7 +6162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2"
dependencies = [
"base64 0.13.1",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures 0.3.28",
"http",
"httparse",
@@ -6220,13 +6230,13 @@ version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5"
dependencies = [
- "ahash 0.7.6",
+ "ahash 0.7.7",
"atoi",
"base64 0.13.1",
"bigdecimal",
"bitflags 1.3.2",
"byteorder",
- "bytes 1.4.0",
+ "bytes 1.5.0",
"chrono",
"crc",
"crossbeam-queue 0.3.8",
@@ -6241,7 +6251,7 @@ dependencies = [
"hex",
"hkdf",
"hmac 0.12.1",
- "indexmap",
+ "indexmap 1.9.3",
"ipnetwork",
"itoa",
"libc",
@@ -6278,7 +6288,7 @@ dependencies = [
"heck 0.4.1",
"hex",
"once_cell",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"serde",
"serde_json",
@@ -6317,7 +6327,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
name = "storage_logs_dedup_migration"
version = "0.1.0"
dependencies = [
- "clap 4.3.4",
+ "clap 4.4.6",
"tokio",
"zksync_dal",
"zksync_types",
@@ -6325,10 +6335,11 @@ dependencies = [
[[package]]
name = "stringprep"
-version = "0.1.2"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1"
+checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6"
dependencies = [
+ "finl_unicode",
"unicode-bidi",
"unicode-normalization",
]
@@ -6364,7 +6375,7 @@ checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
dependencies = [
"heck 0.3.3",
"proc-macro-error",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"syn 1.0.109",
]
@@ -6385,7 +6396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
"heck 0.4.1",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"rustversion",
"syn 1.0.109",
@@ -6414,18 +6425,18 @@ version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"unicode-ident",
]
[[package]]
name = "syn"
-version = "2.0.27"
+version = "2.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0"
+checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
"unicode-ident",
]
@@ -6435,13 +6446,13 @@ name = "sync_vm"
version = "1.3.3"
source = "git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3#ed8ab8984cae05d00d9d62196753c8d40df47c7d"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"cs_derive 0.1.0 (git+https://github.com/matter-labs/era-sync_vm.git?branch=v1.3.3)",
"derivative",
"franklin-crypto 0.0.5 (git+https://github.com/matter-labs/franklin-crypto?branch=dev)",
"hex",
"itertools",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-derive 0.3.3",
"num-integer",
"num-traits",
@@ -6459,6 +6470,27 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+[[package]]
+name = "system-configuration"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "system-configuration-sys",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
[[package]]
name = "system-constants-generator"
version = "0.1.0"
@@ -6498,13 +6530,12 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.6.0"
+version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
+checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
dependencies = [
- "autocfg 1.1.0",
"cfg-if 1.0.0",
- "fastrand",
+ "fastrand 2.0.1",
"redox_syscall 0.3.5",
"rustix",
"windows-sys 0.48.0",
@@ -6512,22 +6543,22 @@ dependencies = [
[[package]]
name = "termcolor"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
+checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
dependencies = [
"winapi-util",
]
[[package]]
name = "test-log"
-version = "0.2.12"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9601d162c1d77e62c1ea0bc8116cd1caf143ce3af947536c3c9052a1677fe0c"
+checksum = "f66edd6b6cd810743c0c71e1d085e92b01ce6a72782032e3f794c8284fe4bcdd"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 1.0.109",
+ "syn 2.0.38",
]
[[package]]
@@ -6547,22 +6578,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]]
name = "thiserror"
-version = "1.0.40"
+version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
+checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.40"
+version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
+checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -6597,11 +6628,13 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.22"
+version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd"
+checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
dependencies = [
+ "deranged",
"itoa",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -6609,15 +6642,15 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.1"
+version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.9"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b"
+checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
dependencies = [
"time-core",
]
@@ -6667,19 +6700,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.28.2"
+version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
+checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [
- "autocfg 1.1.0",
- "bytes 1.4.0",
+ "backtrace",
+ "bytes 1.5.0",
"libc",
- "mio 0.8.8",
+ "mio 0.8.9",
"num_cpus",
"parking_lot 0.12.1",
"pin-project-lite",
"signal-hook-registry",
- "socket2",
+ "socket2 0.5.5",
"tokio-macros",
"windows-sys 0.48.0",
]
@@ -6690,9 +6723,9 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -6732,7 +6765,7 @@ version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-core",
"futures-sink",
"log",
@@ -6742,11 +6775,11 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.8"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d"
+checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d"
dependencies = [
- "bytes 1.4.0",
+ "bytes 1.5.0",
"futures-core",
"futures-io",
"futures-sink",
@@ -6766,9 +6799,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.2"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f"
+checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
[[package]]
name = "toml_edit"
@@ -6777,17 +6810,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f"
dependencies = [
"combine",
- "indexmap",
+ "indexmap 1.9.3",
"itertools",
]
[[package]]
name = "toml_edit"
-version = "0.19.10"
+version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
- "indexmap",
+ "indexmap 2.0.2",
"toml_datetime",
"winnow",
]
@@ -6801,13 +6834,13 @@ dependencies = [
"futures-core",
"futures-util",
"hdrhistogram",
- "indexmap",
+ "indexmap 1.9.3",
"pin-project",
"pin-project-lite",
"rand 0.8.5",
"slab",
"tokio",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tower-layer",
"tower-service",
"tracing",
@@ -6815,14 +6848,14 @@ dependencies = [
[[package]]
name = "tower-http"
-version = "0.4.1"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8bd22a874a2d0b70452d5597b12c537331d49060824a95f49f108994f94aa4c"
+checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
dependencies = [
"async-compression",
- "base64 0.20.0",
- "bitflags 2.3.2",
- "bytes 1.4.0",
+ "base64 0.21.5",
+ "bitflags 2.4.1",
+ "bytes 1.5.0",
"futures-core",
"futures-util",
"http",
@@ -6835,7 +6868,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"tokio",
- "tokio-util 0.7.8",
+ "tokio-util 0.7.9",
"tower",
"tower-layer",
"tower-service",
@@ -6857,11 +6890,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]]
name = "tracing"
-version = "0.1.37"
+version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
- "cfg-if 1.0.0",
"log",
"pin-project-lite",
"tracing-attributes",
@@ -6870,20 +6902,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.24"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74"
+checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
name = "tracing-core"
-version = "0.1.31"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [
"once_cell",
"valuable",
@@ -6891,12 +6923,12 @@ dependencies = [
[[package]]
name = "tracing-log"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
+checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2"
dependencies = [
- "lazy_static",
"log",
+ "once_cell",
"tracing-core",
]
@@ -6946,15 +6978,15 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
[[package]]
name = "typenum"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "ucd-trie"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
+checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
[[package]]
name = "uint"
@@ -6979,9 +7011,9 @@ dependencies = [
[[package]]
name = "unicase"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
+checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
dependencies = [
"version_check",
]
@@ -6994,9 +7026,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]]
name = "unicode-ident"
-version = "1.0.9"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
@@ -7015,9 +7047,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "unicode-width"
-version = "0.1.10"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "unicode-xid"
@@ -7055,11 +7087,11 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
[[package]]
name = "ureq"
-version = "2.7.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4b45063f47caea744e48f5baa99169bd8bd9b882d80a99941141327bbb00f99"
+checksum = "f5ccd538d4a604753ebc2f17cd9946e89b77bf87f6a8e2309667c6f2e87855e3"
dependencies = [
- "base64 0.21.2",
+ "base64 0.21.5",
"log",
"native-tls",
"once_cell",
@@ -7068,9 +7100,9 @@ dependencies = [
[[package]]
name = "url"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb"
+checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
dependencies = [
"form_urlencoded",
"idna",
@@ -7080,9 +7112,9 @@ dependencies = [
[[package]]
name = "urlencoding"
-version = "2.1.2"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
[[package]]
name = "utf8parse"
@@ -7092,9 +7124,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "uuid"
-version = "1.3.4"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81"
+checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc"
dependencies = [
"getrandom 0.2.10",
"serde",
@@ -7165,9 +7197,9 @@ name = "vise-macros"
version = "0.1.0"
source = "git+https://github.com/matter-labs/vise.git?rev=dd05139b76ab0843443ab3ff730174942c825dae#dd05139b76ab0843443ab3ff730174942c825dae"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
]
[[package]]
@@ -7209,9 +7241,9 @@ dependencies = [
[[package]]
name = "walkdir"
-version = "2.3.3"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file",
"winapi-util",
@@ -7263,9 +7295,9 @@ dependencies = [
"bumpalo",
"log",
"once_cell",
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
"wasm-bindgen-shared",
]
@@ -7297,9 +7329,9 @@ version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
- "proc-macro2 1.0.66",
+ "proc-macro2 1.0.69",
"quote 1.0.33",
- "syn 2.0.27",
+ "syn 2.0.38",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -7312,9 +7344,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "wasm-streams"
-version = "0.2.3"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078"
+checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7"
dependencies = [
"futures-util",
"js-sys",
@@ -7339,9 +7371,9 @@ version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5388522c899d1e1c96a4c307e3797e0f697ba7c77dd8e0e625ecba9dd0342937"
dependencies = [
- "arrayvec 0.7.3",
- "base64 0.21.2",
- "bytes 1.4.0",
+ "arrayvec 0.7.4",
+ "base64 0.21.5",
+ "bytes 1.5.0",
"derive_more",
"ethabi",
"ethereum-types 0.14.1",
@@ -7364,39 +7396,26 @@ dependencies = [
"url",
]
-[[package]]
-name = "webpki"
-version = "0.22.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f"
-dependencies = [
- "ring",
- "untrusted",
-]
-
[[package]]
name = "webpki-roots"
-version = "0.22.6"
+version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
+checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888"
dependencies = [
- "webpki",
+ "rustls-webpki",
]
[[package]]
name = "webpki-roots"
-version = "0.24.0"
+version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888"
-dependencies = [
- "rustls-webpki 0.101.6",
-]
+checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc"
[[package]]
name = "whoami"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68"
+checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50"
dependencies = [
"wasm-bindgen",
"web-sys",
@@ -7432,9 +7451,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi 0.3.9",
]
@@ -7446,27 +7465,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
-name = "windows"
-version = "0.48.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
-dependencies = [
- "windows-targets 0.48.0",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.42.0"
+name = "windows-core"
+version = "0.51.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
+checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64"
dependencies = [
- "windows_aarch64_gnullvm 0.42.2",
- "windows_aarch64_msvc 0.42.2",
- "windows_i686_gnu 0.42.2",
- "windows_i686_msvc 0.42.2",
- "windows_x86_64_gnu 0.42.2",
- "windows_x86_64_gnullvm 0.42.2",
- "windows_x86_64_msvc 0.42.2",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -7484,7 +7488,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
- "windows-targets 0.48.0",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -7504,17 +7508,17 @@ dependencies = [
[[package]]
name = "windows-targets"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
- "windows_aarch64_gnullvm 0.48.0",
- "windows_aarch64_msvc 0.48.0",
- "windows_i686_gnu 0.48.0",
- "windows_i686_msvc 0.48.0",
- "windows_x86_64_gnu 0.48.0",
- "windows_x86_64_gnullvm 0.48.0",
- "windows_x86_64_msvc 0.48.0",
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
]
[[package]]
@@ -7525,9 +7529,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
@@ -7537,9 +7541,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
@@ -7549,9 +7553,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
[[package]]
name = "windows_i686_gnu"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
@@ -7561,9 +7565,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
[[package]]
name = "windows_i686_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
@@ -7573,9 +7577,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
@@ -7585,9 +7589,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
[[package]]
name = "windows_x86_64_gnullvm"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
@@ -7597,26 +7601,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.48.0"
+version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "winnow"
-version = "0.4.7"
+version = "0.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
+checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
-version = "0.10.1"
+version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
dependencies = [
- "winapi 0.3.9",
+ "cfg-if 1.0.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -7653,6 +7658,26 @@ dependencies = [
"linked-hash-map",
]
+[[package]]
+name = "zerocopy"
+version = "0.7.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c19fae0c8a9efc6a8281f2e623db8af1db9e57852e04cde3e754dd2dc29340f"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc56589e9ddd1f1c28d4b4b5c773ce232910a6bb67a70133d61c9e347585efe9"
+dependencies = [
+ "proc-macro2 1.0.69",
+ "quote 1.0.33",
+ "syn 2.0.38",
+]
+
[[package]]
name = "zeroize"
version = "1.6.0"
@@ -7667,7 +7692,7 @@ dependencies = [
"blake2 0.10.6 (git+https://github.com/RustCrypto/hashes.git?rev=1f727ce37ff40fa0cce84eb8543a45bdd3ca4a4e)",
"k256",
"lazy_static",
- "num 0.4.0",
+ "num 0.4.1",
"serde",
"serde_json",
"sha2 0.10.6",
@@ -7683,7 +7708,7 @@ source = "git+https://github.com/matter-labs/era-zk_evm.git?tag=v1.3.3-rc2#fbee2
dependencies = [
"anyhow",
"lazy_static",
- "num 0.4.0",
+ "num 0.4.1",
"serde",
"serde_json",
"static_assertions",
@@ -7698,7 +7723,7 @@ source = "git+https://github.com/matter-labs/era-zk_evm.git?branch=v1.3.3#fbee20
dependencies = [
"anyhow",
"lazy_static",
- "num 0.4.0",
+ "num 0.4.1",
"serde",
"serde_json",
"static_assertions",
@@ -7713,7 +7738,7 @@ source = "git+https://github.com/matter-labs/era-zk_evm.git?branch=v1.4.0#dd76fc
dependencies = [
"anyhow",
"lazy_static",
- "num 0.4.0",
+ "num 0.4.1",
"serde",
"serde_json",
"static_assertions",
@@ -7737,12 +7762,12 @@ name = "zkevm-assembly"
version = "1.3.2"
source = "git+https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.2#3c61d450cbe6548068be8f313ed02f1bd229a865"
dependencies = [
- "env_logger",
+ "env_logger 0.9.3",
"hex",
"lazy_static",
"log",
"nom",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-traits",
"sha3 0.10.8",
"smallvec",
@@ -7756,7 +7781,7 @@ name = "zkevm_circuits"
version = "1.4.0"
source = "git+https://github.com/matter-labs/era-zkevm_circuits.git?branch=main#4fba537ccecc238e2da9c80844dc8c185e42466f"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bincode",
"boojum",
"cs_derive 0.1.0 (git+https://github.com/matter-labs/era-boojum.git?branch=main)",
@@ -7787,7 +7812,7 @@ name = "zkevm_opcode_defs"
version = "1.3.2"
source = "git+https://github.com/matter-labs/era-zkevm_opcode_defs.git?branch=v1.3.2#dffacadeccdfdbff4bc124d44c595c4a6eae5013"
dependencies = [
- "bitflags 2.3.2",
+ "bitflags 2.4.1",
"blake2 0.10.6 (git+https://github.com/RustCrypto/hashes.git?rev=1f727ce37ff40fa0cce84eb8543a45bdd3ca4a4e)",
"ethereum-types 0.14.1",
"k256",
@@ -7806,9 +7831,9 @@ dependencies = [
"codegen 0.2.0",
"crossbeam 0.8.2",
"derivative",
- "env_logger",
+ "env_logger 0.10.0",
"hex",
- "num-bigint 0.4.3",
+ "num-bigint 0.4.4",
"num-integer",
"num-traits",
"rayon",
@@ -7833,7 +7858,7 @@ dependencies = [
"codegen 0.2.0",
"crossbeam 0.8.2",
"derivative",
- "env_logger",
+ "env_logger 0.10.0",
"hex",
"rand 0.4.6",
"rayon",
@@ -8122,7 +8147,7 @@ name = "zksync_external_node"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.3.4",
+ "clap 4.4.6",
"envy",
"futures 0.3.28",
"prometheus_exporter",
@@ -8170,7 +8195,7 @@ name = "zksync_merkle_tree"
version = "0.1.0"
dependencies = [
"assert_matches",
- "clap 4.3.4",
+ "clap 4.4.6",
"insta",
"leb128",
"once_cell",
@@ -8254,7 +8279,7 @@ name = "zksync_server"
version = "0.1.0"
dependencies = [
"anyhow",
- "clap 4.3.4",
+ "clap 4.4.6",
"futures 0.3.28",
"tikv-jemallocator",
"tokio",
@@ -8349,6 +8374,7 @@ dependencies = [
"thiserror",
"tokio",
"zk_evm 1.3.3 (git+https://github.com/matter-labs/era-zk_evm.git?tag=v1.3.3-rc2)",
+ "zk_evm 1.4.0",
"zkevm_test_harness 1.3.3",
"zksync_basic_types",
"zksync_contracts",
@@ -8415,27 +8441,27 @@ dependencies = [
[[package]]
name = "zstd"
-version = "0.11.2+zstd.1.5.2"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
+checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c"
dependencies = [
- "zstd-safe 5.0.2+zstd.1.5.2",
+ "zstd-safe 6.0.6",
]
[[package]]
name = "zstd"
-version = "0.12.3+zstd.1.5.2"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806"
+checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110"
dependencies = [
- "zstd-safe 6.0.5+zstd.1.5.4",
+ "zstd-safe 7.0.0",
]
[[package]]
name = "zstd-safe"
-version = "5.0.2+zstd.1.5.2"
+version = "6.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
+checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581"
dependencies = [
"libc",
"zstd-sys",
@@ -8443,21 +8469,19 @@ dependencies = [
[[package]]
name = "zstd-safe"
-version = "6.0.5+zstd.1.5.4"
+version = "7.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b"
+checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e"
dependencies = [
- "libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.8+zstd.1.5.5"
+version = "2.0.9+zstd.1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c"
+checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656"
dependencies = [
"cc",
- "libc",
"pkg-config",
]
diff --git a/contracts b/contracts
index f06a58360a2..5ca368a4377 160000
--- a/contracts
+++ b/contracts
@@ -1 +1 @@
-Subproject commit f06a58360a2b8e7129f64413998767ac169d1efd
+Subproject commit 5ca368a4377568b003c585dcd105265fd693f1d7
diff --git a/core/bin/zksync_server/src/main.rs b/core/bin/zksync_server/src/main.rs
index 01ad9f04c4f..4a0bff0cd44 100644
--- a/core/bin/zksync_server/src/main.rs
+++ b/core/bin/zksync_server/src/main.rs
@@ -4,7 +4,7 @@ use clap::Parser;
use std::{str::FromStr, time::Duration};
use zksync_config::configs::chain::NetworkConfig;
-use zksync_config::{ContractsConfig, ETHSenderConfig};
+use zksync_config::{ContractsConfig, ETHClientConfig, ETHSenderConfig};
use zksync_core::{
genesis_init, initialize_components, is_genesis_needed, setup_sigint_handler, Component,
Components,
@@ -80,7 +80,8 @@ async fn main() -> anyhow::Result<()> {
let network = NetworkConfig::from_env().context("NetworkConfig")?;
let eth_sender = ETHSenderConfig::from_env().context("ETHSenderConfig")?;
let contracts = ContractsConfig::from_env().context("ContractsConfig")?;
- genesis_init(ð_sender, &network, &contracts)
+ let eth_client = ETHClientConfig::from_env().context("EthClientConfig")?;
+ genesis_init(ð_sender, &network, &contracts, ð_client.web3_url)
.await
.context("genesis_init")?;
if opt.genesis {
diff --git a/core/lib/config/src/configs/contracts.rs b/core/lib/config/src/configs/contracts.rs
index 21559ba2adb..5980a165cfe 100644
--- a/core/lib/config/src/configs/contracts.rs
+++ b/core/lib/config/src/configs/contracts.rs
@@ -5,13 +5,20 @@ use zksync_basic_types::{Address, H256};
// Local uses
use super::envy_load;
+#[derive(Debug, Deserialize, Clone, PartialEq)]
+#[serde(rename_all = "lowercase")]
+pub enum ProverAtGenesis {
+ Fri,
+ Old,
+}
+
/// Data about deployed contracts.
#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct ContractsConfig {
+ pub governance_addr: Address,
pub mailbox_facet_addr: Address,
pub executor_facet_addr: Address,
- pub governance_facet_addr: Address,
- pub diamond_cut_facet_addr: Address,
+ pub admin_facet_addr: Address,
pub getters_facet_addr: Address,
pub verifier_addr: Address,
pub diamond_init_addr: Address,
@@ -34,7 +41,7 @@ pub struct ContractsConfig {
pub fri_recursion_scheduler_level_vk_hash: H256,
pub fri_recursion_node_level_vk_hash: H256,
pub fri_recursion_leaf_level_vk_hash: H256,
- pub governance_addr: Option
,
+ pub prover_at_genesis: ProverAtGenesis,
pub snark_wrapper_vk_hash: H256,
}
@@ -53,10 +60,10 @@ mod tests {
fn expected_config() -> ContractsConfig {
ContractsConfig {
+ governance_addr: addr("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045"),
mailbox_facet_addr: addr("0f6Fa881EF414Fc6E818180657c2d5CD7Ac6cCAd"),
executor_facet_addr: addr("18B631537801963A964211C0E86645c1aBfbB2d3"),
- governance_facet_addr: addr("1e12b20BE86bEc3A0aC95aA52ade345cB9AE7a32"),
- diamond_cut_facet_addr: addr("8656770FA78c830456B00B4fFCeE6b1De0e1b888"),
+ admin_facet_addr: addr("1e12b20BE86bEc3A0aC95aA52ade345cB9AE7a32"),
getters_facet_addr: addr("8656770FA78c830456B00B4fFCeE6b1De0e1b888"),
verifier_addr: addr("34782eE00206EAB6478F2692caa800e4A581687b"),
diamond_init_addr: addr("FFC35A5e767BE36057c34586303498e3de7C62Ba"),
@@ -95,7 +102,7 @@ mod tests {
fri_recursion_leaf_level_vk_hash: hash(
"0x72167c43a46cf38875b267d67716edc4563861364a3c03ab7aee73498421e828",
),
- governance_addr: None,
+ prover_at_genesis: ProverAtGenesis::Fri,
snark_wrapper_vk_hash: hash(
"0x4be443afd605a782b6e56d199df2460a025c81b3dea144e135bece83612563f2",
),
@@ -106,10 +113,10 @@ mod tests {
fn from_env() {
let mut lock = MUTEX.lock();
let config = r#"
+CONTRACTS_GOVERNANCE_ADDR="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
CONTRACTS_MAILBOX_FACET_ADDR="0x0f6Fa881EF414Fc6E818180657c2d5CD7Ac6cCAd"
CONTRACTS_EXECUTOR_FACET_ADDR="0x18B631537801963A964211C0E86645c1aBfbB2d3"
-CONTRACTS_GOVERNANCE_FACET_ADDR="0x1e12b20BE86bEc3A0aC95aA52ade345cB9AE7a32"
-CONTRACTS_DIAMOND_CUT_FACET_ADDR="0x8656770FA78c830456B00B4fFCeE6b1De0e1b888"
+CONTRACTS_ADMIN_FACET_ADDR="0x1e12b20BE86bEc3A0aC95aA52ade345cB9AE7a32"
CONTRACTS_GETTERS_FACET_ADDR="0x8656770FA78c830456B00B4fFCeE6b1De0e1b888"
CONTRACTS_VERIFIER_ADDR="0x34782eE00206EAB6478F2692caa800e4A581687b"
CONTRACTS_DIAMOND_INIT_ADDR="0xFFC35A5e767BE36057c34586303498e3de7C62Ba"
@@ -132,6 +139,7 @@ CONTRACTS_L1_MULTICALL3_ADDR="0xcA11bde05977b3631167028862bE2a173976CA11"
CONTRACTS_FRI_RECURSION_SCHEDULER_LEVEL_VK_HASH="0x201d4c7d8e781d51a3bbd451a43a8f45240bb765b565ae6ce69192d918c3563d"
CONTRACTS_FRI_RECURSION_NODE_LEVEL_VK_HASH="0x5a3ef282b21e12fe1f4438e5bb158fc5060b160559c5158c6389d62d9fe3d080"
CONTRACTS_FRI_RECURSION_LEAF_LEVEL_VK_HASH="0x72167c43a46cf38875b267d67716edc4563861364a3c03ab7aee73498421e828"
+CONTRACTS_PROVER_AT_GENESIS="fri"
CONTRACTS_SNARK_WRAPPER_VK_HASH="0x4be443afd605a782b6e56d199df2460a025c81b3dea144e135bece83612563f2"
"#;
lock.set_env(config);
diff --git a/core/lib/constants/src/contracts.rs b/core/lib/constants/src/contracts.rs
index 33b735c8a2d..d74c0e0319a 100644
--- a/core/lib/constants/src/contracts.rs
+++ b/core/lib/constants/src/contracts.rs
@@ -73,7 +73,7 @@ pub const EVENT_WRITER_ADDRESS: Address = H160([
0x00, 0x00, 0x80, 0x0d,
]);
-pub const BYTECODE_COMPRESSOR_ADDRESS: Address = H160([
+pub const COMPRESSOR_ADDRESS: Address = H160([
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x0e,
]);
diff --git a/core/lib/constants/src/ethereum.rs b/core/lib/constants/src/ethereum.rs
index 321c680bc34..13cdd32d5c1 100644
--- a/core/lib/constants/src/ethereum.rs
+++ b/core/lib/constants/src/ethereum.rs
@@ -12,8 +12,8 @@ pub const GUARANTEED_PUBDATA_PER_L1_BATCH: u64 = 4000;
/// The maximum number of pubdata per L1 batch. This limit is due to the fact that the Ethereum
/// nodes do not accept transactions that have more than 128kb of pubdata.
-/// The 8kb margin is left in case of any inpreciseness of the pubdata calculation.
-pub const MAX_PUBDATA_PER_L1_BATCH: u64 = 120000;
+/// The 18kb margin is left in case of any inpreciseness of the pubdata calculation.
+pub const MAX_PUBDATA_PER_L1_BATCH: u64 = 110000;
// TODO: import from zkevm_opcode_defs once VM1.3 is supported
pub const MAX_L2_TX_GAS_LIMIT: u64 = 80000000;
diff --git a/core/lib/contracts/src/lib.rs b/core/lib/contracts/src/lib.rs
index a64aef1c916..01dce6a98f9 100644
--- a/core/lib/contracts/src/lib.rs
+++ b/core/lib/contracts/src/lib.rs
@@ -81,8 +81,8 @@ pub fn read_contract_abi(path: impl AsRef) -> String {
.to_string()
}
-pub fn governance_contract() -> Option {
- load_contract_if_present(GOVERNANCE_CONTRACT_FILE)
+pub fn governance_contract() -> Contract {
+ load_contract_if_present(GOVERNANCE_CONTRACT_FILE).expect("Governance contract not found")
}
pub fn zksync_contract() -> Contract {
@@ -359,6 +359,11 @@ impl BaseSystemContracts {
BaseSystemContracts::load_with_bootloader(bootloader_bytecode)
}
+ pub fn playground_post_boojum() -> Self {
+ let bootloader_bytecode = read_zbin_bytecode("etc/multivm_bootloaders/vm_boojum_integration/playground_batch.yul/playground_batch.yul.zbin");
+ BaseSystemContracts::load_with_bootloader(bootloader_bytecode)
+ }
+
/// BaseSystemContracts with playground bootloader - used for handling 'eth_calls'.
pub fn estimate_gas() -> Self {
let bootloader_bytecode = read_bootloader_code("fee_estimate");
@@ -386,6 +391,13 @@ impl BaseSystemContracts {
BaseSystemContracts::load_with_bootloader(bootloader_bytecode)
}
+ pub fn estimate_gas_post_boojum() -> Self {
+ let bootloader_bytecode = read_zbin_bytecode(
+ "etc/multivm_bootloaders/vm_boojum_integration/fee_estimate.yul/fee_estimate.yul.zbin",
+ );
+ BaseSystemContracts::load_with_bootloader(bootloader_bytecode)
+ }
+
pub fn hashes(&self) -> BaseSystemContractsHashes {
BaseSystemContractsHashes {
bootloader: self.bootloader.hash,
@@ -704,3 +716,175 @@ pub static PRE_BOOJUM_EXECUTE_FUNCTION: Lazy = Lazy::new(|| {
}"#;
serde_json::from_str(abi).unwrap()
});
+
+pub static PRE_BOOJUM_GET_VK_FUNCTION: Lazy = Lazy::new(|| {
+ let abi = r#"{
+ "inputs": [],
+ "name": "get_verification_key",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "domain_size",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "num_inputs",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.Fr",
+ "name": "omega",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point[2]",
+ "name": "gate_selectors_commitments",
+ "type": "tuple[2]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point[8]",
+ "name": "gate_setup_commitments",
+ "type": "tuple[8]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point[4]",
+ "name": "permutation_commitments",
+ "type": "tuple[4]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point",
+ "name": "lookup_selector_commitment",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point[4]",
+ "name": "lookup_tables_commitments",
+ "type": "tuple[4]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "X",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "Y",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G1Point",
+ "name": "lookup_table_type_commitment",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct PairingsBn254.Fr[3]",
+ "name": "non_residues",
+ "type": "tuple[3]"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint256[2]",
+ "name": "X",
+ "type": "uint256[2]"
+ },
+ {
+ "internalType": "uint256[2]",
+ "name": "Y",
+ "type": "uint256[2]"
+ }
+ ],
+ "internalType": "struct PairingsBn254.G2Point[2]",
+ "name": "g2_elements",
+ "type": "tuple[2]"
+ }
+ ],
+ "internalType": "struct VerificationKey",
+ "name": "vk",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ }"#;
+ serde_json::from_str(abi).unwrap()
+});
diff --git a/core/lib/dal/sqlx-data.json b/core/lib/dal/sqlx-data.json
index 41431bd3b33..f784c84dbb8 100644
--- a/core/lib/dal/sqlx-data.json
+++ b/core/lib/dal/sqlx-data.json
@@ -692,6 +692,257 @@
},
"query": "SELECT l1_address FROM tokens WHERE market_volume > $1"
},
+ "16bca6f4258ff3db90a26a8550c5fc35e666fb698960486528fceba3e452fd62": {
+ "describe": {
+ "columns": [
+ {
+ "name": "number",
+ "ordinal": 0,
+ "type_info": "Int8"
+ },
+ {
+ "name": "timestamp",
+ "ordinal": 1,
+ "type_info": "Int8"
+ },
+ {
+ "name": "is_finished",
+ "ordinal": 2,
+ "type_info": "Bool"
+ },
+ {
+ "name": "l1_tx_count",
+ "ordinal": 3,
+ "type_info": "Int4"
+ },
+ {
+ "name": "l2_tx_count",
+ "ordinal": 4,
+ "type_info": "Int4"
+ },
+ {
+ "name": "fee_account_address",
+ "ordinal": 5,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "bloom",
+ "ordinal": 6,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "priority_ops_onchain_data",
+ "ordinal": 7,
+ "type_info": "ByteaArray"
+ },
+ {
+ "name": "hash",
+ "ordinal": 8,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "parent_hash",
+ "ordinal": 9,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "commitment",
+ "ordinal": 10,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "compressed_write_logs",
+ "ordinal": 11,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "compressed_contracts",
+ "ordinal": 12,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "eth_prove_tx_id",
+ "ordinal": 13,
+ "type_info": "Int4"
+ },
+ {
+ "name": "eth_commit_tx_id",
+ "ordinal": 14,
+ "type_info": "Int4"
+ },
+ {
+ "name": "eth_execute_tx_id",
+ "ordinal": 15,
+ "type_info": "Int4"
+ },
+ {
+ "name": "merkle_root_hash",
+ "ordinal": 16,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "l2_to_l1_logs",
+ "ordinal": 17,
+ "type_info": "ByteaArray"
+ },
+ {
+ "name": "l2_to_l1_messages",
+ "ordinal": 18,
+ "type_info": "ByteaArray"
+ },
+ {
+ "name": "used_contract_hashes",
+ "ordinal": 19,
+ "type_info": "Jsonb"
+ },
+ {
+ "name": "compressed_initial_writes",
+ "ordinal": 20,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "compressed_repeated_writes",
+ "ordinal": 21,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "l2_l1_compressed_messages",
+ "ordinal": 22,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "l2_l1_merkle_root",
+ "ordinal": 23,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "l1_gas_price",
+ "ordinal": 24,
+ "type_info": "Int8"
+ },
+ {
+ "name": "l2_fair_gas_price",
+ "ordinal": 25,
+ "type_info": "Int8"
+ },
+ {
+ "name": "rollup_last_leaf_index",
+ "ordinal": 26,
+ "type_info": "Int8"
+ },
+ {
+ "name": "zkporter_is_available",
+ "ordinal": 27,
+ "type_info": "Bool"
+ },
+ {
+ "name": "bootloader_code_hash",
+ "ordinal": 28,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "default_aa_code_hash",
+ "ordinal": 29,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "base_fee_per_gas",
+ "ordinal": 30,
+ "type_info": "Numeric"
+ },
+ {
+ "name": "aux_data_hash",
+ "ordinal": 31,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "pass_through_data_hash",
+ "ordinal": 32,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "meta_parameters_hash",
+ "ordinal": 33,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "protocol_version",
+ "ordinal": 34,
+ "type_info": "Int4"
+ },
+ {
+ "name": "compressed_state_diffs",
+ "ordinal": 35,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "system_logs",
+ "ordinal": 36,
+ "type_info": "ByteaArray"
+ },
+ {
+ "name": "events_queue_commitment",
+ "ordinal": 37,
+ "type_info": "Bytea"
+ },
+ {
+ "name": "bootloader_initial_content_commitment",
+ "ordinal": 38,
+ "type_info": "Bytea"
+ }
+ ],
+ "nullable": [
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ false,
+ false,
+ false,
+ true,
+ true,
+ true,
+ true,
+ false,
+ false,
+ true,
+ true,
+ true,
+ true,
+ false,
+ true,
+ true,
+ true,
+ true,
+ true,
+ false,
+ true,
+ true
+ ],
+ "parameters": {
+ "Left": [
+ "Bytea",
+ "Bytea",
+ "Int4",
+ "Int8"
+ ]
+ }
+ },
+ "query": "SELECT number, l1_batches.timestamp, is_finished, l1_tx_count, l2_tx_count, fee_account_address, bloom, priority_ops_onchain_data, hash, parent_hash, commitment, compressed_write_logs, compressed_contracts, eth_prove_tx_id, eth_commit_tx_id, eth_execute_tx_id, merkle_root_hash, l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, compressed_repeated_writes, l2_l1_compressed_messages, l2_l1_merkle_root, l1_gas_price, l2_fair_gas_price, rollup_last_leaf_index, zkporter_is_available, l1_batches.bootloader_code_hash, l1_batches.default_aa_code_hash, base_fee_per_gas, aux_data_hash, pass_through_data_hash, meta_parameters_hash, protocol_version, compressed_state_diffs, system_logs, events_queue_commitment, bootloader_initial_content_commitment FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version WHERE eth_commit_tx_id IS NULL AND number != 0 AND protocol_versions.bootloader_code_hash = $1 AND protocol_versions.default_account_code_hash = $2 AND commitment IS NOT NULL AND (protocol_versions.id = $3 OR protocol_versions.upgrade_tx_hash IS NULL) AND events_queue_commitment IS NOT NULL AND bootloader_initial_content_commitment IS NOT NULL ORDER BY number LIMIT $4"
+ },
"17a42a97e87a675bd465103ebedc63d6d091e5bb093c7905de70aed3dc71d823": {
"describe": {
"columns": [],
diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs
index bec95eb4df9..35f56fa901c 100644
--- a/core/lib/dal/src/blocks_dal.rs
+++ b/core/lib/dal/src/blocks_dal.rs
@@ -352,12 +352,12 @@ impl BlocksDal<'_, '_> {
let l2_to_l1_logs: Vec<_> = header
.l2_to_l1_logs
.iter()
- .map(|log| log.to_bytes().to_vec())
+ .map(|log| log.0.to_bytes().to_vec())
.collect();
let system_logs = header
.system_logs
.iter()
- .map(|log| log.to_bytes().to_vec())
+ .map(|log| log.0.to_bytes().to_vec())
.collect::>>();
// Serialization should always succeed.
@@ -994,6 +994,52 @@ impl BlocksDal<'_, '_> {
})
}
+ pub async fn pre_boojum_get_ready_for_commit_l1_batches(
+ &mut self,
+ limit: usize,
+ bootloader_hash: H256,
+ default_aa_hash: H256,
+ protocol_version_id: ProtocolVersionId,
+ ) -> anyhow::Result> {
+ let raw_batches = sqlx::query_as!(
+ StorageL1Batch,
+ "SELECT number, l1_batches.timestamp, is_finished, l1_tx_count, l2_tx_count, fee_account_address, \
+ bloom, priority_ops_onchain_data, hash, parent_hash, commitment, compressed_write_logs, \
+ compressed_contracts, eth_prove_tx_id, eth_commit_tx_id, eth_execute_tx_id, \
+ merkle_root_hash, l2_to_l1_logs, l2_to_l1_messages, \
+ used_contract_hashes, compressed_initial_writes, compressed_repeated_writes, \
+ l2_l1_compressed_messages, l2_l1_merkle_root, l1_gas_price, l2_fair_gas_price, \
+ rollup_last_leaf_index, zkporter_is_available, l1_batches.bootloader_code_hash, \
+ l1_batches.default_aa_code_hash, base_fee_per_gas, aux_data_hash, pass_through_data_hash, \
+ meta_parameters_hash, protocol_version, compressed_state_diffs, \
+ system_logs, events_queue_commitment, bootloader_initial_content_commitment \
+ FROM l1_batches \
+ LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number \
+ JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version \
+ WHERE eth_commit_tx_id IS NULL \
+ AND number != 0 \
+ AND protocol_versions.bootloader_code_hash = $1 AND protocol_versions.default_account_code_hash = $2 \
+ AND commitment IS NOT NULL \
+ AND (protocol_versions.id = $3 OR protocol_versions.upgrade_tx_hash IS NULL) \
+ ORDER BY number LIMIT $4",
+ bootloader_hash.as_bytes(),
+ default_aa_hash.as_bytes(),
+ protocol_version_id as i32,
+ limit as i64,
+ )
+ .instrument("get_ready_for_commit_l1_batches")
+ .with_arg("limit", &limit)
+ .with_arg("bootloader_hash", &bootloader_hash)
+ .with_arg("default_aa_hash", &default_aa_hash)
+ .with_arg("protocol_version_id", &protocol_version_id)
+ .fetch_all(self.storage.conn())
+ .await?;
+
+ self.map_l1_batches(raw_batches)
+ .await
+ .context("map_l1_batches()")
+ }
+
pub async fn get_ready_for_commit_l1_batches(
&mut self,
limit: usize,
@@ -1021,6 +1067,7 @@ impl BlocksDal<'_, '_> {
AND protocol_versions.bootloader_code_hash = $1 AND protocol_versions.default_account_code_hash = $2 \
AND commitment IS NOT NULL \
AND (protocol_versions.id = $3 OR protocol_versions.upgrade_tx_hash IS NULL) \
+ AND events_queue_commitment IS NOT NULL AND bootloader_initial_content_commitment IS NOT NULL \
ORDER BY number LIMIT $4",
bootloader_hash.as_bytes(),
default_aa_hash.as_bytes(),
@@ -1494,7 +1541,10 @@ impl BlocksDal<'_, '_> {
#[cfg(test)]
mod tests {
use zksync_contracts::BaseSystemContractsHashes;
- use zksync_types::{l2_to_l1_log::L2ToL1Log, Address, ProtocolVersion, ProtocolVersionId};
+ use zksync_types::{
+ l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log},
+ Address, ProtocolVersion, ProtocolVersionId,
+ };
use super::*;
use crate::ConnectionPool;
@@ -1523,14 +1573,14 @@ mod tests {
);
header.l1_tx_count = 3;
header.l2_tx_count = 5;
- header.l2_to_l1_logs.push(L2ToL1Log {
+ header.l2_to_l1_logs.push(UserL2ToL1Log(L2ToL1Log {
shard_id: 0,
is_service: false,
tx_number_in_block: 2,
sender: Address::repeat_byte(2),
key: H256::repeat_byte(3),
value: H256::zero(),
- });
+ }));
header.l2_to_l1_messages.push(vec![22; 22]);
header.l2_to_l1_messages.push(vec![33; 33]);
diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs
index 2702099e581..6355deaf29a 100644
--- a/core/lib/dal/src/events_dal.rs
+++ b/core/lib/dal/src/events_dal.rs
@@ -4,7 +4,9 @@ use std::fmt;
use crate::{models::storage_event::StorageL2ToL1Log, SqlxError, StorageProcessor};
use zksync_types::{
- l2_to_l1_log::L2ToL1Log, tx::IncludedTxLocation, MiniblockNumber, VmEvent, H256,
+ l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log},
+ tx::IncludedTxLocation,
+ MiniblockNumber, VmEvent, H256,
};
/// Wrapper around an optional event topic allowing to hex-format it for `COPY` instructions.
@@ -99,12 +101,12 @@ impl EventsDal<'_, '_> {
.unwrap();
}
- /// Saves L2-to-L1 logs from a miniblock. Logs must be ordered by transaction location
+ /// Saves user L2-to-L1 logs from a miniblock. Logs must be ordered by transaction location
/// and within each transaction.
- pub async fn save_l2_to_l1_logs(
+ pub async fn save_user_l2_to_l1_logs(
&mut self,
block_number: MiniblockNumber,
- all_block_l2_to_l1_logs: &[(IncludedTxLocation, Vec<&L2ToL1Log>)],
+ all_block_l2_to_l1_logs: &[(IncludedTxLocation, Vec<&UserL2ToL1Log>)],
) {
let mut copy = self
.storage
@@ -139,7 +141,7 @@ impl EventsDal<'_, '_> {
sender,
key,
value,
- } = log;
+ } = log.0;
write_str!(
&mut buffer,
@@ -273,15 +275,15 @@ mod tests {
}
}
- fn create_l2_to_l1_log(tx_number_in_block: u16, index: u8) -> L2ToL1Log {
- L2ToL1Log {
+ fn create_l2_to_l1_log(tx_number_in_block: u16, index: u8) -> UserL2ToL1Log {
+ UserL2ToL1Log(L2ToL1Log {
shard_id: 0,
is_service: false,
tx_number_in_block,
sender: Address::repeat_byte(index),
key: H256::from_low_u64_be(u64::from(index)),
value: H256::repeat_byte(index),
- }
+ })
}
#[tokio::test]
@@ -324,7 +326,7 @@ mod tests {
(second_location, second_logs.iter().collect()),
];
conn.events_dal()
- .save_l2_to_l1_logs(MiniblockNumber(1), &all_logs)
+ .save_user_l2_to_l1_logs(MiniblockNumber(1), &all_logs)
.await;
let logs = conn
@@ -338,9 +340,9 @@ mod tests {
assert_eq!(log.log_index_in_tx as usize, i);
}
for (log, expected_log) in logs.iter().zip(&first_logs) {
- assert_eq!(log.key, expected_log.key.as_bytes());
- assert_eq!(log.value, expected_log.value.as_bytes());
- assert_eq!(log.sender, expected_log.sender.as_bytes());
+ assert_eq!(log.key, expected_log.0.key.as_bytes());
+ assert_eq!(log.value, expected_log.0.value.as_bytes());
+ assert_eq!(log.sender, expected_log.0.sender.as_bytes());
}
let logs = conn
@@ -354,9 +356,9 @@ mod tests {
assert_eq!(log.log_index_in_tx as usize, i);
}
for (log, expected_log) in logs.iter().zip(&second_logs) {
- assert_eq!(log.key, expected_log.key.as_bytes());
- assert_eq!(log.value, expected_log.value.as_bytes());
- assert_eq!(log.sender, expected_log.sender.as_bytes());
+ assert_eq!(log.key, expected_log.0.key.as_bytes());
+ assert_eq!(log.value, expected_log.0.value.as_bytes());
+ assert_eq!(log.sender, expected_log.0.sender.as_bytes());
}
}
}
diff --git a/core/lib/dal/src/models/storage_block.rs b/core/lib/dal/src/models/storage_block.rs
index 35a7873b562..390bd3b2fd8 100644
--- a/core/lib/dal/src/models/storage_block.rs
+++ b/core/lib/dal/src/models/storage_block.rs
@@ -13,7 +13,7 @@ use zksync_types::{
api,
block::{L1BatchHeader, MiniblockHeader},
commitment::{L1BatchMetaParameters, L1BatchMetadata},
- l2_to_l1_log::L2ToL1Log,
+ l2_to_l1_log::{L2ToL1Log, SystemL2ToL1Log, UserL2ToL1Log},
Address, L1BatchNumber, MiniblockNumber, H2048, H256,
};
@@ -61,11 +61,8 @@ impl From for L1BatchHeader {
.map(|raw_data| raw_data.into())
.collect();
- let system_logs: Vec<_> = l1_batch
- .system_logs
- .into_iter()
- .map(|raw_log| L2ToL1Log::from_slice(&raw_log))
- .collect();
+ let system_logs = convert_l2_to_l1_logs(l1_batch.system_logs);
+ let user_l2_to_l1_logs = convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs);
L1BatchHeader {
number: L1BatchNumber(l1_batch.number as u32),
@@ -75,7 +72,7 @@ impl From for L1BatchHeader {
priority_ops_onchain_data,
l1_tx_count: l1_batch.l1_tx_count as u16,
l2_tx_count: l1_batch.l2_tx_count as u16,
- l2_to_l1_logs: convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs),
+ l2_to_l1_logs: user_l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(),
l2_to_l1_messages: l1_batch.l2_to_l1_messages,
bloom: H2048::from_slice(&l1_batch.bloom),
@@ -91,7 +88,7 @@ impl From for L1BatchHeader {
),
l1_gas_price: l1_batch.l1_gas_price as u64,
l2_fair_gas_price: l1_batch.l2_fair_gas_price as u64,
- system_logs,
+ system_logs: system_logs.into_iter().map(SystemL2ToL1Log).collect(),
protocol_version: l1_batch
.protocol_version
.map(|v| (v as u16).try_into().unwrap()),
@@ -183,11 +180,8 @@ impl From for L1BatchHeader {
.map(Vec::into)
.collect();
- let system_logs: Vec<_> = l1_batch
- .system_logs
- .into_iter()
- .map(|raw_log| L2ToL1Log::from_slice(&raw_log))
- .collect();
+ let system_logs = convert_l2_to_l1_logs(l1_batch.system_logs);
+ let user_l2_to_l1_logs = convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs);
L1BatchHeader {
number: L1BatchNumber(l1_batch.number as u32),
@@ -197,7 +191,7 @@ impl From for L1BatchHeader {
priority_ops_onchain_data,
l1_tx_count: l1_batch.l1_tx_count as u16,
l2_tx_count: l1_batch.l2_tx_count as u16,
- l2_to_l1_logs: convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs),
+ l2_to_l1_logs: user_l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(),
l2_to_l1_messages: l1_batch.l2_to_l1_messages,
bloom: H2048::from_slice(&l1_batch.bloom),
@@ -213,7 +207,7 @@ impl From for L1BatchHeader {
),
l1_gas_price: l1_batch.l1_gas_price as u64,
l2_fair_gas_price: l1_batch.l2_fair_gas_price as u64,
- system_logs,
+ system_logs: system_logs.into_iter().map(SystemL2ToL1Log).collect(),
protocol_version: l1_batch
.protocol_version
.map(|v| (v as u16).try_into().unwrap()),
diff --git a/core/lib/mini_merkle_tree/src/lib.rs b/core/lib/mini_merkle_tree/src/lib.rs
index 18bb343bc70..4eced5a93c0 100644
--- a/core/lib/mini_merkle_tree/src/lib.rs
+++ b/core/lib/mini_merkle_tree/src/lib.rs
@@ -7,7 +7,7 @@
use once_cell::sync::Lazy;
-use std::{fmt, iter};
+use std::{fmt, iter, str::FromStr};
#[cfg(test)]
mod tests;
@@ -87,10 +87,12 @@ impl<'a, const LEAF_SIZE: usize> MiniMerkleTree<'a, LEAF_SIZE> {
}
/// Returns the root hash of this tree.
+ /// # Panics
+ /// Will panic if the constant below is invalid.
pub fn merkle_root(self) -> H256 {
if self.hashes.is_empty() {
- // TODO (SMA-184): change constant to the real root hash of empty merkle tree.
- H256::zero()
+ H256::from_str("fef7bd9f889811e59e4076a0174087135f080177302763019adaf531257e3a87")
+ .unwrap()
} else {
self.compute_merkle_root_and_path(0, None)
}
diff --git a/core/lib/multivm/Cargo.toml b/core/lib/multivm/Cargo.toml
index 3f0dee89f42..8b69af498a0 100644
--- a/core/lib/multivm/Cargo.toml
+++ b/core/lib/multivm/Cargo.toml
@@ -10,6 +10,7 @@ keywords = ["blockchain", "zksync"]
categories = ["cryptography"]
[dependencies]
+zk_evm_1_4_0 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", branch = "v1.4.0" }
zk_evm_1_3_3 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", tag= "v1.3.3-rc2" }
zk_evm_1_3_1 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", tag= "v1.3.1-rc2" }
diff --git a/core/lib/multivm/src/glue/block_properties.rs b/core/lib/multivm/src/glue/block_properties.rs
index 00c7d3e160c..6f01cada09b 100644
--- a/core/lib/multivm/src/glue/block_properties.rs
+++ b/core/lib/multivm/src/glue/block_properties.rs
@@ -33,9 +33,11 @@ impl BlockProperties {
};
Self::Vm1_3_2(inner)
}
- VmVersion::VmVirtualBlocks | VmVersion::VmVirtualBlocksRefundsEnhancement => {
+ VmVersion::VmVirtualBlocks
+ | VmVersion::VmVirtualBlocksRefundsEnhancement
+ | VmVersion::VmBoojumIntegration => {
unreachable!(
- "From VmVirtualBlocks we have another initialization logic, \
+ "Starting from VmVirtualBlocks we have another initialization logic, \
so it's not required to have BlockProperties for it"
)
}
diff --git a/core/lib/multivm/src/glue/history_mode.rs b/core/lib/multivm/src/glue/history_mode.rs
index 66a0c15e668..ca56836d8e8 100644
--- a/core/lib/multivm/src/glue/history_mode.rs
+++ b/core/lib/multivm/src/glue/history_mode.rs
@@ -6,11 +6,13 @@ pub trait HistoryMode:
+ GlueInto
+ GlueInto
+ GlueInto
+ + GlueInto
{
type VmM6Mode: crate::vm_m6::HistoryMode;
type Vm1_3_2Mode: crate::vm_1_3_2::HistoryMode;
type VmVirtualBlocksMode: crate::vm_virtual_blocks::HistoryMode;
- type VmVirtualBlocksRefundsEnhancement: crate::vm_latest::HistoryMode;
+ type VmVirtualBlocksRefundsEnhancement: crate::vm_refunds_enhancement::HistoryMode;
+ type VmBoojumIntegration: crate::vm_latest::HistoryMode;
}
impl GlueFrom for crate::vm_m6::HistoryEnabled {
@@ -31,6 +33,12 @@ impl GlueFrom for crate::vm_virtual_blocks::Hi
}
}
+impl GlueFrom for crate::vm_refunds_enhancement::HistoryEnabled {
+ fn glue_from(_: crate::vm_latest::HistoryEnabled) -> Self {
+ Self
+ }
+}
+
impl GlueFrom for crate::vm_m6::HistoryDisabled {
fn glue_from(_: crate::vm_latest::HistoryDisabled) -> Self {
Self
@@ -49,16 +57,26 @@ impl GlueFrom for crate::vm_virtual_blocks::H
}
}
+impl GlueFrom
+ for crate::vm_refunds_enhancement::HistoryDisabled
+{
+ fn glue_from(_: crate::vm_latest::HistoryDisabled) -> Self {
+ Self
+ }
+}
+
impl HistoryMode for crate::vm_latest::HistoryEnabled {
type VmM6Mode = crate::vm_m6::HistoryEnabled;
type Vm1_3_2Mode = crate::vm_1_3_2::HistoryEnabled;
type VmVirtualBlocksMode = crate::vm_virtual_blocks::HistoryEnabled;
- type VmVirtualBlocksRefundsEnhancement = crate::vm_latest::HistoryEnabled;
+ type VmVirtualBlocksRefundsEnhancement = crate::vm_refunds_enhancement::HistoryEnabled;
+ type VmBoojumIntegration = crate::vm_latest::HistoryEnabled;
}
impl HistoryMode for crate::vm_latest::HistoryDisabled {
type VmM6Mode = crate::vm_m6::HistoryDisabled;
type Vm1_3_2Mode = crate::vm_1_3_2::HistoryDisabled;
type VmVirtualBlocksMode = crate::vm_virtual_blocks::HistoryDisabled;
- type VmVirtualBlocksRefundsEnhancement = crate::vm_latest::HistoryDisabled;
+ type VmVirtualBlocksRefundsEnhancement = crate::vm_refunds_enhancement::HistoryDisabled;
+ type VmBoojumIntegration = crate::vm_latest::HistoryDisabled;
}
diff --git a/core/lib/multivm/src/glue/init_vm.rs b/core/lib/multivm/src/glue/init_vm.rs
index 859d33149ac..a587165daa2 100644
--- a/core/lib/multivm/src/glue/init_vm.rs
+++ b/core/lib/multivm/src/glue/init_vm.rs
@@ -164,7 +164,7 @@ impl VmInstance {
}
}
VmVersion::VmVirtualBlocksRefundsEnhancement => {
- let vm = crate::vm_latest::Vm::new(
+ let vm = crate::vm_refunds_enhancement::Vm::new(
l1_batch_env.glue_into(),
system_env.clone(),
storage_view.clone(),
@@ -177,6 +177,20 @@ impl VmInstance {
last_tx_compressed_bytecodes: vec![],
}
}
+ VmVersion::VmBoojumIntegration => {
+ let vm = crate::vm_latest::Vm::new(
+ l1_batch_env.glue_into(),
+ system_env.clone(),
+ storage_view.clone(),
+ H::VmBoojumIntegration::default(),
+ );
+ let vm = VmInstanceVersion::VmBoojumIntegration(Box::new(vm));
+ Self {
+ vm,
+ system_env,
+ last_tx_compressed_bytecodes: vec![],
+ }
+ }
}
}
}
diff --git a/core/lib/multivm/src/glue/oracle_tools.rs b/core/lib/multivm/src/glue/oracle_tools.rs
index 368beb909b8..02ada1b3f60 100644
--- a/core/lib/multivm/src/glue/oracle_tools.rs
+++ b/core/lib/multivm/src/glue/oracle_tools.rs
@@ -31,7 +31,8 @@ where
}
VmVersion::VmVirtualBlocks
| VmVersion::VmVirtualBlocksRefundsEnhancement
- | VmVersion::Vm1_3_2 => {
+ | VmVersion::Vm1_3_2
+ | VmVersion::VmBoojumIntegration => {
panic!("oracle tools for after VM1.3.2 do not exist")
}
}
diff --git a/core/lib/multivm/src/glue/tracer.rs b/core/lib/multivm/src/glue/tracer.rs
index 158a0689d10..cab66abc0b8 100644
--- a/core/lib/multivm/src/glue/tracer.rs
+++ b/core/lib/multivm/src/glue/tracer.rs
@@ -42,7 +42,7 @@ use crate::HistoryMode;
use zksync_state::WriteStorage;
pub trait MultivmTracer:
- IntoLatestTracer + IntoVmVirtualBlocksTracer
+ IntoLatestTracer + IntoVmVirtualBlocksTracer + IntoVmRefundsEnhancementTracer
{
fn into_boxed(self) -> Box>
where
@@ -53,9 +53,7 @@ pub trait MultivmTracer:
}
pub trait IntoLatestTracer {
- fn latest(
- &self,
- ) -> Box>;
+ fn latest(&self) -> Box>;
}
pub trait IntoVmVirtualBlocksTracer {
@@ -64,15 +62,19 @@ pub trait IntoVmVirtualBlocksTracer {
) -> Box>;
}
+pub trait IntoVmRefundsEnhancementTracer {
+ fn vm_refunds_enhancement(
+ &self,
+ ) -> Box>;
+}
+
impl IntoLatestTracer for T
where
S: WriteStorage,
H: HistoryMode,
- T: crate::vm_latest::VmTracer + Clone + 'static,
+ T: crate::vm_latest::VmTracer + Clone + 'static,
{
- fn latest(
- &self,
- ) -> Box> {
+ fn latest(&self) -> Box> {
Box::new(self.clone())
}
}
@@ -81,9 +83,10 @@ impl MultivmTracer for T
where
S: WriteStorage,
H: HistoryMode,
- T: crate::vm_latest::VmTracer
+ T: crate::vm_latest::VmTracer
+ IntoLatestTracer
+ IntoVmVirtualBlocksTracer
+ + IntoVmRefundsEnhancementTracer
+ Clone
+ 'static,
{
diff --git a/core/lib/multivm/src/glue/tracer/implementations.rs b/core/lib/multivm/src/glue/tracer/implementations.rs
index bf6f99b6532..7fd7e0b4593 100644
--- a/core/lib/multivm/src/glue/tracer/implementations.rs
+++ b/core/lib/multivm/src/glue/tracer/implementations.rs
@@ -1,4 +1,4 @@
-use crate::glue::tracer::IntoVmVirtualBlocksTracer;
+use crate::glue::tracer::{IntoVmRefundsEnhancementTracer, IntoVmVirtualBlocksTracer};
use crate::vm_latest::{CallTracer, StorageInvocations, ValidationTracer};
use zksync_state::WriteStorage;
@@ -16,7 +16,7 @@ where
}
}
-impl IntoVmVirtualBlocksTracer for CallTracer
+impl IntoVmVirtualBlocksTracer for CallTracer
where
H: crate::HistoryMode + 'static,
S: WriteStorage,
@@ -31,8 +31,7 @@ where
}
}
-impl IntoVmVirtualBlocksTracer
- for ValidationTracer
+impl IntoVmVirtualBlocksTracer for ValidationTracer
where
H: crate::HistoryMode + 'static,
S: WriteStorage,
@@ -54,3 +53,60 @@ where
))
}
}
+
+impl IntoVmRefundsEnhancementTracer for StorageInvocations
+where
+ H: crate::HistoryMode,
+ S: WriteStorage,
+{
+ fn vm_refunds_enhancement(
+ &self,
+ ) -> Box>
+ {
+ Box::new(crate::vm_refunds_enhancement::StorageInvocations::new(
+ self.limit,
+ ))
+ }
+}
+
+impl IntoVmRefundsEnhancementTracer for CallTracer
+where
+ H: crate::HistoryMode + 'static,
+ S: WriteStorage,
+{
+ fn vm_refunds_enhancement(
+ &self,
+ ) -> Box>
+ {
+ Box::new(crate::vm_refunds_enhancement::CallTracer::new(
+ self.result.clone(),
+ H::VmVirtualBlocksRefundsEnhancement::default(),
+ ))
+ }
+}
+
+impl IntoVmRefundsEnhancementTracer for ValidationTracer
+where
+ H: crate::HistoryMode + 'static,
+ S: WriteStorage,
+{
+ fn vm_refunds_enhancement(
+ &self,
+ ) -> Box>
+ {
+ let params = self.params();
+ Box::new(
+ crate::vm_refunds_enhancement::ValidationTracer::new(
+ crate::vm_refunds_enhancement::ValidationTracerParams {
+ user_address: params.user_address,
+ paymaster_address: params.paymaster_address,
+ trusted_slots: params.trusted_slots,
+ trusted_addresses: params.trusted_addresses,
+ trusted_address_slots: params.trusted_address_slots,
+ computational_gas_limit: params.computational_gas_limit,
+ },
+ )
+ .0,
+ )
+ }
+}
diff --git a/core/lib/multivm/src/glue/types/vm/vm_block_result.rs b/core/lib/multivm/src/glue/types/vm/vm_block_result.rs
index 00d5751f480..cdbedfd4a75 100644
--- a/core/lib/multivm/src/glue/types/vm/vm_block_result.rs
+++ b/core/lib/multivm/src/glue/types/vm/vm_block_result.rs
@@ -1,9 +1,10 @@
+use zksync_types::l2_to_l1_log::UserL2ToL1Log;
+
use crate::glue::{GlueFrom, GlueInto};
use crate::interface::{
- CurrentExecutionState, ExecutionResult, Refunds, VmExecutionResultAndLogs,
- VmExecutionStatistics,
+ types::outputs::VmExecutionLogs, CurrentExecutionState, ExecutionResult, Refunds,
+ VmExecutionResultAndLogs, VmExecutionStatistics,
};
-use zksync_types::tx::tx_execution_info::VmExecutionLogs;
// Note: In version after vm VmVirtualBlocks the bootloader memory knowledge is encapsulated into the VM.
// But before it was a part of a public API.
@@ -15,12 +16,7 @@ impl GlueFrom for crate::interface::FinishedL1B
crate::interface::FinishedL1Batch {
block_tip_execution_result: VmExecutionResultAndLogs {
result: value.block_tip_result.revert_reason.glue_into(),
- logs: VmExecutionLogs {
- events: value.block_tip_result.logs.events.clone(),
- l2_to_l1_logs: value.block_tip_result.logs.l2_to_l1_logs.clone(),
- storage_logs: value.block_tip_result.logs.storage_logs.clone(),
- total_log_queries_count: value.block_tip_result.logs.total_log_queries_count,
- },
+ logs: value.block_tip_result.logs.clone(),
statistics: VmExecutionStatistics {
contracts_used: value.block_tip_result.contracts_used,
cycles_used: value.block_tip_result.cycles_used,
@@ -35,9 +31,16 @@ impl GlueFrom for crate::interface::FinishedL1B
events: value.full_result.events,
storage_log_queries: value.full_result.storage_log_queries,
used_contract_hashes: value.full_result.used_contract_hashes,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
+ user_l2_to_l1_logs: value
+ .full_result
+ .l2_to_l1_logs
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect(),
+ system_logs: vec![],
total_log_queries: value.full_result.total_log_queries,
cycles_used: value.full_result.cycles_used,
+ deduplicated_events_logs: vec![],
storage_refunds: Vec::new(),
},
final_bootloader_memory: None,
@@ -50,12 +53,7 @@ impl GlueFrom for crate::interface::FinishedL1B
crate::interface::FinishedL1Batch {
block_tip_execution_result: VmExecutionResultAndLogs {
result: value.block_tip_result.revert_reason.glue_into(),
- logs: VmExecutionLogs {
- events: value.block_tip_result.logs.events,
- l2_to_l1_logs: value.block_tip_result.logs.l2_to_l1_logs,
- storage_logs: value.block_tip_result.logs.storage_logs,
- total_log_queries_count: value.block_tip_result.logs.total_log_queries_count,
- },
+ logs: value.block_tip_result.logs.clone(),
statistics: VmExecutionStatistics {
contracts_used: value.block_tip_result.contracts_used,
cycles_used: value.block_tip_result.cycles_used,
@@ -70,9 +68,16 @@ impl GlueFrom for crate::interface::FinishedL1B
events: value.full_result.events,
storage_log_queries: value.full_result.storage_log_queries,
used_contract_hashes: value.full_result.used_contract_hashes,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
+ user_l2_to_l1_logs: value
+ .full_result
+ .l2_to_l1_logs
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect(),
+ system_logs: vec![],
total_log_queries: value.full_result.total_log_queries,
cycles_used: value.full_result.cycles_used,
+ deduplicated_events_logs: vec![],
storage_refunds: Vec::new(),
},
final_bootloader_memory: None,
@@ -87,7 +92,8 @@ impl GlueFrom for crate::interface::Finished
result: value.block_tip_result.revert_reason.glue_into(),
logs: VmExecutionLogs {
events: value.block_tip_result.logs.events,
- l2_to_l1_logs: value.block_tip_result.logs.l2_to_l1_logs,
+ user_l2_to_l1_logs: value.block_tip_result.logs.user_l2_to_l1_logs.clone(),
+ system_l2_to_l1_logs: value.block_tip_result.logs.system_l2_to_l1_logs.clone(),
storage_logs: value.block_tip_result.logs.storage_logs,
total_log_queries_count: value.block_tip_result.logs.total_log_queries_count,
},
@@ -105,9 +111,16 @@ impl GlueFrom for crate::interface::Finished
events: value.full_result.events,
storage_log_queries: value.full_result.storage_log_queries,
used_contract_hashes: value.full_result.used_contract_hashes,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
+ user_l2_to_l1_logs: value
+ .full_result
+ .l2_to_l1_logs
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect(),
+ system_logs: vec![],
total_log_queries: value.full_result.total_log_queries,
cycles_used: value.full_result.cycles_used,
+ deduplicated_events_logs: vec![],
storage_refunds: Vec::new(),
},
final_bootloader_memory: None,
@@ -131,7 +144,13 @@ impl GlueFrom for crate::interface::VmExecut
result,
logs: VmExecutionLogs {
events: value.full_result.events,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
+ user_l2_to_l1_logs: value
+ .full_result
+ .l2_to_l1_logs
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect(),
+ system_l2_to_l1_logs: vec![],
storage_logs: value.full_result.storage_log_queries,
total_log_queries_count: value.full_result.total_log_queries,
},
@@ -162,12 +181,7 @@ impl GlueFrom for crate::interface::VmExecution
VmExecutionResultAndLogs {
result,
- logs: VmExecutionLogs {
- events: value.full_result.events,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
- storage_logs: value.full_result.storage_log_queries,
- total_log_queries_count: value.full_result.total_log_queries,
- },
+ logs: value.block_tip_result.logs.clone(),
statistics: VmExecutionStatistics {
contracts_used: value.full_result.contracts_used,
cycles_used: value.full_result.cycles_used,
@@ -197,7 +211,13 @@ impl GlueFrom for crate::interface::VmExecution
result,
logs: VmExecutionLogs {
events: value.full_result.events,
- l2_to_l1_logs: value.full_result.l2_to_l1_logs,
+ user_l2_to_l1_logs: value
+ .full_result
+ .l2_to_l1_logs
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect(),
+ system_l2_to_l1_logs: vec![],
storage_logs: value.full_result.storage_log_queries,
total_log_queries_count: value.full_result.total_log_queries,
},
diff --git a/core/lib/multivm/src/glue/types/vm/vm_partial_execution_result.rs b/core/lib/multivm/src/glue/types/vm/vm_partial_execution_result.rs
index 096eaaa3b8d..9626468a2bb 100644
--- a/core/lib/multivm/src/glue/types/vm/vm_partial_execution_result.rs
+++ b/core/lib/multivm/src/glue/types/vm/vm_partial_execution_result.rs
@@ -1,5 +1,4 @@
use crate::glue::{GlueFrom, GlueInto};
-use zksync_types::tx::tx_execution_info::VmExecutionLogs;
impl GlueFrom
for crate::interface::VmExecutionResultAndLogs
@@ -7,12 +6,7 @@ impl GlueFrom
fn glue_from(value: crate::vm_m5::vm::VmPartialExecutionResult) -> Self {
Self {
result: value.revert_reason.glue_into(),
- logs: VmExecutionLogs {
- events: value.logs.events.clone(),
- l2_to_l1_logs: value.logs.l2_to_l1_logs.clone(),
- storage_logs: value.logs.storage_logs.clone(),
- total_log_queries_count: value.logs.total_log_queries_count,
- },
+ logs: value.logs.clone(),
statistics: crate::interface::VmExecutionStatistics {
contracts_used: value.contracts_used,
cycles_used: value.cycles_used,
@@ -37,12 +31,7 @@ impl GlueFrom
fn glue_from(value: crate::vm_m6::vm::VmPartialExecutionResult) -> Self {
Self {
result: value.revert_reason.glue_into(),
- logs: VmExecutionLogs {
- events: value.logs.events.clone(),
- l2_to_l1_logs: value.logs.l2_to_l1_logs.clone(),
- storage_logs: value.logs.storage_logs.clone(),
- total_log_queries_count: value.logs.total_log_queries_count,
- },
+ logs: value.logs.clone(),
statistics: crate::interface::VmExecutionStatistics {
contracts_used: value.contracts_used,
cycles_used: value.cycles_used,
@@ -65,12 +54,7 @@ impl GlueFrom
fn glue_from(value: crate::vm_1_3_2::vm::VmPartialExecutionResult) -> Self {
Self {
result: value.revert_reason.glue_into(),
- logs: VmExecutionLogs {
- events: value.logs.events.clone(),
- l2_to_l1_logs: value.logs.l2_to_l1_logs.clone(),
- storage_logs: value.logs.storage_logs.clone(),
- total_log_queries_count: value.logs.total_log_queries_count,
- },
+ logs: value.logs.clone(),
statistics: crate::interface::VmExecutionStatistics {
contracts_used: value.contracts_used,
cycles_used: value.cycles_used,
diff --git a/core/lib/multivm/src/interface/types/errors/bootloader_error.rs b/core/lib/multivm/src/interface/types/errors/bootloader_error.rs
index 07ed0899b22..0f0e1440866 100644
--- a/core/lib/multivm/src/interface/types/errors/bootloader_error.rs
+++ b/core/lib/multivm/src/interface/types/errors/bootloader_error.rs
@@ -27,7 +27,10 @@ pub(crate) enum BootloaderErrorCode {
MintEtherFailed,
FailedToAppendTransactionToL2Block,
FailedToSetL2Block,
- FailedToPublishBlockDataToL1,
+ FailedToPublishTimestampDataToL1,
+ L1MessengerPublishingFailed,
+ L1MessengerLogSendingFailed,
+ FailedToCallSystemContext,
Unknown,
}
@@ -60,7 +63,10 @@ impl From for BootloaderErrorCode {
23 => BootloaderErrorCode::MintEtherFailed,
24 => BootloaderErrorCode::FailedToAppendTransactionToL2Block,
25 => BootloaderErrorCode::FailedToSetL2Block,
- 26 => BootloaderErrorCode::FailedToPublishBlockDataToL1,
+ 26 => BootloaderErrorCode::FailedToPublishTimestampDataToL1,
+ 27 => BootloaderErrorCode::L1MessengerPublishingFailed,
+ 28 => BootloaderErrorCode::L1MessengerLogSendingFailed,
+ 29 => BootloaderErrorCode::FailedToCallSystemContext,
_ => BootloaderErrorCode::Unknown,
}
}
diff --git a/core/lib/multivm/src/interface/types/errors/tx_revert_reason.rs b/core/lib/multivm/src/interface/types/errors/tx_revert_reason.rs
index 27a5610f0e0..f92a913fb8b 100644
--- a/core/lib/multivm/src/interface/types/errors/tx_revert_reason.rs
+++ b/core/lib/multivm/src/interface/types/errors/tx_revert_reason.rs
@@ -109,6 +109,15 @@ impl TxRevertReason {
BootloaderErrorCode::PaymasterReturnedInvalidMagic => {
Self::Halt(Halt::ValidationFailed(VmRevertReason::General { msg: String::from("Paymaster validation returned invalid magic value. Please refer to the documentation of the paymaster for more details"), data: vec![] }))
}
+ BootloaderErrorCode::L1MessengerLogSendingFailed => {
+ Self::Halt(Halt::UnexpectedVMBehavior(format!("Failed to send log via L1Messenger for: {}", revert_reason)))
+ },
+ BootloaderErrorCode::L1MessengerPublishingFailed => {
+ Self::Halt(Halt::UnexpectedVMBehavior(format!("Failed to publish pubdata via L1Messenger for: {}", revert_reason)))
+ },
+ BootloaderErrorCode::FailedToCallSystemContext => {
+ Self::Halt(Halt::UnexpectedVMBehavior(format!("Failed to call system context contract: {}", revert_reason)))
+ },
BootloaderErrorCode::Unknown => Self::Halt(Halt::UnexpectedVMBehavior(format!(
"Unsupported error code: {}. Revert reason: {}",
error_code[0], revert_reason
@@ -121,8 +130,8 @@ impl TxRevertReason {
Self::Halt(Halt::FailedToSetL2Block(format!("{}", revert_reason)))
}
- BootloaderErrorCode::FailedToPublishBlockDataToL1 => {
- Self::Halt(Halt::UnexpectedVMBehavior(format!("Failed to publish block data to L1: {}", revert_reason)))
+ BootloaderErrorCode::FailedToPublishTimestampDataToL1 => {
+ Self::Halt(Halt::UnexpectedVMBehavior(format!("Failed to publish timestamp data to L1: {}", revert_reason)))
}
}
}
diff --git a/core/lib/multivm/src/interface/types/outputs/execution_result.rs b/core/lib/multivm/src/interface/types/outputs/execution_result.rs
index dfbcd23be0b..3181a94a9da 100644
--- a/core/lib/multivm/src/interface/types/outputs/execution_result.rs
+++ b/core/lib/multivm/src/interface/types/outputs/execution_result.rs
@@ -1,9 +1,9 @@
use crate::interface::{Halt, VmExecutionStatistics, VmRevertReason};
use zksync_system_constants::PUBLISH_BYTECODE_OVERHEAD;
use zksync_types::event::{extract_long_l2_to_l1_messages, extract_published_bytecodes};
-use zksync_types::tx::tx_execution_info::VmExecutionLogs;
+use zksync_types::l2_to_l1_log::{SystemL2ToL1Log, UserL2ToL1Log};
use zksync_types::tx::ExecutionMetrics;
-use zksync_types::Transaction;
+use zksync_types::{StorageLogQuery, Transaction, VmEvent};
use zksync_utils::bytecode::bytecode_len_in_bytes;
/// Refunds produced for the user.
@@ -13,6 +13,25 @@ pub struct Refunds {
pub operator_suggested_refund: u32,
}
+/// Events/storage logs/l2->l1 logs created within transaction execution.
+#[derive(Debug, Clone, Default, PartialEq)]
+pub struct VmExecutionLogs {
+ pub storage_logs: Vec,
+ pub events: Vec,
+ // For pre-boojum VMs, there was no distinction between user logs and system
+ // logs and so all the outputted logs were treated as user_l2_to_l1_logs.
+ pub user_l2_to_l1_logs: Vec,
+ pub system_l2_to_l1_logs: Vec,
+ // This field moved to statistics, but we need to keep it for backward compatibility
+ pub total_log_queries_count: usize,
+}
+
+impl VmExecutionLogs {
+ pub fn total_l2_to_l1_logs_count(&self) -> usize {
+ self.user_l2_to_l1_logs.len() + self.system_l2_to_l1_logs.len()
+ }
+}
+
/// Result and logs of the VM execution.
#[derive(Debug, Clone)]
pub struct VmExecutionResultAndLogs {
@@ -70,7 +89,7 @@ impl VmExecutionResultAndLogs {
gas_used: self.statistics.gas_used as usize,
published_bytecode_bytes,
l2_l1_long_messages,
- l2_l1_logs: self.logs.l2_to_l1_logs.len(),
+ l2_to_l1_logs: self.logs.total_l2_to_l1_logs_count(),
contracts_used: self.statistics.contracts_used,
contracts_deployed,
vm_events: self.logs.events.len(),
diff --git a/core/lib/multivm/src/interface/types/outputs/execution_state.rs b/core/lib/multivm/src/interface/types/outputs/execution_state.rs
index 128db82ba22..066de92ffbe 100644
--- a/core/lib/multivm/src/interface/types/outputs/execution_state.rs
+++ b/core/lib/multivm/src/interface/types/outputs/execution_state.rs
@@ -1,5 +1,5 @@
-use zksync_types::l2_to_l1_log::L2ToL1Log;
-use zksync_types::{StorageLogQuery, VmEvent, U256};
+use zksync_types::l2_to_l1_log::{SystemL2ToL1Log, UserL2ToL1Log};
+use zksync_types::{LogQuery, StorageLogQuery, VmEvent, U256};
/// State of the VM since the start of the batch execution.
#[derive(Debug, Clone, PartialEq)]
@@ -11,11 +11,18 @@ pub struct CurrentExecutionState {
/// Hashes of the contracts used by the VM.
pub used_contract_hashes: Vec,
/// L2 to L1 logs produced by the VM.
- pub l2_to_l1_logs: Vec,
+ pub system_logs: Vec,
+ /// L2 to L1 logs produced by the L1Messeger.
+ /// For pre-boojum VMs, there was no distinction between user logs and system
+ /// logs and so all the outputted logs were treated as user_l2_to_l1_logs.
+ pub user_l2_to_l1_logs: Vec,
/// Number of log queries produced by the VM. Including l2_to_l1 logs, storage logs and events.
pub total_log_queries: usize,
/// Number of cycles used by the VM.
pub cycles_used: u32,
+ /// Sorted & deduplicated events logs for batch. Note, that this is a more "low-level" representation of
+ /// the `events` field of this struct TODO(PLA-649): refactor to remove duplication of data.
+ pub deduplicated_events_logs: Vec,
/// Refunds returned by `StorageOracle`.
pub storage_refunds: Vec,
}
diff --git a/core/lib/multivm/src/interface/types/outputs/mod.rs b/core/lib/multivm/src/interface/types/outputs/mod.rs
index 8aa029cb53f..39fed3ad9cb 100644
--- a/core/lib/multivm/src/interface/types/outputs/mod.rs
+++ b/core/lib/multivm/src/interface/types/outputs/mod.rs
@@ -4,6 +4,7 @@ mod finished_l1batch;
mod l2_block;
mod statistic;
+pub use execution_result::VmExecutionLogs;
pub use execution_result::{ExecutionResult, Refunds, VmExecutionResultAndLogs};
pub use execution_state::{BootloaderMemory, CurrentExecutionState};
pub use finished_l1batch::FinishedL1Batch;
diff --git a/core/lib/multivm/src/lib.rs b/core/lib/multivm/src/lib.rs
index 2204fb4af6a..51a8b8036fb 100644
--- a/core/lib/multivm/src/lib.rs
+++ b/core/lib/multivm/src/lib.rs
@@ -22,4 +22,5 @@ pub use versions::vm_1_3_2;
pub use versions::vm_latest;
pub use versions::vm_m5;
pub use versions::vm_m6;
+pub use versions::vm_refunds_enhancement;
pub use versions::vm_virtual_blocks;
diff --git a/core/lib/multivm/src/versions/mod.rs b/core/lib/multivm/src/versions/mod.rs
index cbb918d1a83..71379f6df5c 100644
--- a/core/lib/multivm/src/versions/mod.rs
+++ b/core/lib/multivm/src/versions/mod.rs
@@ -2,4 +2,5 @@ pub mod vm_1_3_2;
pub mod vm_latest;
pub mod vm_m5;
pub mod vm_m6;
+pub mod vm_refunds_enhancement;
pub mod vm_virtual_blocks;
diff --git a/core/lib/multivm/src/versions/vm_1_3_2/vm.rs b/core/lib/multivm/src/versions/vm_1_3_2/vm.rs
index 37e0097e59d..4646081f18e 100644
--- a/core/lib/multivm/src/versions/vm_1_3_2/vm.rs
+++ b/core/lib/multivm/src/versions/vm_1_3_2/vm.rs
@@ -10,11 +10,12 @@ use zk_evm_1_3_3::zkevm_opcode_defs::decoding::{
use zk_evm_1_3_3::zkevm_opcode_defs::definitions::RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER;
use zksync_state::WriteStorage;
use zksync_system_constants::MAX_TXS_IN_BLOCK;
-use zksync_types::l2_to_l1_log::L2ToL1Log;
-use zksync_types::tx::tx_execution_info::{TxExecutionStatus, VmExecutionLogs};
+use zksync_types::l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log};
+use zksync_types::tx::tx_execution_info::TxExecutionStatus;
use zksync_types::vm_trace::{Call, VmExecutionTrace, VmTrace};
use zksync_types::{L1BatchNumber, StorageLogQuery, VmEvent, U256};
+use crate::interface::types::outputs::VmExecutionLogs;
use crate::vm_1_3_2::bootloader_state::BootloaderState;
use crate::vm_1_3_2::errors::{TxRevertReason, VmRevertReason, VmRevertReasonParsingResult};
use crate::vm_1_3_2::event_sink::InMemoryEventSink;
@@ -427,10 +428,11 @@ impl VmInstance {
VmExecutionLogs {
storage_logs,
events,
- l2_to_l1_logs,
+ user_l2_to_l1_logs: l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(),
total_log_queries_count: storage_logs_count
+ log_queries.len()
+ precompile_calls_count,
+ system_l2_to_l1_logs: vec![],
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/bootloader_state/snapshot.rs b/core/lib/multivm/src/versions/vm_latest/bootloader_state/snapshot.rs
index e417a3b9ee6..683fc28a69e 100644
--- a/core/lib/multivm/src/versions/vm_latest/bootloader_state/snapshot.rs
+++ b/core/lib/multivm/src/versions/vm_latest/bootloader_state/snapshot.rs
@@ -12,6 +12,8 @@ pub(crate) struct BootloaderStateSnapshot {
pub(crate) compressed_bytecodes_encoding: usize,
/// Current offset of the free space in the bootloader memory.
pub(crate) free_tx_offset: usize,
+ /// Whether the pubdata information has been provided already
+ pub(crate) is_pubdata_information_provided: bool,
}
#[derive(Debug, Clone)]
diff --git a/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs b/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs
index 7e8c5d04623..b4641d9bc64 100644
--- a/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs
+++ b/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs
@@ -1,17 +1,20 @@
use crate::vm_latest::bootloader_state::l2_block::BootloaderL2Block;
use crate::vm_latest::bootloader_state::snapshot::BootloaderStateSnapshot;
use crate::vm_latest::bootloader_state::utils::{apply_l2_block, apply_tx_to_memory};
+use once_cell::sync::OnceCell;
use std::cmp::Ordering;
use zksync_types::{L2ChainId, U256};
use zksync_utils::bytecode::CompressedBytecodeInfo;
use crate::interface::{BootloaderMemory, L2BlockEnv, TxExecutionMode};
+use crate::vm_latest::types::internals::pubdata::PubdataInput;
use crate::vm_latest::{
constants::TX_DESCRIPTION_OFFSET, types::internals::TransactionData,
utils::l2_blocks::assert_next_block,
};
use super::tx::BootloaderTx;
+use super::utils::apply_pubdata_to_memory;
/// Intermediate bootloader-related VM state.
///
/// Required to process transactions one by one (since we intercept the VM execution to execute
@@ -37,6 +40,8 @@ pub struct BootloaderState {
execution_mode: TxExecutionMode,
/// Current offset of the free space in the bootloader memory.
free_tx_offset: usize,
+ /// Information about the the pubdata that will be needed to supply to the L1Messenger
+ pubdata_information: OnceCell,
}
impl BootloaderState {
@@ -53,6 +58,7 @@ impl BootloaderState {
initial_memory,
execution_mode,
free_tx_offset: 0,
+ pubdata_information: Default::default(),
}
}
@@ -64,6 +70,12 @@ impl BootloaderState {
tx.refund = refund;
}
+ pub(crate) fn set_pubdata_input(&mut self, info: PubdataInput) {
+ self.pubdata_information
+ .set(info)
+ .expect("Pubdata information is already set");
+ }
+
pub(crate) fn start_new_l2_block(&mut self, l2_block: L2BlockEnv) {
let last_block = self.last_l2_block();
assert!(
@@ -151,6 +163,14 @@ impl BootloaderState {
apply_l2_block(&mut initial_memory, l2_block, tx_index)
}
}
+
+ let pubdata_information = self
+ .pubdata_information
+ .clone()
+ .into_inner()
+ .expect("Empty pubdata information");
+
+ apply_pubdata_to_memory(&mut initial_memory, pubdata_information);
initial_memory
}
@@ -235,6 +255,7 @@ impl BootloaderState {
last_l2_block: self.last_l2_block().make_snapshot(),
compressed_bytecodes_encoding: self.compressed_bytecodes_encoding,
free_tx_offset: self.free_tx_offset,
+ is_pubdata_information_provided: self.pubdata_information.get().is_some(),
}
}
@@ -249,5 +270,17 @@ impl BootloaderState {
}
self.last_mut_l2_block()
.apply_snapshot(snapshot.last_l2_block);
+
+ if !snapshot.is_pubdata_information_provided {
+ self.pubdata_information = Default::default();
+ } else {
+ // Under the correct usage of the snapshots of the bootloader state,
+ // this assertion should never fail, i.e. since the pubdata information
+ // can be set only once. However, we have this assertion just in case.
+ assert!(
+ self.pubdata_information.get().is_some(),
+ "Snapshot with no pubdata can not rollback to snapshot with one"
+ );
+ }
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs b/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs
index 086403c2f2a..78b98f0a404 100644
--- a/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs
+++ b/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs
@@ -6,9 +6,11 @@ use crate::interface::{BootloaderMemory, TxExecutionMode};
use crate::vm_latest::bootloader_state::l2_block::BootloaderL2Block;
use crate::vm_latest::constants::{
BOOTLOADER_TX_DESCRIPTION_OFFSET, BOOTLOADER_TX_DESCRIPTION_SIZE, COMPRESSED_BYTECODES_OFFSET,
+ OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET, OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS,
OPERATOR_REFUNDS_OFFSET, TX_DESCRIPTION_OFFSET, TX_OPERATOR_L2_BLOCK_INFO_OFFSET,
TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO, TX_OVERHEAD_OFFSET, TX_TRUSTED_GAS_LIMIT_OFFSET,
};
+use crate::vm_latest::types::internals::pubdata::PubdataInput;
use super::tx::BootloaderTx;
@@ -110,6 +112,33 @@ pub(crate) fn apply_l2_block(
])
}
+pub(crate) fn apply_pubdata_to_memory(
+ memory: &mut BootloaderMemory,
+ pubdata_information: PubdataInput,
+) {
+ // Skipping two slots as they will be filled by the bootloader itself:
+ // - One slot is for the selector of the call to the L1Messenger.
+ // - The other slot is for the 0x20 offset for the calldata.
+ let l1_messenger_pubdata_start_slot = OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET + 2;
+
+ let pubdata = pubdata_information.build_pubdata();
+
+ assert!(
+ pubdata.len() / 32 <= OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS - 2,
+ "The encoded pubdata is too big"
+ );
+
+ pubdata
+ .chunks(32)
+ .enumerate()
+ .for_each(|(slot_offset, value)| {
+ memory.push((
+ l1_messenger_pubdata_start_slot + slot_offset,
+ U256::from(value),
+ ))
+ });
+}
+
/// Forms a word that contains meta information for the transaction execution.
///
/// # Current layout
diff --git a/core/lib/multivm/src/versions/vm_latest/constants.rs b/core/lib/multivm/src/versions/vm_latest/constants.rs
index fe251ba8790..c67156681a0 100644
--- a/core/lib/multivm/src/versions/vm_latest/constants.rs
+++ b/core/lib/multivm/src/versions/vm_latest/constants.rs
@@ -1,11 +1,11 @@
-use zk_evm_1_3_3::aux_structures::MemoryPage;
+use zk_evm_1_4_0::aux_structures::MemoryPage;
use zksync_system_constants::{
L1_GAS_PER_PUBDATA_BYTE, MAX_L2_TX_GAS_LIMIT, MAX_NEW_FACTORY_DEPS, MAX_TXS_IN_BLOCK,
USED_BOOTLOADER_MEMORY_WORDS,
};
-pub use zk_evm_1_3_3::zkevm_opcode_defs::system_params::{
+pub use zk_evm_1_4_0::zkevm_opcode_defs::system_params::{
ERGS_PER_CIRCUIT, INITIAL_STORAGE_WRITE_PUBDATA_BYTES, MAX_PUBDATA_PER_BLOCK,
};
@@ -50,8 +50,25 @@ pub(crate) const TX_TRUSTED_GAS_LIMIT_SLOTS: usize = MAX_TXS_IN_BLOCK;
pub(crate) const COMPRESSED_BYTECODES_SLOTS: usize = 32768;
-pub(crate) const BOOTLOADER_TX_DESCRIPTION_OFFSET: usize =
+pub(crate) const PRIORITY_TXS_L1_DATA_OFFSET: usize =
COMPRESSED_BYTECODES_OFFSET + COMPRESSED_BYTECODES_SLOTS;
+pub(crate) const PRIORITY_TXS_L1_DATA_SLOTS: usize = 2;
+
+pub const OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET: usize =
+ PRIORITY_TXS_L1_DATA_OFFSET + PRIORITY_TXS_L1_DATA_SLOTS;
+
+/// One of "worst case" scenarios for the number of state diffs in a batch is when 120kb of pubdata is spent
+/// on repeated writes, that are all zeroed out. In this case, the number of diffs is 120k / 5 = 24k. This means that they will have
+/// accommodate 6528000 bytes of calldata for the uncompressed state diffs. Adding 120k on top leaves us with
+/// roughly 6650000 bytes needed for calldata. 207813 slots are needed to accomodate this amount of data.
+/// We round up to 208000 slots just in case.
+///
+/// In theory though much more calldata could be used (if for instance 1 byte is used for enum index). It is the responsibility of the
+/// operator to ensure that it can form the correct calldata for the L1Messenger.
+pub(crate) const OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS: usize = 208000;
+
+pub(crate) const BOOTLOADER_TX_DESCRIPTION_OFFSET: usize =
+ OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET + OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS;
/// The size of the bootloader memory dedicated to the encodings of transactions
pub const BOOTLOADER_TX_ENCODING_SPACE: u32 =
@@ -93,7 +110,7 @@ pub const RESULT_SUCCESS_FIRST_SLOT: u32 =
/// Note that this value doesn't correspond to the gas limit of any particular transaction
/// (except for the fact that, of course, gas limit for each transaction should be <= `BLOCK_GAS_LIMIT`).
pub const BLOCK_GAS_LIMIT: u32 =
- zk_evm_1_3_3::zkevm_opcode_defs::system_params::VM_INITIAL_FRAME_ERGS;
+ zk_evm_1_4_0::zkevm_opcode_defs::system_params::VM_INITIAL_FRAME_ERGS;
/// How many gas is allowed to spend on a single transaction in eth_call method
pub const ETH_CALL_GAS_LIMIT: u32 = MAX_L2_TX_GAS_LIMIT as u32;
diff --git a/core/lib/multivm/src/versions/vm_latest/implementation/execution.rs b/core/lib/multivm/src/versions/vm_latest/implementation/execution.rs
index 50ee4b53b73..e14103b8074 100644
--- a/core/lib/multivm/src/versions/vm_latest/implementation/execution.rs
+++ b/core/lib/multivm/src/versions/vm_latest/implementation/execution.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_state::WriteStorage;
use crate::interface::{VmExecutionMode, VmExecutionResultAndLogs};
@@ -8,7 +8,7 @@ use crate::vm_latest::old_vm::{
};
use crate::vm_latest::tracers::{
traits::{TracerExecutionStatus, VmTracer},
- DefaultExecutionTracer, RefundsTracer,
+ DefaultExecutionTracer, PubdataTracer, RefundsTracer,
};
use crate::vm_latest::vm::Vm;
use crate::vm_latest::VmExecutionStopReason;
@@ -25,6 +25,7 @@ impl Vm {
self.bootloader_state.move_tx_to_execute_pointer();
enable_refund_tracer = true;
}
+
let (_, result) =
self.inspect_and_collect_results(tracers, execution_mode, enable_refund_tracer);
result
@@ -46,6 +47,7 @@ impl Vm {
tracers,
self.storage.clone(),
refund_tracers,
+ Some(PubdataTracer::new(self.batch_env.clone(), execution_mode)),
);
let timestamp_initial = Timestamp(self.state.local_state.timestamp);
diff --git a/core/lib/multivm/src/versions/vm_latest/implementation/logs.rs b/core/lib/multivm/src/versions/vm_latest/implementation/logs.rs
index 87713d824a6..d65a002a3df 100644
--- a/core/lib/multivm/src/versions/vm_latest/implementation/logs.rs
+++ b/core/lib/multivm/src/versions/vm_latest/implementation/logs.rs
@@ -1,13 +1,14 @@
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_state::WriteStorage;
-use zksync_types::l2_to_l1_log::L2ToL1Log;
-use zksync_types::tx::tx_execution_info::VmExecutionLogs;
+use zksync_types::event::extract_l2tol1logs_from_l1_messenger;
+use zksync_types::l2_to_l1_log::{L2ToL1Log, SystemL2ToL1Log, UserL2ToL1Log};
use zksync_types::VmEvent;
-use crate::vm_latest::old_vm::events::merge_events;
+use crate::interface::types::outputs::VmExecutionLogs;
use crate::vm_latest::old_vm::history_recorder::HistoryMode;
use crate::vm_latest::old_vm::utils::precompile_calls_count_after_timestamp;
+use crate::vm_latest::utils::logs;
use crate::vm_latest::vm::Vm;
impl Vm {
@@ -24,8 +25,8 @@ impl Vm {
.collect();
let storage_logs_count = storage_logs.len();
- let (events, l2_to_l1_logs) =
- self.collect_events_and_l1_logs_after_timestamp(from_timestamp);
+ let (events, system_l2_to_l1_logs) =
+ self.collect_events_and_l1_system_logs_after_timestamp(from_timestamp);
let log_queries = self
.state
@@ -37,28 +38,34 @@ impl Vm {
from_timestamp,
);
+ let user_logs = extract_l2tol1logs_from_l1_messenger(&events);
+
let total_log_queries_count =
storage_logs_count + log_queries.len() + precompile_calls_count;
+
VmExecutionLogs {
storage_logs,
events,
- l2_to_l1_logs,
+ user_l2_to_l1_logs: user_logs
+ .into_iter()
+ .map(|log| UserL2ToL1Log(log.into()))
+ .collect(),
+ system_l2_to_l1_logs: system_l2_to_l1_logs
+ .into_iter()
+ .map(SystemL2ToL1Log)
+ .collect(),
total_log_queries_count,
}
}
- pub(crate) fn collect_events_and_l1_logs_after_timestamp(
+ pub(crate) fn collect_events_and_l1_system_logs_after_timestamp(
&self,
from_timestamp: Timestamp,
) -> (Vec, Vec) {
- let (raw_events, l1_messages) = self
- .state
- .event_sink
- .get_events_and_l2_l1_logs_after_timestamp(from_timestamp);
- let events = merge_events(raw_events)
- .into_iter()
- .map(|e| e.into_vm_event(self.batch_env.number))
- .collect();
- (events, l1_messages.into_iter().map(Into::into).collect())
+ logs::collect_events_and_l1_system_logs_after_timestamp(
+ &self.state,
+ &self.batch_env,
+ from_timestamp,
+ )
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/implementation/snapshots.rs b/core/lib/multivm/src/versions/vm_latest/implementation/snapshots.rs
index 97dfea7c998..99d41a2aec6 100644
--- a/core/lib/multivm/src/versions/vm_latest/implementation/snapshots.rs
+++ b/core/lib/multivm/src/versions/vm_latest/implementation/snapshots.rs
@@ -2,7 +2,7 @@ use vise::{Buckets, EncodeLabelSet, EncodeLabelValue, Family, Histogram, Metrics
use std::time::Duration;
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_state::WriteStorage;
use crate::vm_latest::{
diff --git a/core/lib/multivm/src/versions/vm_latest/implementation/statistics.rs b/core/lib/multivm/src/versions/vm_latest/implementation/statistics.rs
index 3706e458257..afa57309a31 100644
--- a/core/lib/multivm/src/versions/vm_latest/implementation/statistics.rs
+++ b/core/lib/multivm/src/versions/vm_latest/implementation/statistics.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_state::WriteStorage;
use zksync_types::U256;
diff --git a/core/lib/multivm/src/versions/vm_latest/implementation/tx.rs b/core/lib/multivm/src/versions/vm_latest/implementation/tx.rs
index e6fa2d543cc..16087aa4eb0 100644
--- a/core/lib/multivm/src/versions/vm_latest/implementation/tx.rs
+++ b/core/lib/multivm/src/versions/vm_latest/implementation/tx.rs
@@ -1,6 +1,6 @@
use crate::vm_latest::constants::BOOTLOADER_HEAP_PAGE;
use crate::vm_latest::implementation::bytecode::{bytecode_to_factory_dep, compress_bytecodes};
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_state::WriteStorage;
use zksync_types::l1::is_l1_tx_type;
use zksync_types::Transaction;
diff --git a/core/lib/multivm/src/versions/vm_latest/mod.rs b/core/lib/multivm/src/versions/vm_latest/mod.rs
index 10339d7e4d3..a044980e96e 100644
--- a/core/lib/multivm/src/versions/vm_latest/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/mod.rs
@@ -12,10 +12,17 @@ pub use tracers::{
StorageInvocations, ValidationError, ValidationTracer, ValidationTracerParams,
};
+pub use crate::interface::types::{
+ inputs::{L1BatchEnv, L2BlockEnv, SystemEnv, TxExecutionMode, VmExecutionMode},
+ outputs::{
+ BootloaderMemory, CurrentExecutionState, ExecutionResult, FinishedL1Batch, L2Block,
+ Refunds, VmExecutionLogs, VmExecutionResultAndLogs, VmExecutionStatistics, VmMemoryMetrics,
+ },
+};
+pub use types::internals::ZkSyncVmState;
pub use utils::transaction_encoding::TransactionVmExt;
pub use bootloader_state::BootloaderState;
-pub use types::internals::ZkSyncVmState;
pub use vm::Vm;
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/event_sink.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/event_sink.rs
index 25b33ce87c3..4174d9f4f17 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/event_sink.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/event_sink.rs
@@ -2,8 +2,9 @@ use crate::vm_latest::old_vm::{
history_recorder::{AppDataFrameManagerWithHistory, HistoryEnabled, HistoryMode},
oracles::OracleWithHistory,
};
+use itertools::Itertools;
use std::collections::HashMap;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
abstractions::EventSink,
aux_structures::{LogQuery, Timestamp},
reference_impls::event_sink::EventMessage,
@@ -11,6 +12,7 @@ use zk_evm_1_3_3::{
BOOTLOADER_FORMAL_ADDRESS, EVENT_AUX_BYTE, L1_MESSAGE_AUX_BYTE,
},
};
+use zksync_types::U256;
#[derive(Debug, Clone, PartialEq, Default)]
pub struct InMemoryEventSink {
@@ -37,7 +39,9 @@ impl InMemoryEventSink {
let history = self.frames_stack.forward().current_frame();
let (events, l1_messages) = Self::events_and_l1_messages_from_history(history);
- (history.iter().map(|x| **x).collect(), events, l1_messages)
+ let events_logs = Self::events_logs_from_history(history);
+
+ (events_logs, events, l1_messages)
}
pub fn get_log_queries(&self) -> usize {
@@ -63,6 +67,92 @@ impl InMemoryEventSink {
Self::events_and_l1_messages_from_history(self.log_queries_after_timestamp(from_timestamp))
}
+ fn events_logs_from_history(history: &[Box]) -> Vec {
+ // Filter out all the L2->L1 logs and leave only events
+ let mut events = history
+ .iter()
+ .filter_map(|log_query| (log_query.aux_byte == EVENT_AUX_BYTE).then_some(**log_query))
+ .collect_vec();
+
+ // Sort the events by timestamp and rollback flag, basically ensuring that
+ // if an event has been rolled back, the original event and its rollback will be put together
+ events.sort_by_key(|log| (log.timestamp, log.rollback));
+
+ let mut stack = Vec::::new();
+ let mut net_history = vec![];
+ for el in events.iter() {
+ assert_eq!(el.shard_id, 0, "only rollup shard is supported");
+ if stack.is_empty() {
+ assert!(!el.rollback);
+ stack.push(*el);
+ } else {
+ // we can always pop as it's either one to add to queue, or discard
+ let previous = stack.pop().unwrap();
+ if previous.timestamp == el.timestamp {
+ // Only rollback can have the same timestamp, so here we do nothing and simply
+ // double check the invariants
+ assert!(!previous.rollback);
+ assert!(el.rollback);
+ assert!(previous.rw_flag);
+ assert!(el.rw_flag);
+ assert_eq!(previous.tx_number_in_block, el.tx_number_in_block);
+ assert_eq!(previous.shard_id, el.shard_id);
+ assert_eq!(previous.address, el.address);
+ assert_eq!(previous.key, el.key);
+ assert_eq!(previous.written_value, el.written_value);
+ assert_eq!(previous.is_service, el.is_service);
+ continue;
+ } else {
+ // The event on the stack has not been rolled back. It must be a different event,
+ // with a different timestamp.
+ assert!(!el.rollback);
+ stack.push(*el);
+
+ // cleanup some fields
+ // flags are conventions
+ let sorted_log_query = LogQuery {
+ timestamp: Timestamp(0),
+ tx_number_in_block: previous.tx_number_in_block,
+ aux_byte: 0,
+ shard_id: previous.shard_id,
+ address: previous.address,
+ key: previous.key,
+ read_value: U256::zero(),
+ written_value: previous.written_value,
+ rw_flag: false,
+ rollback: false,
+ is_service: previous.is_service,
+ };
+
+ net_history.push(sorted_log_query);
+ }
+ }
+ }
+
+ // In case the stack is non-empty, then the last element of it has not been rolled back.
+ if let Some(previous) = stack.pop() {
+ // cleanup some fields
+ // flags are conventions
+ let sorted_log_query = LogQuery {
+ timestamp: Timestamp(0),
+ tx_number_in_block: previous.tx_number_in_block,
+ aux_byte: 0,
+ shard_id: previous.shard_id,
+ address: previous.address,
+ key: previous.key,
+ read_value: U256::zero(),
+ written_value: previous.written_value,
+ rw_flag: false,
+ rollback: false,
+ is_service: previous.is_service,
+ };
+
+ net_history.push(sorted_log_query);
+ }
+
+ net_history
+ }
+
fn events_and_l1_messages_from_history(
history: &[Box],
) -> (Vec, Vec) {
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/events.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/events.rs
index de918e06914..eed8fee4ac8 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/events.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/events.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::{ethereum_types::Address, reference_impls::event_sink::EventMessage};
+use zk_evm_1_4_0::{ethereum_types::Address, reference_impls::event_sink::EventMessage};
use zksync_types::{L1BatchNumber, VmEvent, EVENT_WRITER_ADDRESS, H256};
use zksync_utils::{be_chunks_to_h256_words, h256_to_account_address};
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/history_recorder.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/history_recorder.rs
index bbffd5b4d87..7c0490044d6 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/history_recorder.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/history_recorder.rs
@@ -1,6 +1,6 @@
use std::{collections::HashMap, fmt::Debug, hash::Hash};
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
aux_structures::Timestamp,
vm_state::PrimitiveValue,
zkevm_opcode_defs::{self},
@@ -773,7 +773,7 @@ impl HistoryRecorder, H> {
mod tests {
use crate::vm_latest::old_vm::history_recorder::{HistoryRecorder, MemoryWrapper};
use crate::vm_latest::HistoryDisabled;
- use zk_evm_1_3_3::{aux_structures::Timestamp, vm_state::PrimitiveValue};
+ use zk_evm_1_4_0::{aux_structures::Timestamp, vm_state::PrimitiveValue};
use zksync_types::U256;
#[test]
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/memory.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/memory.rs
index 2ed85f6a87f..5694a725d93 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/memory.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/memory.rs
@@ -1,7 +1,7 @@
-use zk_evm_1_3_3::abstractions::{Memory, MemoryType};
-use zk_evm_1_3_3::aux_structures::{MemoryPage, MemoryQuery, Timestamp};
-use zk_evm_1_3_3::vm_state::PrimitiveValue;
-use zk_evm_1_3_3::zkevm_opcode_defs::FatPointer;
+use zk_evm_1_4_0::abstractions::{Memory, MemoryType};
+use zk_evm_1_4_0::aux_structures::{MemoryPage, MemoryQuery, Timestamp};
+use zk_evm_1_4_0::vm_state::PrimitiveValue;
+use zk_evm_1_4_0::zkevm_opcode_defs::FatPointer;
use zksync_types::U256;
use crate::vm_latest::old_vm::history_recorder::{
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/decommitter.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/decommitter.rs
index f98abd72908..fe5416cd120 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/decommitter.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/decommitter.rs
@@ -5,9 +5,9 @@ use crate::vm_latest::old_vm::history_recorder::{
HistoryEnabled, HistoryMode, HistoryRecorder, WithHistory,
};
-use zk_evm_1_3_3::abstractions::MemoryType;
-use zk_evm_1_3_3::aux_structures::Timestamp;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::abstractions::MemoryType;
+use zk_evm_1_4_0::aux_structures::Timestamp;
+use zk_evm_1_4_0::{
abstractions::{DecommittmentProcessor, Memory},
aux_structures::{DecommittmentQuery, MemoryIndex, MemoryLocation, MemoryPage, MemoryQuery},
};
@@ -173,7 +173,7 @@ impl DecommittmentProcess
memory: &mut M,
) -> Result<
(
- zk_evm_1_3_3::aux_structures::DecommittmentQuery,
+ zk_evm_1_4_0::aux_structures::DecommittmentQuery,
Option>,
),
anyhow::Error,
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/mod.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/mod.rs
index f9d35c2567b..3f8d2d0f138 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/mod.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
pub(crate) mod decommitter;
pub(crate) mod precompile;
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/precompile.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/precompile.rs
index 5566595108b..ed3621fc497 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/precompile.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/precompile.rs
@@ -1,9 +1,9 @@
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
abstractions::Memory,
abstractions::PrecompileCyclesWitness,
abstractions::PrecompilesProcessor,
aux_structures::{LogQuery, MemoryQuery, Timestamp},
- precompiles::DefaultPrecompilesProcessor,
+ zk_evm_abstractions::precompiles::DefaultPrecompilesProcessor,
};
use crate::vm_latest::old_vm::history_recorder::{HistoryEnabled, HistoryMode, HistoryRecorder};
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/storage.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/storage.rs
index 14a03f86426..2b779e39f33 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/storage.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/oracles/storage.rs
@@ -5,9 +5,9 @@ use crate::vm_latest::old_vm::history_recorder::{
HistoryRecorder, StorageWrapper, WithHistory,
};
-use zk_evm_1_3_3::abstractions::RefundedAmounts;
-use zk_evm_1_3_3::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::abstractions::RefundedAmounts;
+use zk_evm_1_4_0::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES;
+use zk_evm_1_4_0::{
abstractions::{RefundType, Storage as VmStorageOracle},
aux_structures::{LogQuery, Timestamp},
};
@@ -331,8 +331,8 @@ fn get_pubdata_price_bytes(_query: &LogQuery, is_initial: bool) -> u32 {
// TODO (SMA-1702): take into account the content of the log query, i.e. values that contain mostly zeroes
// should cost less.
if is_initial {
- zk_evm_1_3_3::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES as u32
+ zk_evm_1_4_0::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES as u32
} else {
- zk_evm_1_3_3::zkevm_opcode_defs::system_params::REPEATED_STORAGE_WRITE_PUBDATA_BYTES as u32
+ zk_evm_1_4_0::zkevm_opcode_defs::system_params::REPEATED_STORAGE_WRITE_PUBDATA_BYTES as u32
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/old_vm/utils.rs b/core/lib/multivm/src/versions/vm_latest/old_vm/utils.rs
index 80156707ae9..afaa19cac87 100644
--- a/core/lib/multivm/src/versions/vm_latest/old_vm/utils.rs
+++ b/core/lib/multivm/src/versions/vm_latest/old_vm/utils.rs
@@ -3,11 +3,11 @@ use crate::vm_latest::old_vm::memory::SimpleMemory;
use crate::vm_latest::types::internals::ZkSyncVmState;
use crate::vm_latest::HistoryMode;
-use zk_evm_1_3_3::zkevm_opcode_defs::decoding::{
+use zk_evm_1_4_0::zkevm_opcode_defs::decoding::{
AllowedPcOrImm, EncodingModeProduction, VmEncodingMode,
};
-use zk_evm_1_3_3::zkevm_opcode_defs::RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::zkevm_opcode_defs::RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER;
+use zk_evm_1_4_0::{
aux_structures::{MemoryPage, Timestamp},
vm_state::PrimitiveValue,
zkevm_opcode_defs::FatPointer,
diff --git a/core/lib/multivm/src/versions/vm_latest/oracles/storage.rs b/core/lib/multivm/src/versions/vm_latest/oracles/storage.rs
index bcbce932cb4..beec2fa086f 100644
--- a/core/lib/multivm/src/versions/vm_latest/oracles/storage.rs
+++ b/core/lib/multivm/src/versions/vm_latest/oracles/storage.rs
@@ -6,15 +6,17 @@ use crate::vm_latest::old_vm::history_recorder::{
};
use crate::vm_latest::old_vm::oracles::OracleWithHistory;
-use zk_evm_1_3_3::abstractions::RefundedAmounts;
-use zk_evm_1_3_3::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::abstractions::RefundedAmounts;
+use zk_evm_1_4_0::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES;
+use zk_evm_1_4_0::{
abstractions::{RefundType, Storage as VmStorageOracle},
aux_structures::{LogQuery, Timestamp},
};
use zksync_state::{StoragePtr, WriteStorage};
use zksync_types::utils::storage_key_for_eth_balance;
+use zksync_types::writes::compression::compress_with_best_strategy;
+use zksync_types::writes::{BYTES_PER_DERIVED_KEY, BYTES_PER_ENUMERATION_INDEX};
use zksync_types::{
AccountTreeId, Address, StorageKey, StorageLogQuery, StorageLogQueryType, BOOTLOADER_ADDRESS,
U256,
@@ -94,12 +96,24 @@ impl StorageOracle {
|| *key == storage_key_for_eth_balance(&BOOTLOADER_ADDRESS)
}
+ fn get_initial_value(&self, storage_key: &StorageKey) -> Option {
+ self.initial_values.inner().get(storage_key).copied()
+ }
+
+ fn set_initial_value(&mut self, storage_key: &StorageKey, value: U256, timestamp: Timestamp) {
+ if !self.initial_values.inner().contains_key(storage_key) {
+ self.initial_values.insert(*storage_key, value, timestamp);
+ }
+ }
+
pub fn read_value(&mut self, mut query: LogQuery) -> LogQuery {
let key = triplet_to_storage_key(query.shard_id, query.address, query.key);
let current_value = self.storage.read_from_storage(&key);
query.read_value = current_value;
+ self.set_initial_value(&key, current_value, query.timestamp);
+
self.frames_stack.push_forward(
Box::new(StorageLogQuery {
log_query: query,
@@ -111,7 +125,7 @@ impl StorageOracle {
query
}
- pub fn write_value(&mut self, mut query: LogQuery) -> LogQuery {
+ pub fn write_value(&mut self, query: LogQuery) -> LogQuery {
let key = triplet_to_storage_key(query.shard_id, query.address, query.key);
let current_value =
self.storage
@@ -124,12 +138,7 @@ impl StorageOracle {
StorageLogQueryType::RepeatedWrite
};
- query.read_value = current_value;
-
- if !self.initial_values.inner().contains_key(&key) {
- self.initial_values
- .insert(key, current_value, query.timestamp);
- }
+ self.set_initial_value(&key, current_value, query.timestamp);
let mut storage_log_query = StorageLogQuery {
log_query: query,
@@ -207,7 +216,11 @@ impl StorageOracle {
fn base_price_for_write_query(&self, query: &LogQuery) -> u32 {
let storage_key = storage_key_of_log(query);
- self.base_price_for_write(&storage_key, query.read_value, query.written_value)
+ let initial_value = self
+ .get_initial_value(&storage_key)
+ .unwrap_or(self.storage.read_from_storage(&storage_key));
+
+ self.base_price_for_write(&storage_key, initial_value, query.written_value)
}
pub(crate) fn base_price_for_write(
@@ -226,16 +239,22 @@ impl StorageOracle {
.borrow_mut()
.is_write_initial(storage_key);
- get_pubdata_price_bytes(is_initial_write)
+ get_pubdata_price_bytes(prev_value, new_value, is_initial_write)
}
// Returns the price of the update in terms of pubdata bytes.
// TODO (SMA-1701): update VM to accept gas instead of pubdata.
- fn value_update_price(&self, query: &LogQuery) -> u32 {
+ fn value_update_price(&mut self, query: &LogQuery) -> u32 {
let storage_key = storage_key_of_log(query);
let base_cost = self.base_price_for_write_query(query);
+ let initial_value = self
+ .get_initial_value(&storage_key)
+ .unwrap_or(self.storage.read_from_storage(&storage_key));
+
+ self.set_initial_value(&storage_key, initial_value, query.timestamp);
+
let already_paid = self.prepaid_for_write(&storage_key);
if base_cost <= already_paid {
@@ -299,7 +318,7 @@ impl VmStorageOracle for StorageOracle {
fn execute_partial_query(
&mut self,
_monotonic_cycle_counter: u32,
- query: LogQuery,
+ mut query: LogQuery,
) -> LogQuery {
// tracing::trace!(
// "execute partial query cyc {:?} addr {:?} key {:?}, rw {:?}, wr {:?}, tx {:?}",
@@ -314,6 +333,8 @@ impl VmStorageOracle for StorageOracle {
if query.rw_flag {
// The number of bytes that have been compensated by the user to perform this write
let storage_key = storage_key_of_log(&query);
+ let read_value = self.storage.read_from_storage(&storage_key);
+ query.read_value = read_value;
// It is considered that the user has paid for the whole base price for the writes
let to_pay_by_user = self.base_price_for_write_query(&query);
@@ -342,7 +363,14 @@ impl VmStorageOracle for StorageOracle {
_monotonic_cycle_counter: u32,
partial_query: &LogQuery,
) -> RefundType {
- let price_to_pay = self.value_update_price(partial_query);
+ let storage_key = storage_key_of_log(partial_query);
+ let mut partial_query = *partial_query;
+ let read_value = self.storage.read_from_storage(&storage_key);
+ partial_query.read_value = read_value;
+
+ let price_to_pay = self
+ .value_update_price(&partial_query)
+ .min(INITIAL_STORAGE_WRITE_PUBDATA_BYTES as u32);
let refund = RefundType::RepeatedWrite(RefundedAmounts {
ergs: 0,
@@ -409,18 +437,51 @@ impl VmStorageOracle for StorageOracle {
/// Returns the number of bytes needed to publish a slot.
// Since we need to publish the state diffs onchain, for each of the updated storage slot
-// we basically need to publish the following pair: ().
-// While new_value is always 32 bytes long, for key we use the following optimization:
+// we basically need to publish the following pair: ().
+// For key we use the following optimization:
// - The first time we publish it, we use 32 bytes.
// Then, we remember a 8-byte id for this slot and assign it to it. We call this initial write.
-// - The second time we publish it, we will use this 8-byte instead of the 32 bytes of the entire key.
-// So the total size of the publish pubdata is 40 bytes. We call this kind of write the repeated one
-fn get_pubdata_price_bytes(is_initial: bool) -> u32 {
+// - The second time we publish it, we will use the 4/5 byte representation of this 8-byte instead of the 32
+// bytes of the entire key.
+// For value compression, we use a metadata byte which holds the length of the value and the operation from the
+// previous state to the new state, and the compressed value. The maxiumum for this is 33 bytes.
+// Total bytes for initial writes then becomes 65 bytes and repeated writes becomes 38 bytes.
+fn get_pubdata_price_bytes(initial_value: U256, final_value: U256, is_initial: bool) -> u32 {
// TODO (SMA-1702): take into account the content of the log query, i.e. values that contain mostly zeroes
// should cost less.
+
+ let compressed_value_size =
+ compress_with_best_strategy(initial_value, final_value).len() as u32;
+
if is_initial {
- zk_evm_1_3_3::zkevm_opcode_defs::system_params::INITIAL_STORAGE_WRITE_PUBDATA_BYTES as u32
+ (BYTES_PER_DERIVED_KEY as u32) + compressed_value_size
} else {
- zk_evm_1_3_3::zkevm_opcode_defs::system_params::REPEATED_STORAGE_WRITE_PUBDATA_BYTES as u32
+ (BYTES_PER_ENUMERATION_INDEX as u32) + compressed_value_size
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_get_pubdata_price_bytes() {
+ let initial_value = U256::default();
+ let final_value = U256::from(92122);
+ let is_initial = true;
+
+ let compression_len = 4;
+
+ let initial_bytes_price = get_pubdata_price_bytes(initial_value, final_value, is_initial);
+ let repeated_bytes_price = get_pubdata_price_bytes(initial_value, final_value, !is_initial);
+
+ assert_eq!(
+ initial_bytes_price,
+ (compression_len + BYTES_PER_DERIVED_KEY as usize) as u32
+ );
+ assert_eq!(
+ repeated_bytes_price,
+ (compression_len + BYTES_PER_ENUMERATION_INDEX as usize) as u32
+ );
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/l1_tx_execution.rs b/core/lib/multivm/src/versions/vm_latest/tests/l1_tx_execution.rs
index 9cec16099aa..c4d7a16070e 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/l1_tx_execution.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/l1_tx_execution.rs
@@ -1,5 +1,5 @@
use zksync_system_constants::BOOTLOADER_ADDRESS;
-use zksync_types::l2_to_l1_log::L2ToL1Log;
+use zksync_types::l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log};
use zksync_types::storage_writes_deduplicator::StorageWritesDeduplicator;
use zksync_types::{get_code_key, get_known_code_key, U256};
use zksync_utils::u256_to_h256;
@@ -18,13 +18,17 @@ fn test_l1_tx_execution() {
// Here instead of marking code hash via the bootloader means, we will be
// using L1->L2 communication, the same it would likely be done during the priority mode.
- // There are always at least 3 initial writes here, because we pay fees from l1:
+ // There are always at least 7 initial writes here, because we pay fees from l1:
// - totalSupply of ETH token
// - balance of the refund recipient
// - balance of the bootloader
- // - tx_rollout hash
+ // - tx_rolling hash
+ // - rolling hash of L2->L1 logs
+ // - transaction number in block counter
+ // - L2->L1 log counter in L1Messenger
- let basic_initial_writes = 1;
+ // TODO(PLA-537): right now we are using 4 slots instead of 7 due to 0 fee for transaction.
+ let basic_initial_writes = 4;
let mut vm = VmTesterBuilder::new(HistoryEnabled)
.with_empty_in_memory_storage()
@@ -38,14 +42,17 @@ fn test_l1_tx_execution() {
let deploy_tx = account.get_deploy_tx(&contract_code, None, TxType::L1 { serial_id: 1 });
let tx_data: TransactionData = deploy_tx.tx.clone().into();
- let required_l2_to_l1_logs = vec![L2ToL1Log {
+ let required_l2_to_l1_logs: Vec<_> = vec![L2ToL1Log {
shard_id: 0,
is_service: true,
tx_number_in_block: 0,
sender: BOOTLOADER_ADDRESS,
key: tx_data.tx_hash(0.into()),
value: u256_to_h256(U256::from(1u32)),
- }];
+ }]
+ .into_iter()
+ .map(UserL2ToL1Log)
+ .collect();
vm.vm.push_transaction(deploy_tx.tx.clone());
@@ -65,7 +72,7 @@ fn test_l1_tx_execution() {
verify_required_storage(&vm.vm.state, expected_slots);
- assert_eq!(res.logs.l2_to_l1_logs, required_l2_to_l1_logs);
+ assert_eq!(res.logs.user_l2_to_l1_logs, required_l2_to_l1_logs);
let tx = account.get_test_contract_transaction(
deploy_tx.address,
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs b/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs
index b4f0c1b5778..64bcd766783 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/l2_blocks.rs
@@ -11,15 +11,13 @@ use crate::vm_latest::tests::tester::default_l1_batch;
use crate::vm_latest::tests::tester::VmTesterBuilder;
use crate::vm_latest::utils::l2_blocks::get_l2_block_hash_key;
use crate::vm_latest::{HistoryEnabled, HistoryMode, Vm};
-use zk_evm_1_3_3::aux_structures::Timestamp;
-use zksync_state::{ReadStorage, WriteStorage};
-use zksync_system_constants::{
- CURRENT_VIRTUAL_BLOCK_INFO_POSITION, REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE,
-};
-use zksync_types::block::{pack_block_info, unpack_block_info};
+use zk_evm_1_4_0::aux_structures::Timestamp;
+use zksync_state::WriteStorage;
+use zksync_system_constants::REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE;
+use zksync_types::block::pack_block_info;
use zksync_types::{
block::{legacy_miniblock_hash, miniblock_hash},
- get_code_key, AccountTreeId, Execute, ExecuteTransactionCommon, L1BatchNumber, L1TxCommonData,
+ AccountTreeId, Execute, ExecuteTransactionCommon, L1BatchNumber, L1TxCommonData,
MiniblockNumber, StorageKey, Transaction, H160, H256, SYSTEM_CONTEXT_ADDRESS,
SYSTEM_CONTEXT_BLOCK_INFO_POSITION, SYSTEM_CONTEXT_CURRENT_L2_BLOCK_INFO_POSITION,
SYSTEM_CONTEXT_CURRENT_TX_ROLLING_HASH_POSITION, U256,
@@ -404,72 +402,6 @@ fn test_l2_block_first_in_batch() {
);
}
-#[test]
-fn test_l2_block_upgrade() {
- let mut vm = VmTesterBuilder::new(HistoryEnabled)
- .with_empty_in_memory_storage()
- .with_execution_mode(TxExecutionMode::VerifyExecute)
- .with_random_rich_accounts(1)
- .build();
-
- vm.vm
- .state
- .storage
- .storage
- .get_ptr()
- .borrow_mut()
- .set_value(get_code_key(&SYSTEM_CONTEXT_ADDRESS), H256::default());
-
- let l1_tx = get_l1_noop();
- // Firstly we execute the first transaction
- vm.vm.push_transaction(l1_tx);
- let result = vm.vm.execute(VmExecutionMode::OneTx);
- assert!(!result.result.is_failed(), "No revert reason expected");
- let result = vm.vm.execute(VmExecutionMode::Batch);
- assert!(!result.result.is_failed(), "No revert reason expected");
-}
-
-#[test]
-fn test_l2_block_upgrade_ending() {
- let mut l1_batch = default_l1_batch(L1BatchNumber(1));
- l1_batch.timestamp = 1;
- let mut vm = VmTesterBuilder::new(HistoryEnabled)
- .with_empty_in_memory_storage()
- .with_execution_mode(TxExecutionMode::VerifyExecute)
- .with_l1_batch_env(l1_batch.clone())
- .with_random_rich_accounts(1)
- .build();
-
- let l1_tx = get_l1_noop();
-
- let storage = vm.storage.clone();
-
- storage
- .borrow_mut()
- .set_value(get_code_key(&SYSTEM_CONTEXT_ADDRESS), H256::default());
-
- vm.vm.push_transaction(l1_tx.clone());
- let result = vm.vm.execute(VmExecutionMode::OneTx);
-
- assert!(!result.result.is_failed(), "No revert reason expected");
-
- let virtual_block_info = storage.borrow_mut().read_value(&StorageKey::new(
- AccountTreeId::new(SYSTEM_CONTEXT_ADDRESS),
- CURRENT_VIRTUAL_BLOCK_INFO_POSITION,
- ));
-
- let (virtual_block_number, virtual_block_timestamp) =
- unpack_block_info(h256_to_u256(virtual_block_info));
-
- assert_eq!(virtual_block_number as u32, l1_batch.first_l2_block.number);
- assert_eq!(virtual_block_timestamp, l1_batch.first_l2_block.timestamp);
- vm.vm.push_transaction(l1_tx);
- let result = vm.vm.execute(VmExecutionMode::OneTx);
- assert!(!result.result.is_failed(), "No revert reason expected");
- let result = vm.vm.execute(VmExecutionMode::Batch);
- assert!(!result.result.is_failed(), "No revert reason expected");
-}
-
fn set_manual_l2_block_info(
vm: &mut Vm,
tx_number: usize,
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/refunds.rs b/core/lib/multivm/src/versions/vm_latest/tests/refunds.rs
index e0dc0c758e4..4bbbcb436d5 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/refunds.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/refunds.rs
@@ -80,8 +80,13 @@ fn test_predetermined_refunded_gas() {
);
assert_eq!(
- current_state_with_predefined_refunds.l2_to_l1_logs,
- current_state_without_predefined_refunds.l2_to_l1_logs
+ current_state_with_predefined_refunds.user_l2_to_l1_logs,
+ current_state_without_predefined_refunds.user_l2_to_l1_logs
+ );
+
+ assert_eq!(
+ current_state_with_predefined_refunds.system_logs,
+ current_state_without_predefined_refunds.system_logs
);
assert_eq!(
@@ -128,8 +133,13 @@ fn test_predetermined_refunded_gas() {
);
assert_eq!(
- current_state_with_changed_predefined_refunds.l2_to_l1_logs,
- current_state_without_predefined_refunds.l2_to_l1_logs
+ current_state_with_changed_predefined_refunds.user_l2_to_l1_logs,
+ current_state_without_predefined_refunds.user_l2_to_l1_logs
+ );
+
+ assert_ne!(
+ current_state_with_changed_predefined_refunds.system_logs,
+ current_state_without_predefined_refunds.system_logs
);
assert_eq!(
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs b/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs
index 893efde2739..b9888f111b1 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/tester/inner_state.rs
@@ -1,7 +1,7 @@
use std::collections::HashMap;
-use zk_evm_1_3_3::aux_structures::Timestamp;
-use zk_evm_1_3_3::vm_state::VmLocalState;
+use zk_evm_1_4_0::aux_structures::Timestamp;
+use zk_evm_1_4_0::vm_state::VmLocalState;
use zksync_state::WriteStorage;
use zksync_types::{StorageKey, StorageLogQuery, StorageValue, U256};
diff --git a/core/lib/multivm/src/versions/vm_latest/tests/upgrade.rs b/core/lib/multivm/src/versions/vm_latest/tests/upgrade.rs
index dd8554fbd23..b321b33344d 100644
--- a/core/lib/multivm/src/versions/vm_latest/tests/upgrade.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tests/upgrade.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::aux_structures::Timestamp;
+use zk_evm_1_4_0::aux_structures::Timestamp;
use zksync_types::{
ethabi::Contract,
@@ -34,6 +34,10 @@ fn test_protocol_upgrade_is_first() {
.build();
let bytecode_hash = hash_bytecode(&read_test_contract());
+ vm.vm
+ .storage
+ .borrow_mut()
+ .set_value(get_known_code_key(&bytecode_hash), u256_to_h256(1.into()));
// Here we just use some random transaction of protocol upgrade type:
let protocol_upgrade_transaction = get_forced_deploy_tx(&[ForceDeployment {
@@ -49,6 +53,20 @@ fn test_protocol_upgrade_is_first() {
input: vec![],
}]);
+ // Another random upgrade transaction
+ let another_protocol_upgrade_transaction = get_forced_deploy_tx(&[ForceDeployment {
+ // The bytecode hash to put on an address
+ bytecode_hash,
+ // The address on which to deploy the bytecodehash to
+ address: H160::random(),
+ // Whether to run the constructor on the force deployment
+ call_constructor: false,
+ // The value with which to initialize a contract
+ value: U256::zero(),
+ // The constructor calldata
+ input: vec![],
+ }]);
+
let normal_l1_transaction = vm.rich_accounts[0]
.get_deploy_tx(&read_test_contract(), None, TxType::L1 { serial_id: 0 })
.tx;
@@ -60,7 +78,7 @@ fn test_protocol_upgrade_is_first() {
// Test 1: there must be only one system transaction in block
vm.vm.push_transaction(protocol_upgrade_transaction.clone());
vm.vm.push_transaction(normal_l1_transaction.clone());
- vm.vm.push_transaction(protocol_upgrade_transaction.clone());
+ vm.vm.push_transaction(another_protocol_upgrade_transaction);
vm.vm.execute(VmExecutionMode::OneTx);
vm.vm.execute(VmExecutionMode::OneTx);
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/call.rs b/core/lib/multivm/src/versions/vm_latest/tracers/call.rs
index 91359e86bf3..61c40e5b3be 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/call.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/call.rs
@@ -2,8 +2,8 @@ use once_cell::sync::OnceCell;
use std::marker::PhantomData;
use std::sync::Arc;
-use zk_evm_1_3_3::tracing::{AfterExecutionData, VmLocalStateData};
-use zk_evm_1_3_3::zkevm_opcode_defs::{
+use zk_evm_1_4_0::tracing::{AfterExecutionData, VmLocalStateData};
+use zk_evm_1_4_0::zkevm_opcode_defs::{
FarCallABI, FarCallOpcode, FatPointer, Opcode, RetOpcode,
CALL_IMPLICIT_CALLDATA_FAT_PTR_REGISTER, RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER,
};
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/default_tracers.rs b/core/lib/multivm/src/versions/vm_latest/tracers/default_tracers.rs
index b6b36c8a736..32155b7d1b4 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/default_tracers.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/default_tracers.rs
@@ -1,7 +1,7 @@
use std::fmt::{Debug, Formatter};
use crate::interface::{Halt, VmExecutionMode};
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
tracing::{
AfterDecodingData, AfterExecutionData, BeforeExecutionData, Tracer, VmLocalStateData,
},
@@ -28,6 +28,8 @@ use crate::vm_latest::tracers::{RefundsTracer, ResultTracer};
use crate::vm_latest::types::internals::ZkSyncVmState;
use crate::vm_latest::VmExecutionStopReason;
+use super::PubdataTracer;
+
/// Default tracer for the VM. It manages the other tracers execution and stop the vm when needed.
pub(crate) struct DefaultExecutionTracer {
tx_has_been_processed: bool,
@@ -45,6 +47,10 @@ pub(crate) struct DefaultExecutionTracer {
// ensures static dispatch, enhancing performance by avoiding dynamic dispatch overhead.
// Additionally, being an internal tracer, it saves the results directly to VmResultAndLogs.
pub(crate) refund_tracer: Option,
+ // The pubdata tracer is responsible for inserting the pubdata packing information into the bootloader
+ // memory at the end of the batch. Its separation from the custom tracer
+ // ensures static dispatch, enhancing performance by avoiding dynamic dispatch overhead.
+ pub(crate) pubdata_tracer: Option,
pub(crate) custom_tracers: Vec>>,
ret_from_the_bootloader: Option,
storage: StoragePtr,
@@ -86,7 +92,9 @@ impl Tracer for DefaultExecutionTracer {
if let Some(refund_tracer) = &mut self.refund_tracer {
>::after_decoding(refund_tracer, state, data, memory);
}
-
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ >::after_decoding(pubdata_tracer, state, data, memory);
+ }
for tracer in self.custom_tracers.iter_mut() {
tracer.after_decoding(state, data, memory)
}
@@ -123,6 +131,9 @@ impl Tracer for DefaultExecutionTracer {
if let Some(refund_tracer) = &mut self.refund_tracer {
refund_tracer.before_execution(state, data, memory, self.storage.clone());
}
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ pubdata_tracer.before_execution(state, data, memory, self.storage.clone());
+ }
for tracer in self.custom_tracers.iter_mut() {
tracer.before_execution(state, data, memory, self.storage.clone());
}
@@ -135,7 +146,7 @@ impl Tracer for DefaultExecutionTracer {
memory: &Self::SupportedMemory,
) {
if let VmExecutionMode::Bootloader = self.execution_mode {
- let (next_opcode, _, _) = zk_evm_1_3_3::vm_state::read_and_decode(
+ let (next_opcode, _, _) = zk_evm_1_4_0::vm_state::read_and_decode(
state.vm_local_state,
memory,
&mut DummyTracer,
@@ -153,6 +164,9 @@ impl Tracer for DefaultExecutionTracer {
if let Some(refund_tracer) = &mut self.refund_tracer {
refund_tracer.after_execution(state, data, memory, self.storage.clone())
}
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ pubdata_tracer.after_execution(state, data, memory, self.storage.clone())
+ }
for tracer in self.custom_tracers.iter_mut() {
tracer.after_execution(state, data, memory, self.storage.clone());
}
@@ -166,6 +180,7 @@ impl DefaultExecutionTracer {
custom_tracers: Vec>>,
storage: StoragePtr,
refund_tracer: Option,
+ pubdata_tracer: Option,
) -> Self {
Self {
tx_has_been_processed: false,
@@ -177,6 +192,7 @@ impl DefaultExecutionTracer {
final_batch_info_requested: false,
result_tracer: ResultTracer::new(execution_mode),
refund_tracer,
+ pubdata_tracer,
custom_tracers,
ret_from_the_bootloader: None,
storage,
@@ -238,6 +254,9 @@ impl VmTracer for DefaultExecutionTracer<
if let Some(refund_tracer) = &mut self.refund_tracer {
refund_tracer.initialize_tracer(state);
}
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ pubdata_tracer.initialize_tracer(state);
+ }
for processor in self.custom_tracers.iter_mut() {
processor.initialize_tracer(state);
}
@@ -258,6 +277,11 @@ impl VmTracer for DefaultExecutionTracer<
.finish_cycle(state, bootloader_state)
.stricter(&result);
}
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ result = pubdata_tracer
+ .finish_cycle(state, bootloader_state)
+ .stricter(&result);
+ }
for processor in self.custom_tracers.iter_mut() {
result = processor
.finish_cycle(state, bootloader_state)
@@ -278,6 +302,9 @@ impl VmTracer for DefaultExecutionTracer<
if let Some(refund_tracer) = &mut self.refund_tracer {
refund_tracer.after_vm_execution(state, bootloader_state, stop_reason.clone());
}
+ if let Some(pubdata_tracer) = &mut self.pubdata_tracer {
+ pubdata_tracer.after_vm_execution(state, bootloader_state, stop_reason.clone());
+ }
for processor in self.custom_tracers.iter_mut() {
processor.after_vm_execution(state, bootloader_state, stop_reason.clone());
}
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/mod.rs b/core/lib/multivm/src/versions/vm_latest/tracers/mod.rs
index 11fefedc85a..3ac64deaabb 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/mod.rs
@@ -1,10 +1,12 @@
pub(crate) use default_tracers::DefaultExecutionTracer;
+pub(crate) use pubdata_tracer::PubdataTracer;
pub(crate) use refunds::RefundsTracer;
pub(crate) use result_tracer::ResultTracer;
pub use storage_invocations::StorageInvocations;
pub use validation::{ValidationError, ValidationTracer, ValidationTracerParams};
pub(crate) mod default_tracers;
+pub(crate) mod pubdata_tracer;
pub(crate) mod refunds;
pub(crate) mod result_tracer;
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs b/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs
new file mode 100644
index 00000000000..b43c96cb912
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs
@@ -0,0 +1,217 @@
+use zk_evm_1_4_0::{
+ aux_structures::Timestamp,
+ tracing::{BeforeExecutionData, VmLocalStateData},
+};
+
+use zksync_state::{StoragePtr, WriteStorage};
+use zksync_types::{
+ event::{
+ extract_bytecode_publication_requests_from_l1_messenger,
+ extract_l2tol1logs_from_l1_messenger, extract_long_l2_to_l1_messages, L1MessengerL2ToL1Log,
+ },
+ writes::StateDiffRecord,
+ zkevm_test_harness::witness::sort_storage_access::sort_storage_access_queries,
+ AccountTreeId, StorageKey, L1_MESSENGER_ADDRESS,
+};
+use zksync_utils::u256_to_h256;
+use zksync_utils::{h256_to_u256, u256_to_bytes_be};
+
+use crate::vm_latest::{
+ old_vm::{history_recorder::HistoryMode, memory::SimpleMemory},
+ types::internals::pubdata::PubdataInput,
+};
+use crate::{
+ vm_latest::StorageOracle,
+ vm_latest::{constants::BOOTLOADER_HEAP_PAGE, TracerExecutionStatus},
+};
+
+use crate::interface::types::inputs::L1BatchEnv;
+use crate::vm_latest::tracers::{
+ traits::{DynTracer, TracerExecutionStopReason, VmTracer},
+ utils::VmHook,
+};
+use crate::vm_latest::types::internals::ZkSyncVmState;
+use crate::vm_latest::utils::logs::collect_events_and_l1_system_logs_after_timestamp;
+use crate::{
+ interface::VmExecutionMode,
+ vm_latest::bootloader_state::{utils::apply_pubdata_to_memory, BootloaderState},
+};
+
+/// Tracer responsible for collecting information about refunds.
+#[derive(Debug, Clone)]
+pub(crate) struct PubdataTracer {
+ l1_batch_env: L1BatchEnv,
+ pubdata_info_requested: bool,
+ execution_mode: VmExecutionMode,
+}
+
+impl PubdataTracer {
+ pub(crate) fn new(l1_batch_env: L1BatchEnv, execution_mode: VmExecutionMode) -> Self {
+ Self {
+ l1_batch_env,
+ pubdata_info_requested: false,
+ execution_mode,
+ }
+ }
+}
+
+impl PubdataTracer {
+ // Packs part of L1 Messenger total pubdata that corresponds to
+ // L2toL1Logs sent in the block
+ fn get_total_user_logs(
+ &self,
+ state: &ZkSyncVmState,
+ ) -> Vec {
+ let (all_generated_events, _) = collect_events_and_l1_system_logs_after_timestamp(
+ state,
+ &self.l1_batch_env,
+ Timestamp(0),
+ );
+ extract_l2tol1logs_from_l1_messenger(&all_generated_events)
+ }
+
+ // Packs part of L1 Messenger total pubdata that corresponds to
+ // Messages sent in the block
+ fn get_total_l1_messenger_messages(
+ &self,
+ state: &ZkSyncVmState,
+ ) -> Vec> {
+ let (all_generated_events, _) = collect_events_and_l1_system_logs_after_timestamp(
+ state,
+ &self.l1_batch_env,
+ Timestamp(0),
+ );
+
+ extract_long_l2_to_l1_messages(&all_generated_events)
+ }
+
+ // Packs part of L1 Messenger total pubdata that corresponds to
+ // Bytecodes needed to be published on L1
+ fn get_total_published_bytecodes(
+ &self,
+ state: &ZkSyncVmState,
+ ) -> Vec> {
+ let (all_generated_events, _) = collect_events_and_l1_system_logs_after_timestamp(
+ state,
+ &self.l1_batch_env,
+ Timestamp(0),
+ );
+
+ let bytecode_publication_requests =
+ extract_bytecode_publication_requests_from_l1_messenger(&all_generated_events);
+
+ bytecode_publication_requests
+ .iter()
+ .map(|bytecode_publication_request| {
+ state
+ .decommittment_processor
+ .known_bytecodes
+ .inner()
+ .get(&h256_to_u256(bytecode_publication_request.bytecode_hash))
+ .unwrap()
+ .iter()
+ .flat_map(u256_to_bytes_be)
+ .collect()
+ })
+ .collect()
+ }
+
+ // Packs part of L1Messenger total pubdata that corresponds to
+ // State diffs needed to be published on L1
+ fn get_state_diffs(
+ storage: &StorageOracle,
+ ) -> Vec {
+ sort_storage_access_queries(
+ storage
+ .storage_log_queries_after_timestamp(Timestamp(0))
+ .iter()
+ .map(|log| &log.log_query),
+ )
+ .1
+ .into_iter()
+ .filter(|log| log.rw_flag)
+ .filter(|log| log.read_value != log.written_value)
+ .filter(|log| log.address != L1_MESSENGER_ADDRESS)
+ .map(|log| StateDiffRecord {
+ address: log.address,
+ key: log.key,
+ derived_key: log.derive_final_address(),
+ enumeration_index: storage
+ .storage
+ .get_ptr()
+ .borrow_mut()
+ .get_enumeration_index(&StorageKey::new(
+ AccountTreeId::new(log.address),
+ u256_to_h256(log.key),
+ ))
+ .unwrap_or_default(),
+ initial_value: log.read_value,
+ final_value: log.written_value,
+ })
+ .collect()
+ }
+
+ fn build_pubdata_input(
+ &self,
+ state: &ZkSyncVmState,
+ ) -> PubdataInput {
+ PubdataInput {
+ user_logs: self.get_total_user_logs(state),
+ l2_to_l1_messages: self.get_total_l1_messenger_messages(state),
+ published_bytecodes: self.get_total_published_bytecodes(state),
+ state_diffs: Self::get_state_diffs(&state.storage),
+ }
+ }
+}
+
+impl DynTracer for PubdataTracer {
+ fn before_execution(
+ &mut self,
+ state: VmLocalStateData<'_>,
+ data: BeforeExecutionData,
+ _memory: &SimpleMemory,
+ _storage: StoragePtr,
+ ) {
+ let hook = VmHook::from_opcode_memory(&state, &data);
+ if let VmHook::PubdataRequested = hook {
+ self.pubdata_info_requested = true;
+ }
+ }
+}
+
+impl VmTracer for PubdataTracer {
+ fn finish_cycle(
+ &mut self,
+ state: &mut ZkSyncVmState,
+ bootloader_state: &mut BootloaderState,
+ ) -> TracerExecutionStatus {
+ if !matches!(self.execution_mode, VmExecutionMode::Batch) {
+ // We do not provide the pubdata when executing the block tip or a single transaction
+ if self.pubdata_info_requested {
+ return TracerExecutionStatus::Stop(TracerExecutionStopReason::Finish);
+ } else {
+ return TracerExecutionStatus::Continue;
+ }
+ }
+
+ if self.pubdata_info_requested {
+ let pubdata_input = self.build_pubdata_input(state);
+
+ // Save the pubdata for the future initial bootloader memory building
+ bootloader_state.set_pubdata_input(pubdata_input.clone());
+
+ // Apply the pubdata to the current memory
+ let mut memory_to_apply = vec![];
+ apply_pubdata_to_memory(&mut memory_to_apply, pubdata_input);
+ state.memory.populate_page(
+ BOOTLOADER_HEAP_PAGE as usize,
+ memory_to_apply,
+ Timestamp(state.local_state.timestamp),
+ );
+
+ self.pubdata_info_requested = false;
+ }
+
+ TracerExecutionStatus::Continue
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/refunds.rs b/core/lib/multivm/src/versions/vm_latest/tracers/refunds.rs
index 119551c86f1..23eca72e6ac 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/refunds.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/refunds.rs
@@ -1,7 +1,7 @@
use vise::{Buckets, EncodeLabelSet, EncodeLabelValue, Family, Histogram, Metrics};
use crate::interface::{L1BatchEnv, Refunds};
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
aux_structures::Timestamp,
tracing::{BeforeExecutionData, VmLocalStateData},
vm_state::VmLocalState,
@@ -326,7 +326,7 @@ pub(crate) fn pubdata_published(
})
.filter(|log| log.sender != SYSTEM_CONTEXT_ADDRESS)
.count() as u32)
- * zk_evm_1_3_3::zkevm_opcode_defs::system_params::L1_MESSAGE_PUBDATA_BYTES;
+ * zk_evm_1_4_0::zkevm_opcode_defs::system_params::L1_MESSAGE_PUBDATA_BYTES;
let l2_l1_long_messages_bytes: u32 = extract_long_l2_to_l1_messages(&events)
.iter()
.map(|event| event.len() as u32)
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/result_tracer.rs b/core/lib/multivm/src/versions/vm_latest/tracers/result_tracer.rs
index b3cbb70333a..9e3373d0d83 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/result_tracer.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/result_tracer.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
tracing::{AfterDecodingData, BeforeExecutionData, VmLocalStateData},
vm_state::{ErrorFlags, VmLocalState},
zkevm_opcode_defs::FatPointer,
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/traits.rs b/core/lib/multivm/src/versions/vm_latest/tracers/traits.rs
index eeb9089a885..8ee9e6c06d8 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/traits.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/traits.rs
@@ -1,5 +1,5 @@
use crate::interface::Halt;
-use zk_evm_1_3_3::tracing::{
+use zk_evm_1_4_0::tracing::{
AfterDecodingData, AfterExecutionData, BeforeExecutionData, VmLocalStateData,
};
use zksync_state::{StoragePtr, WriteStorage};
@@ -32,7 +32,7 @@ pub trait VmTracer: DynTracer {
}
}
-/// Version of zk_evm_1_3_3::Tracer suitable for dynamic dispatch.
+/// Version of zk_evm_1_4_0::Tracer suitable for dynamic dispatch.
pub trait DynTracer {
fn before_decoding(&mut self, _state: VmLocalStateData<'_>, _memory: &SimpleMemory) {}
fn after_decoding(
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/utils.rs b/core/lib/multivm/src/versions/vm_latest/tracers/utils.rs
index 12f2bb75873..b19268030d1 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/utils.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/utils.rs
@@ -1,6 +1,6 @@
-use zk_evm_1_3_3::aux_structures::MemoryPage;
-use zk_evm_1_3_3::zkevm_opcode_defs::{FarCallABI, FarCallForwardPageType};
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::aux_structures::MemoryPage;
+use zk_evm_1_4_0::zkevm_opcode_defs::{FarCallABI, FarCallForwardPageType};
+use zk_evm_1_4_0::{
tracing::{BeforeExecutionData, VmLocalStateData},
zkevm_opcode_defs::{FatPointer, LogOpcode, Opcode, UMAOpcode},
};
@@ -35,6 +35,8 @@ pub(crate) enum VmHook {
NotifyAboutRefund,
ExecutionResult,
FinalBatchInfo,
+ // Hook used to signal that the final pubdata for a batch is requested.
+ PubdataRequested,
}
impl VmHook {
@@ -73,6 +75,7 @@ impl VmHook {
9 => Self::NotifyAboutRefund,
10 => Self::ExecutionResult,
11 => Self::FinalBatchInfo,
+ 12 => Self::PubdataRequested,
_ => panic!("Unknown hook: {}", value.as_u32()),
}
}
diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/validation/mod.rs b/core/lib/multivm/src/versions/vm_latest/tracers/validation/mod.rs
index 38e5da19048..5b393b060c6 100644
--- a/core/lib/multivm/src/versions/vm_latest/tracers/validation/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/tracers/validation/mod.rs
@@ -6,7 +6,7 @@ use std::sync::Arc;
use std::{collections::HashSet, marker::PhantomData};
use once_cell::sync::OnceCell;
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
tracing::{BeforeExecutionData, VmLocalStateData},
zkevm_opcode_defs::{ContextOpcode, FarCallABI, LogOpcode, Opcode},
};
diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs
index 601b7b8bd01..c189de7266d 100644
--- a/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs
@@ -1,6 +1,7 @@
pub(crate) use snapshot::VmSnapshot;
pub(crate) use transaction_data::TransactionData;
pub(crate) use vm_state::new_vm_state;
+pub(crate) mod pubdata;
pub use vm_state::ZkSyncVmState;
mod snapshot;
mod transaction_data;
diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs
new file mode 100644
index 00000000000..e246bceeac5
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs
@@ -0,0 +1,133 @@
+use zksync_types::ethabi;
+use zksync_types::{
+ event::L1MessengerL2ToL1Log,
+ writes::{compress_state_diffs, StateDiffRecord},
+};
+
+/// Struct based on which the pubdata blob is formed
+#[derive(Debug, Clone, Default)]
+pub(crate) struct PubdataInput {
+ pub(crate) user_logs: Vec,
+ pub(crate) l2_to_l1_messages: Vec>,
+ pub(crate) published_bytecodes: Vec>,
+ pub(crate) state_diffs: Vec,
+}
+
+impl PubdataInput {
+ pub(crate) fn build_pubdata(self) -> Vec {
+ let mut l1_messenger_pubdata = vec![];
+
+ let PubdataInput {
+ user_logs,
+ l2_to_l1_messages,
+ published_bytecodes,
+ state_diffs,
+ } = self;
+
+ // Encoding user L2->L1 logs.
+ // Format: [(numberOfL2ToL1Logs as u32) || l2tol1logs[1] || ... || l2tol1logs[n]]
+ l1_messenger_pubdata.extend((user_logs.len() as u32).to_be_bytes());
+ for l2tol1log in user_logs {
+ l1_messenger_pubdata.extend(l2tol1log.packed_encoding());
+ }
+
+ // Encoding L2->L1 messages
+ // Format: [(numberOfMessages as u32) || (messages[1].len() as u32) || messages[1] || ... || (messages[n].len() as u32) || messages[n]]
+ l1_messenger_pubdata.extend((l2_to_l1_messages.len() as u32).to_be_bytes());
+ for message in l2_to_l1_messages {
+ l1_messenger_pubdata.extend((message.len() as u32).to_be_bytes());
+ l1_messenger_pubdata.extend(message);
+ }
+
+ // Encoding bytecodes
+ // Format: [(numberOfBytecodes as u32) || (bytecodes[1].len() as u32) || bytecodes[1] || ... || (bytecodes[n].len() as u32) || bytecodes[n]]
+ l1_messenger_pubdata.extend((published_bytecodes.len() as u32).to_be_bytes());
+ for bytecode in published_bytecodes {
+ l1_messenger_pubdata.extend((bytecode.len() as u32).to_be_bytes());
+ l1_messenger_pubdata.extend(bytecode);
+ }
+
+ // Encoding state diffs
+ // Format: [size of compressed state diffs u32 || compressed state diffs || (# state diffs: intial + repeated) as u32 || sorted state diffs by ]
+ let state_diffs_compressed = compress_state_diffs(state_diffs.clone());
+ l1_messenger_pubdata.extend(state_diffs_compressed);
+ l1_messenger_pubdata.extend((state_diffs.len() as u32).to_be_bytes());
+
+ for state_diff in state_diffs {
+ l1_messenger_pubdata.extend(state_diff.encode_padded());
+ }
+
+ // ABI-encoding the final pubdata
+ let l1_messenger_abi_encoded_pubdata =
+ ethabi::encode(&[ethabi::Token::Bytes(l1_messenger_pubdata)]);
+
+ assert!(
+ l1_messenger_abi_encoded_pubdata.len() % 32 == 0,
+ "abi encoded bytes array length should be divisible by 32"
+ );
+
+ // Need to skip first word as it represents array offset
+ // while bootloader expects only [len || data]
+ l1_messenger_abi_encoded_pubdata[32..].to_vec()
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use zksync_system_constants::{ACCOUNT_CODE_STORAGE_ADDRESS, BOOTLOADER_ADDRESS};
+ use zksync_utils::u256_to_h256;
+
+ use super::*;
+
+ #[test]
+ fn test_basic_pubdata_building() {
+ // Just using some constant addresses for tests
+ let addr1 = BOOTLOADER_ADDRESS;
+ let addr2 = ACCOUNT_CODE_STORAGE_ADDRESS;
+
+ let user_logs = vec![L1MessengerL2ToL1Log {
+ l2_shard_id: 0,
+ is_service: false,
+ tx_number_in_block: 0,
+ sender: addr1,
+ key: 1.into(),
+ value: 128.into(),
+ }];
+
+ let l2_to_l1_messages = vec![hex::decode("deadbeef").unwrap()];
+
+ let published_bytecodes = vec![hex::decode("aaaabbbb").unwrap()];
+
+ // For covering more cases, we have two state diffs:
+ // One with enumeration index present (and so it is a repeated write) and the one without it.
+ let state_diffs = vec![
+ StateDiffRecord {
+ address: addr2,
+ key: 155.into(),
+ derived_key: u256_to_h256(125.into()).0,
+ enumeration_index: 12,
+ initial_value: 11.into(),
+ final_value: 12.into(),
+ },
+ StateDiffRecord {
+ address: addr2,
+ key: 156.into(),
+ derived_key: u256_to_h256(126.into()).0,
+ enumeration_index: 0,
+ initial_value: 0.into(),
+ final_value: 14.into(),
+ },
+ ];
+
+ let input = PubdataInput {
+ user_logs,
+ l2_to_l1_messages,
+ published_bytecodes,
+ state_diffs,
+ };
+
+ let pubdata = input.build_pubdata();
+
+ assert_eq!(hex::encode(pubdata), "00000000000000000000000000000000000000000000000000000000000002c700000001000000000000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000100000004deadbeef0000000100000004aaaabbbb0100002a040001000000000000000000000000000000000000000000000000000000000000007e090e0000000c0901000000020000000000000000000000000000000000008002000000000000000000000000000000000000000000000000000000000000009b000000000000000000000000000000000000000000000000000000000000007d000000000000000c000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008002000000000000000000000000000000000000000000000000000000000000009c000000000000000000000000000000000000000000000000000000000000007e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/snapshot.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/snapshot.rs
index 7391be4e4d5..2a9368c37a3 100644
--- a/core/lib/multivm/src/versions/vm_latest/types/internals/snapshot.rs
+++ b/core/lib/multivm/src/versions/vm_latest/types/internals/snapshot.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::vm_state::VmLocalState;
+use zk_evm_1_4_0::vm_state::VmLocalState;
use crate::vm_latest::bootloader_state::BootloaderStateSnapshot;
diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs
index 3462948e010..0c519a324c0 100644
--- a/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs
+++ b/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs
@@ -1,4 +1,4 @@
-use zk_evm_1_3_3::{
+use zk_evm_1_4_0::{
aux_structures::MemoryPage,
aux_structures::Timestamp,
block_properties::BlockProperties,
@@ -11,7 +11,7 @@ use zk_evm_1_3_3::{
};
use crate::interface::{L1BatchEnv, L2Block, SystemEnv};
-use zk_evm_1_3_3::zkevm_opcode_defs::{
+use zk_evm_1_4_0::zkevm_opcode_defs::{
BOOTLOADER_BASE_PAGE, BOOTLOADER_CODE_PAGE, STARTING_BASE_PAGE, STARTING_TIMESTAMP,
};
use zksync_state::{StoragePtr, WriteStorage};
diff --git a/core/lib/multivm/src/versions/vm_latest/utils/logs.rs b/core/lib/multivm/src/versions/vm_latest/utils/logs.rs
new file mode 100644
index 00000000000..a2b7f548684
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_latest/utils/logs.rs
@@ -0,0 +1,22 @@
+use zksync_state::WriteStorage;
+use zksync_types::{l2_to_l1_log::L2ToL1Log, Timestamp, VmEvent};
+
+use crate::{
+ interface::L1BatchEnv, vm_latest::old_vm::events::merge_events,
+ vm_latest::old_vm::history_recorder::HistoryMode, vm_latest::types::internals::ZkSyncVmState,
+};
+
+pub(crate) fn collect_events_and_l1_system_logs_after_timestamp(
+ vm_state: &ZkSyncVmState,
+ batch_env: &L1BatchEnv,
+ from_timestamp: Timestamp,
+) -> (Vec, Vec) {
+ let (raw_events, l1_messages) = vm_state
+ .event_sink
+ .get_events_and_l2_l1_logs_after_timestamp(from_timestamp);
+ let events = merge_events(raw_events)
+ .into_iter()
+ .map(|e| e.into_vm_event(batch_env.number))
+ .collect();
+ (events, l1_messages.into_iter().map(Into::into).collect())
+}
diff --git a/core/lib/multivm/src/versions/vm_latest/utils/mod.rs b/core/lib/multivm/src/versions/vm_latest/utils/mod.rs
index 15ffa92b549..0fb803de5d4 100644
--- a/core/lib/multivm/src/versions/vm_latest/utils/mod.rs
+++ b/core/lib/multivm/src/versions/vm_latest/utils/mod.rs
@@ -1,5 +1,6 @@
/// Utility functions for the VM.
pub mod fee;
pub mod l2_blocks;
+pub(crate) mod logs;
pub mod overhead;
pub mod transaction_encoding;
diff --git a/core/lib/multivm/src/versions/vm_latest/utils/overhead.rs b/core/lib/multivm/src/versions/vm_latest/utils/overhead.rs
index 58506cb1d52..2541c7d7037 100644
--- a/core/lib/multivm/src/versions/vm_latest/utils/overhead.rs
+++ b/core/lib/multivm/src/versions/vm_latest/utils/overhead.rs
@@ -1,7 +1,7 @@
use crate::vm_latest::constants::{
BLOCK_OVERHEAD_GAS, BLOCK_OVERHEAD_PUBDATA, BOOTLOADER_TX_ENCODING_SPACE,
};
-use zk_evm_1_3_3::zkevm_opcode_defs::system_params::MAX_TX_ERGS_LIMIT;
+use zk_evm_1_4_0::zkevm_opcode_defs::system_params::MAX_TX_ERGS_LIMIT;
use zksync_system_constants::{MAX_L2_TX_GAS_LIMIT, MAX_TXS_IN_BLOCK};
use zksync_types::l1::is_l1_tx_type;
use zksync_types::U256;
diff --git a/core/lib/multivm/src/versions/vm_latest/vm.rs b/core/lib/multivm/src/versions/vm_latest/vm.rs
index 770f45c0c12..437815a8f82 100644
--- a/core/lib/multivm/src/versions/vm_latest/vm.rs
+++ b/core/lib/multivm/src/versions/vm_latest/vm.rs
@@ -1,5 +1,6 @@
use zksync_state::{StoragePtr, WriteStorage};
-use zksync_types::Transaction;
+use zksync_types::l2_to_l1_log::{SystemL2ToL1Log, UserL2ToL1Log};
+use zksync_types::{event::extract_l2tol1logs_from_l1_messenger, Transaction};
use zksync_utils::bytecode::CompressedBytecodeInfo;
use crate::vm_latest::old_vm::events::merge_events;
@@ -82,12 +83,17 @@ impl Vm {
/// This method should be used only after the batch execution.
/// Otherwise it can panic.
pub fn get_current_execution_state(&self) -> CurrentExecutionState {
- let (_full_history, raw_events, l1_messages) = self.state.event_sink.flatten();
- let events = merge_events(raw_events)
+ let (deduplicated_events_logs, raw_events, l1_messages) = self.state.event_sink.flatten();
+ let events: Vec<_> = merge_events(raw_events)
.into_iter()
.map(|e| e.into_vm_event(self.batch_env.number))
.collect();
- let l2_to_l1_logs = l1_messages.into_iter().map(|log| log.into()).collect();
+
+ let user_l2_to_l1_logs = extract_l2tol1logs_from_l1_messenger(&events);
+ let system_logs = l1_messages
+ .into_iter()
+ .map(|log| SystemL2ToL1Log(log.into()))
+ .collect();
let total_log_queries = self.state.event_sink.get_log_queries()
+ self
.state
@@ -100,9 +106,14 @@ impl Vm {
events,
storage_log_queries: self.state.storage.get_final_log_queries(),
used_contract_hashes: self.get_used_contracts(),
- l2_to_l1_logs,
+ user_l2_to_l1_logs: user_l2_to_l1_logs
+ .into_iter()
+ .map(|log| UserL2ToL1Log(log.into()))
+ .collect(),
+ system_logs,
total_log_queries,
cycles_used: self.state.local_state.monotonic_cycle_counter,
+ deduplicated_events_logs,
storage_refunds: self.state.storage.returned_refunds.inner().clone(),
}
}
diff --git a/core/lib/multivm/src/versions/vm_m5/vm.rs b/core/lib/multivm/src/versions/vm_m5/vm.rs
index 53458856c15..f7b1ed31de6 100644
--- a/core/lib/multivm/src/versions/vm_m5/vm.rs
+++ b/core/lib/multivm/src/versions/vm_m5/vm.rs
@@ -10,11 +10,12 @@ use zk_evm_1_3_1::zkevm_opcode_defs::decoding::{
use zk_evm_1_3_1::zkevm_opcode_defs::definitions::RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER;
use zksync_system_constants::MAX_TXS_IN_BLOCK;
-use zksync_types::l2_to_l1_log::L2ToL1Log;
-use zksync_types::tx::tx_execution_info::{TxExecutionStatus, VmExecutionLogs};
+use zksync_types::l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log};
+use zksync_types::tx::tx_execution_info::TxExecutionStatus;
use zksync_types::vm_trace::VmExecutionTrace;
use zksync_types::{L1BatchNumber, StorageLogQuery, VmEvent, U256};
+use crate::interface::types::outputs::VmExecutionLogs;
use crate::vm_m5::bootloader_state::BootloaderState;
use crate::vm_m5::errors::{TxRevertReason, VmRevertReason, VmRevertReasonParsingResult};
use crate::vm_m5::event_sink::InMemoryEventSink;
@@ -499,7 +500,8 @@ impl VmInstance {
VmExecutionLogs {
storage_logs,
events,
- l2_to_l1_logs,
+ user_l2_to_l1_logs: l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(),
+ system_l2_to_l1_logs: vec![],
total_log_queries_count: storage_logs_count
+ log_queries.len()
+ precompile_calls_count,
diff --git a/core/lib/multivm/src/versions/vm_m6/vm.rs b/core/lib/multivm/src/versions/vm_m6/vm.rs
index d54c2d2f25a..7b68ce16b59 100644
--- a/core/lib/multivm/src/versions/vm_m6/vm.rs
+++ b/core/lib/multivm/src/versions/vm_m6/vm.rs
@@ -9,11 +9,12 @@ use zk_evm_1_3_1::zkevm_opcode_defs::decoding::{
};
use zk_evm_1_3_1::zkevm_opcode_defs::definitions::RET_IMPLICIT_RETURNDATA_PARAMS_REGISTER;
use zksync_system_constants::MAX_TXS_IN_BLOCK;
-use zksync_types::l2_to_l1_log::L2ToL1Log;
-use zksync_types::tx::tx_execution_info::{TxExecutionStatus, VmExecutionLogs};
+use zksync_types::l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log};
+use zksync_types::tx::tx_execution_info::TxExecutionStatus;
use zksync_types::vm_trace::{Call, VmExecutionTrace, VmTrace};
use zksync_types::{L1BatchNumber, StorageLogQuery, VmEvent, U256};
+use crate::interface::types::outputs::VmExecutionLogs;
use crate::vm_m6::bootloader_state::BootloaderState;
use crate::vm_m6::errors::{TxRevertReason, VmRevertReason, VmRevertReasonParsingResult};
use crate::vm_m6::event_sink::InMemoryEventSink;
@@ -446,7 +447,8 @@ impl VmInstance {
VmExecutionLogs {
storage_logs,
events,
- l2_to_l1_logs,
+ user_l2_to_l1_logs: l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(),
+ system_l2_to_l1_logs: vec![],
total_log_queries_count: storage_logs_count
+ log_queries.len()
+ precompile_calls_count,
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/README.md b/core/lib/multivm/src/versions/vm_refunds_enhancement/README.md
new file mode 100644
index 00000000000..d515df0dfc6
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/README.md
@@ -0,0 +1,44 @@
+# VM Crate
+
+This crate contains code that interacts with the VM (Virtual Machine). The VM itself is in a separate repository
+[era-zk_evm][zk_evm_repo_ext].
+
+## VM Dependencies
+
+The VM relies on several subcomponents or traits, such as Memory and Storage. These traits are defined in the `zk_evm`
+repository, while their implementations can be found in this crate, such as the storage implementation in
+`oracles/storage.rs` and the Memory implementation in `memory.rs`.
+
+Many of these implementations also support easy rollbacks and history, which is useful when creating a block with
+multiple transactions and needing to return the VM to a previous state if a transaction doesn't fit.
+
+## Running the VM
+
+To interact with the VM, you must initialize it with `L1BatchEnv`, which represents the initial parameters of the batch,
+`SystemEnv`, that represents the system parameters, and a reference to the Storage. To execute a transaction, you have
+to push the transaction into the bootloader memory and call the `execute_next_transaction` method.
+
+### Tracers
+
+The VM implementation allows for the addition of `Tracers`, which are activated before and after each instruction. This
+provides a more in-depth look into the VM, collecting detailed debugging information and logs. More details can be found
+in the `tracer/` directory.
+
+This VM also supports custom tracers. You can call the `inspect_next_transaction` method with a custom tracer and
+receive the result of the execution.
+
+### Bootloader
+
+In the context of zkEVM, we usually think about transactions. However, from the VM's perspective, it runs a single
+program called the bootloader, which internally processes multiple transactions.
+
+### Rollbacks
+
+The `VMInstance` in `vm.rs` allows for easy rollbacks. You can save the current state at any moment by calling
+`make_snapshot()` and return to that state using `rollback_to_the_latest_snapshot()`.
+
+This rollback affects all subcomponents, such as memory, storage, and events, and is mainly used if a transaction
+doesn't fit in a block.
+
+[zk_evm_repo]: https://github.com/matter-labs/zk_evm 'internal zk EVM repo'
+[zk_evm_repo_ext]: https://github.com/matter-labs/era-zk_evm 'external zk EVM repo'
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/l2_block.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/l2_block.rs
new file mode 100644
index 00000000000..56b5b1b6b39
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/l2_block.rs
@@ -0,0 +1,83 @@
+use std::cmp::Ordering;
+use zksync_types::{MiniblockNumber, H256};
+use zksync_utils::concat_and_hash;
+
+use crate::interface::{L2Block, L2BlockEnv};
+use crate::vm_refunds_enhancement::bootloader_state::snapshot::L2BlockSnapshot;
+use crate::vm_refunds_enhancement::bootloader_state::tx::BootloaderTx;
+use crate::vm_refunds_enhancement::utils::l2_blocks::l2_block_hash;
+
+const EMPTY_TXS_ROLLING_HASH: H256 = H256::zero();
+
+#[derive(Debug, Clone)]
+pub(crate) struct BootloaderL2Block {
+ pub(crate) number: u32,
+ pub(crate) timestamp: u64,
+ pub(crate) txs_rolling_hash: H256, // The rolling hash of all the transactions in the miniblock
+ pub(crate) prev_block_hash: H256,
+ // Number of the first l2 block tx in l1 batch
+ pub(crate) first_tx_index: usize,
+ pub(crate) max_virtual_blocks_to_create: u32,
+ pub(super) txs: Vec,
+}
+
+impl BootloaderL2Block {
+ pub(crate) fn new(l2_block: L2BlockEnv, first_tx_place: usize) -> Self {
+ Self {
+ number: l2_block.number,
+ timestamp: l2_block.timestamp,
+ txs_rolling_hash: EMPTY_TXS_ROLLING_HASH,
+ prev_block_hash: l2_block.prev_block_hash,
+ first_tx_index: first_tx_place,
+ max_virtual_blocks_to_create: l2_block.max_virtual_blocks_to_create,
+ txs: vec![],
+ }
+ }
+
+ pub(super) fn push_tx(&mut self, tx: BootloaderTx) {
+ self.update_rolling_hash(tx.hash);
+ self.txs.push(tx)
+ }
+
+ pub(crate) fn get_hash(&self) -> H256 {
+ l2_block_hash(
+ MiniblockNumber(self.number),
+ self.timestamp,
+ self.prev_block_hash,
+ self.txs_rolling_hash,
+ )
+ }
+
+ fn update_rolling_hash(&mut self, tx_hash: H256) {
+ self.txs_rolling_hash = concat_and_hash(self.txs_rolling_hash, tx_hash)
+ }
+
+ pub(crate) fn interim_version(&self) -> BootloaderL2Block {
+ let mut interim = self.clone();
+ interim.max_virtual_blocks_to_create = 0;
+ interim
+ }
+
+ pub(crate) fn make_snapshot(&self) -> L2BlockSnapshot {
+ L2BlockSnapshot {
+ txs_rolling_hash: self.txs_rolling_hash,
+ txs_len: self.txs.len(),
+ }
+ }
+
+ pub(crate) fn apply_snapshot(&mut self, snapshot: L2BlockSnapshot) {
+ self.txs_rolling_hash = snapshot.txs_rolling_hash;
+ match self.txs.len().cmp(&snapshot.txs_len) {
+ Ordering::Greater => self.txs.truncate(snapshot.txs_len),
+ Ordering::Less => panic!("Applying snapshot from future is not supported"),
+ Ordering::Equal => {}
+ }
+ }
+ pub(crate) fn l2_block(&self) -> L2Block {
+ L2Block {
+ number: self.number,
+ timestamp: self.timestamp,
+ hash: self.get_hash(),
+ }
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/mod.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/mod.rs
new file mode 100644
index 00000000000..73830de2759
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/mod.rs
@@ -0,0 +1,8 @@
+mod l2_block;
+mod snapshot;
+mod state;
+mod tx;
+
+pub(crate) mod utils;
+pub(crate) use snapshot::BootloaderStateSnapshot;
+pub use state::BootloaderState;
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/snapshot.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/snapshot.rs
new file mode 100644
index 00000000000..e417a3b9ee6
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/snapshot.rs
@@ -0,0 +1,23 @@
+use zksync_types::H256;
+
+#[derive(Debug, Clone)]
+pub(crate) struct BootloaderStateSnapshot {
+ /// ID of the next transaction to be executed.
+ pub(crate) tx_to_execute: usize,
+ /// Stored l2 blocks in bootloader memory
+ pub(crate) l2_blocks_len: usize,
+ /// Snapshot of the last l2 block. Only this block could be changed during the rollback
+ pub(crate) last_l2_block: L2BlockSnapshot,
+ /// The number of 32-byte words spent on the already included compressed bytecodes.
+ pub(crate) compressed_bytecodes_encoding: usize,
+ /// Current offset of the free space in the bootloader memory.
+ pub(crate) free_tx_offset: usize,
+}
+
+#[derive(Debug, Clone)]
+pub(crate) struct L2BlockSnapshot {
+ /// The rolling hash of all the transactions in the miniblock
+ pub(crate) txs_rolling_hash: H256,
+ /// The number of transactions in the last l2 block
+ pub(crate) txs_len: usize,
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/state.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/state.rs
new file mode 100644
index 00000000000..4c8d48bc1a7
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/state.rs
@@ -0,0 +1,253 @@
+use crate::vm_refunds_enhancement::bootloader_state::l2_block::BootloaderL2Block;
+use crate::vm_refunds_enhancement::bootloader_state::snapshot::BootloaderStateSnapshot;
+use crate::vm_refunds_enhancement::bootloader_state::utils::{apply_l2_block, apply_tx_to_memory};
+use std::cmp::Ordering;
+use zksync_types::{L2ChainId, U256};
+use zksync_utils::bytecode::CompressedBytecodeInfo;
+
+use crate::interface::{BootloaderMemory, L2BlockEnv, TxExecutionMode};
+use crate::vm_refunds_enhancement::{
+ constants::TX_DESCRIPTION_OFFSET, types::internals::TransactionData,
+ utils::l2_blocks::assert_next_block,
+};
+
+use super::tx::BootloaderTx;
+/// Intermediate bootloader-related VM state.
+///
+/// Required to process transactions one by one (since we intercept the VM execution to execute
+/// transactions and add new ones to the memory on the fly).
+/// Keeps tracking everything related to the bootloader memory and can restore the whole memory.
+///
+///
+/// Serves two purposes:
+/// - Tracks where next tx should be pushed to in the bootloader memory.
+/// - Tracks which transaction should be executed next.
+#[derive(Debug, Clone)]
+pub struct BootloaderState {
+ /// ID of the next transaction to be executed.
+ /// See the structure doc-comment for a better explanation of purpose.
+ tx_to_execute: usize,
+ /// Stored txs in bootloader memory
+ l2_blocks: Vec,
+ /// The number of 32-byte words spent on the already included compressed bytecodes.
+ compressed_bytecodes_encoding: usize,
+ /// Initial memory of bootloader
+ initial_memory: BootloaderMemory,
+ /// Mode of txs for execution, it can be changed once per vm lunch
+ execution_mode: TxExecutionMode,
+ /// Current offset of the free space in the bootloader memory.
+ free_tx_offset: usize,
+}
+
+impl BootloaderState {
+ pub(crate) fn new(
+ execution_mode: TxExecutionMode,
+ initial_memory: BootloaderMemory,
+ first_l2_block: L2BlockEnv,
+ ) -> Self {
+ let l2_block = BootloaderL2Block::new(first_l2_block, 0);
+ Self {
+ tx_to_execute: 0,
+ compressed_bytecodes_encoding: 0,
+ l2_blocks: vec![l2_block],
+ initial_memory,
+ execution_mode,
+ free_tx_offset: 0,
+ }
+ }
+
+ pub(crate) fn set_refund_for_current_tx(&mut self, refund: u32) {
+ let current_tx = self.current_tx();
+ // We can't set the refund for the latest tx or using the latest l2_block for fining tx
+ // Because we can fill the whole batch first and then execute txs one by one
+ let tx = self.find_tx_mut(current_tx);
+ tx.refund = refund;
+ }
+
+ pub(crate) fn start_new_l2_block(&mut self, l2_block: L2BlockEnv) {
+ let last_block = self.last_l2_block();
+ assert!(
+ !last_block.txs.is_empty(),
+ "Can not create new miniblocks on top of empty ones"
+ );
+ assert_next_block(&last_block.l2_block(), &l2_block);
+ self.push_l2_block(l2_block);
+ }
+
+ /// This method bypass sanity checks and should be used carefully.
+ pub(crate) fn push_l2_block(&mut self, l2_block: L2BlockEnv) {
+ self.l2_blocks
+ .push(BootloaderL2Block::new(l2_block, self.free_tx_index()))
+ }
+
+ pub(crate) fn push_tx(
+ &mut self,
+ tx: TransactionData,
+ predefined_overhead: u32,
+ predefined_refund: u32,
+ compressed_bytecodes: Vec,
+ trusted_ergs_limit: U256,
+ chain_id: L2ChainId,
+ ) -> BootloaderMemory {
+ let tx_offset = self.free_tx_offset();
+ let bootloader_tx = BootloaderTx::new(
+ tx,
+ predefined_refund,
+ predefined_overhead,
+ trusted_ergs_limit,
+ compressed_bytecodes,
+ tx_offset,
+ chain_id,
+ );
+
+ let mut memory = vec![];
+ let compressed_bytecode_size = apply_tx_to_memory(
+ &mut memory,
+ &bootloader_tx,
+ self.last_l2_block(),
+ self.free_tx_index(),
+ self.free_tx_offset(),
+ self.compressed_bytecodes_encoding,
+ self.execution_mode,
+ self.last_l2_block().txs.is_empty(),
+ );
+ self.compressed_bytecodes_encoding += compressed_bytecode_size;
+ self.free_tx_offset = tx_offset + bootloader_tx.encoded_len();
+ self.last_mut_l2_block().push_tx(bootloader_tx);
+ memory
+ }
+
+ pub(crate) fn last_l2_block(&self) -> &BootloaderL2Block {
+ self.l2_blocks.last().unwrap()
+ }
+
+ fn last_mut_l2_block(&mut self) -> &mut BootloaderL2Block {
+ self.l2_blocks.last_mut().unwrap()
+ }
+
+ /// Apply all bootloader transaction to the initial memory
+ pub(crate) fn bootloader_memory(&self) -> BootloaderMemory {
+ let mut initial_memory = self.initial_memory.clone();
+ let mut offset = 0;
+ let mut compressed_bytecodes_offset = 0;
+ let mut tx_index = 0;
+ for l2_block in &self.l2_blocks {
+ for (num, tx) in l2_block.txs.iter().enumerate() {
+ let compressed_bytecodes_size = apply_tx_to_memory(
+ &mut initial_memory,
+ tx,
+ l2_block,
+ tx_index,
+ offset,
+ compressed_bytecodes_offset,
+ self.execution_mode,
+ num == 0,
+ );
+ offset += tx.encoded_len();
+ compressed_bytecodes_offset += compressed_bytecodes_size;
+ tx_index += 1;
+ }
+ if l2_block.txs.is_empty() {
+ apply_l2_block(&mut initial_memory, l2_block, tx_index)
+ }
+ }
+ initial_memory
+ }
+
+ fn free_tx_offset(&self) -> usize {
+ self.free_tx_offset
+ }
+
+ pub(crate) fn free_tx_index(&self) -> usize {
+ let l2_block = self.last_l2_block();
+ l2_block.first_tx_index + l2_block.txs.len()
+ }
+
+ pub(crate) fn get_last_tx_compressed_bytecodes(&self) -> Vec {
+ if let Some(tx) = self.last_l2_block().txs.last() {
+ tx.compressed_bytecodes.clone()
+ } else {
+ vec![]
+ }
+ }
+
+ /// Returns the id of current tx
+ pub(crate) fn current_tx(&self) -> usize {
+ self.tx_to_execute
+ .checked_sub(1)
+ .expect("There are no current tx to execute")
+ }
+
+ /// Returns the ID of the next transaction to be executed and increments the local transaction counter.
+ pub(crate) fn move_tx_to_execute_pointer(&mut self) -> usize {
+ assert!(
+ self.tx_to_execute < self.free_tx_index(),
+ "Attempt to execute tx that was not pushed to memory. Tx ID: {}, txs in bootloader: {}",
+ self.tx_to_execute,
+ self.free_tx_index()
+ );
+
+ let old = self.tx_to_execute;
+ self.tx_to_execute += 1;
+ old
+ }
+
+ /// Get offset of tx description
+ pub(crate) fn get_tx_description_offset(&self, tx_index: usize) -> usize {
+ TX_DESCRIPTION_OFFSET + self.find_tx(tx_index).offset
+ }
+
+ pub(crate) fn insert_fictive_l2_block(&mut self) -> &BootloaderL2Block {
+ let block = self.last_l2_block();
+ if !block.txs.is_empty() {
+ self.start_new_l2_block(L2BlockEnv {
+ timestamp: block.timestamp + 1,
+ number: block.number + 1,
+ prev_block_hash: block.get_hash(),
+ max_virtual_blocks_to_create: 1,
+ });
+ }
+ self.last_l2_block()
+ }
+
+ fn find_tx(&self, tx_index: usize) -> &BootloaderTx {
+ for block in self.l2_blocks.iter().rev() {
+ if tx_index >= block.first_tx_index {
+ return &block.txs[tx_index - block.first_tx_index];
+ }
+ }
+ panic!("The tx with this index must exist")
+ }
+
+ fn find_tx_mut(&mut self, tx_index: usize) -> &mut BootloaderTx {
+ for block in self.l2_blocks.iter_mut().rev() {
+ if tx_index >= block.first_tx_index {
+ return &mut block.txs[tx_index - block.first_tx_index];
+ }
+ }
+ panic!("The tx with this index must exist")
+ }
+
+ pub(crate) fn get_snapshot(&self) -> BootloaderStateSnapshot {
+ BootloaderStateSnapshot {
+ tx_to_execute: self.tx_to_execute,
+ l2_blocks_len: self.l2_blocks.len(),
+ last_l2_block: self.last_l2_block().make_snapshot(),
+ compressed_bytecodes_encoding: self.compressed_bytecodes_encoding,
+ free_tx_offset: self.free_tx_offset,
+ }
+ }
+
+ pub(crate) fn apply_snapshot(&mut self, snapshot: BootloaderStateSnapshot) {
+ self.tx_to_execute = snapshot.tx_to_execute;
+ self.compressed_bytecodes_encoding = snapshot.compressed_bytecodes_encoding;
+ self.free_tx_offset = snapshot.free_tx_offset;
+ match self.l2_blocks.len().cmp(&snapshot.l2_blocks_len) {
+ Ordering::Greater => self.l2_blocks.truncate(snapshot.l2_blocks_len),
+ Ordering::Less => panic!("Applying snapshot from future is not supported"),
+ Ordering::Equal => {}
+ }
+ self.last_mut_l2_block()
+ .apply_snapshot(snapshot.last_l2_block);
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/tx.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/tx.rs
new file mode 100644
index 00000000000..c1551dcf6cd
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/tx.rs
@@ -0,0 +1,48 @@
+use crate::vm_refunds_enhancement::types::internals::TransactionData;
+use zksync_types::{L2ChainId, H256, U256};
+use zksync_utils::bytecode::CompressedBytecodeInfo;
+
+/// Information about tx necessary for execution in bootloader.
+#[derive(Debug, Clone)]
+pub(super) struct BootloaderTx {
+ pub(super) hash: H256,
+ /// Encoded transaction
+ pub(super) encoded: Vec,
+ /// Compressed bytecodes, which has been published during this transaction
+ pub(super) compressed_bytecodes: Vec,
+ /// Refunds for this transaction
+ pub(super) refund: u32,
+ /// Gas overhead
+ pub(super) gas_overhead: u32,
+ /// Gas Limit for this transaction. It can be different from the gaslimit inside the transaction
+ pub(super) trusted_gas_limit: U256,
+ /// Offset of the tx in bootloader memory
+ pub(super) offset: usize,
+}
+
+impl BootloaderTx {
+ pub(super) fn new(
+ tx: TransactionData,
+ predefined_refund: u32,
+ predefined_overhead: u32,
+ trusted_gas_limit: U256,
+ compressed_bytecodes: Vec,
+ offset: usize,
+ chain_id: L2ChainId,
+ ) -> Self {
+ let hash = tx.tx_hash(chain_id);
+ Self {
+ hash,
+ encoded: tx.into_tokens(),
+ compressed_bytecodes,
+ refund: predefined_refund,
+ gas_overhead: predefined_overhead,
+ trusted_gas_limit,
+ offset,
+ }
+ }
+
+ pub(super) fn encoded_len(&self) -> usize {
+ self.encoded.len()
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/utils.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/utils.rs
new file mode 100644
index 00000000000..dbb3fa0dff2
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/bootloader_state/utils.rs
@@ -0,0 +1,140 @@
+use zksync_types::U256;
+use zksync_utils::bytecode::CompressedBytecodeInfo;
+use zksync_utils::{bytes_to_be_words, h256_to_u256};
+
+use crate::interface::{BootloaderMemory, TxExecutionMode};
+use crate::vm_refunds_enhancement::bootloader_state::l2_block::BootloaderL2Block;
+use crate::vm_refunds_enhancement::constants::{
+ BOOTLOADER_TX_DESCRIPTION_OFFSET, BOOTLOADER_TX_DESCRIPTION_SIZE, COMPRESSED_BYTECODES_OFFSET,
+ OPERATOR_REFUNDS_OFFSET, TX_DESCRIPTION_OFFSET, TX_OPERATOR_L2_BLOCK_INFO_OFFSET,
+ TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO, TX_OVERHEAD_OFFSET, TX_TRUSTED_GAS_LIMIT_OFFSET,
+};
+
+use super::tx::BootloaderTx;
+
+pub(super) fn get_memory_for_compressed_bytecodes(
+ compressed_bytecodes: &[CompressedBytecodeInfo],
+) -> Vec {
+ let memory_addition: Vec<_> = compressed_bytecodes
+ .iter()
+ .flat_map(|x| x.encode_call())
+ .collect();
+
+ bytes_to_be_words(memory_addition)
+}
+
+#[allow(clippy::too_many_arguments)]
+pub(super) fn apply_tx_to_memory(
+ memory: &mut BootloaderMemory,
+ bootloader_tx: &BootloaderTx,
+ bootloader_l2_block: &BootloaderL2Block,
+ tx_index: usize,
+ tx_offset: usize,
+ compressed_bytecodes_size: usize,
+ execution_mode: TxExecutionMode,
+ start_new_l2_block: bool,
+) -> usize {
+ let bootloader_description_offset =
+ BOOTLOADER_TX_DESCRIPTION_OFFSET + BOOTLOADER_TX_DESCRIPTION_SIZE * tx_index;
+ let tx_description_offset = TX_DESCRIPTION_OFFSET + tx_offset;
+
+ memory.push((
+ bootloader_description_offset,
+ assemble_tx_meta(execution_mode, true),
+ ));
+
+ memory.push((
+ bootloader_description_offset + 1,
+ U256::from_big_endian(&(32 * tx_description_offset).to_be_bytes()),
+ ));
+
+ let refund_offset = OPERATOR_REFUNDS_OFFSET + tx_index;
+ memory.push((refund_offset, bootloader_tx.refund.into()));
+
+ let overhead_offset = TX_OVERHEAD_OFFSET + tx_index;
+ memory.push((overhead_offset, bootloader_tx.gas_overhead.into()));
+
+ let trusted_gas_limit_offset = TX_TRUSTED_GAS_LIMIT_OFFSET + tx_index;
+ memory.push((trusted_gas_limit_offset, bootloader_tx.trusted_gas_limit));
+
+ memory.extend(
+ (tx_description_offset..tx_description_offset + bootloader_tx.encoded_len())
+ .zip(bootloader_tx.encoded.clone()),
+ );
+
+ let bootloader_l2_block = if start_new_l2_block {
+ bootloader_l2_block.clone()
+ } else {
+ bootloader_l2_block.interim_version()
+ };
+ apply_l2_block(memory, &bootloader_l2_block, tx_index);
+
+ // Note, +1 is moving for poitner
+ let compressed_bytecodes_offset = COMPRESSED_BYTECODES_OFFSET + 1 + compressed_bytecodes_size;
+
+ let encoded_compressed_bytecodes =
+ get_memory_for_compressed_bytecodes(&bootloader_tx.compressed_bytecodes);
+ let compressed_bytecodes_encoding = encoded_compressed_bytecodes.len();
+
+ memory.extend(
+ (compressed_bytecodes_offset
+ ..compressed_bytecodes_offset + encoded_compressed_bytecodes.len())
+ .zip(encoded_compressed_bytecodes),
+ );
+ compressed_bytecodes_encoding
+}
+
+pub(crate) fn apply_l2_block(
+ memory: &mut BootloaderMemory,
+ bootloader_l2_block: &BootloaderL2Block,
+ txs_index: usize,
+) {
+ // Since L2 block infos start from the TX_OPERATOR_L2_BLOCK_INFO_OFFSET and each
+ // L2 block info takes TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO slots, the position where the L2 block info
+ // for this transaction needs to be written is:
+
+ let block_position =
+ TX_OPERATOR_L2_BLOCK_INFO_OFFSET + txs_index * TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO;
+
+ memory.extend(vec![
+ (block_position, bootloader_l2_block.number.into()),
+ (block_position + 1, bootloader_l2_block.timestamp.into()),
+ (
+ block_position + 2,
+ h256_to_u256(bootloader_l2_block.prev_block_hash),
+ ),
+ (
+ block_position + 3,
+ bootloader_l2_block.max_virtual_blocks_to_create.into(),
+ ),
+ ])
+}
+
+/// Forms a word that contains meta information for the transaction execution.
+///
+/// # Current layout
+///
+/// - 0 byte (MSB): server-side tx execution mode
+/// In the server, we may want to execute different parts of the transaction in the different context
+/// For example, when checking validity, we don't want to actually execute transaction and have side effects.
+///
+/// Possible values:
+/// - 0x00: validate & execute (normal mode)
+/// - 0x02: execute but DO NOT validate
+///
+/// - 31 byte (LSB): whether to execute transaction or not (at all).
+pub(super) fn assemble_tx_meta(execution_mode: TxExecutionMode, execute_tx: bool) -> U256 {
+ let mut output = [0u8; 32];
+
+ // Set 0 byte (execution mode)
+ output[0] = match execution_mode {
+ TxExecutionMode::VerifyExecute => 0x00,
+ TxExecutionMode::EstimateFee { .. } => 0x00,
+ TxExecutionMode::EthCall { .. } => 0x02,
+ };
+
+ // Set 31 byte (marker for tx execution)
+ output[31] = u8::from(execute_tx);
+
+ U256::from_big_endian(&output)
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/constants.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/constants.rs
new file mode 100644
index 00000000000..ef3b09299fd
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/constants.rs
@@ -0,0 +1,112 @@
+use zk_evm_1_3_3::aux_structures::MemoryPage;
+
+use zksync_system_constants::{
+ L1_GAS_PER_PUBDATA_BYTE, MAX_L2_TX_GAS_LIMIT, MAX_NEW_FACTORY_DEPS, MAX_TXS_IN_BLOCK,
+ USED_BOOTLOADER_MEMORY_WORDS,
+};
+
+pub use zk_evm_1_3_3::zkevm_opcode_defs::system_params::{
+ ERGS_PER_CIRCUIT, INITIAL_STORAGE_WRITE_PUBDATA_BYTES, MAX_PUBDATA_PER_BLOCK,
+};
+
+use crate::vm_refunds_enhancement::old_vm::utils::heap_page_from_base;
+
+/// Max cycles for a single transaction.
+pub const MAX_CYCLES_FOR_TX: u32 = u32::MAX;
+
+/// The first 32 slots are reserved for debugging purposes
+pub(crate) const DEBUG_SLOTS_OFFSET: usize = 8;
+pub(crate) const DEBUG_FIRST_SLOTS: usize = 32;
+/// The next 33 slots are reserved for dealing with the paymaster context (1 slot for storing length + 32 slots for storing the actual context).
+pub(crate) const PAYMASTER_CONTEXT_SLOTS: usize = 32 + 1;
+/// The next PAYMASTER_CONTEXT_SLOTS + 7 slots free slots are needed before each tx, so that the
+/// postOp operation could be encoded correctly.
+pub(crate) const MAX_POSTOP_SLOTS: usize = PAYMASTER_CONTEXT_SLOTS + 7;
+
+/// Slots used to store the current L2 transaction's hash and the hash recommended
+/// to be used for signing the transaction's content.
+const CURRENT_L2_TX_HASHES_SLOTS: usize = 2;
+
+/// Slots used to store the calldata for the KnownCodesStorage to mark new factory
+/// dependencies as known ones. Besides the slots for the new factory dependencies themselves
+/// another 4 slots are needed for: selector, marker of whether the user should pay for the pubdata,
+/// the offset for the encoding of the array as well as the length of the array.
+const NEW_FACTORY_DEPS_RESERVED_SLOTS: usize = MAX_NEW_FACTORY_DEPS + 4;
+
+/// The operator can provide for each transaction the proposed minimal refund
+pub(crate) const OPERATOR_REFUNDS_SLOTS: usize = MAX_TXS_IN_BLOCK;
+
+pub(crate) const OPERATOR_REFUNDS_OFFSET: usize = DEBUG_SLOTS_OFFSET
+ + DEBUG_FIRST_SLOTS
+ + PAYMASTER_CONTEXT_SLOTS
+ + CURRENT_L2_TX_HASHES_SLOTS
+ + NEW_FACTORY_DEPS_RESERVED_SLOTS;
+
+pub(crate) const TX_OVERHEAD_OFFSET: usize = OPERATOR_REFUNDS_OFFSET + OPERATOR_REFUNDS_SLOTS;
+pub(crate) const TX_OVERHEAD_SLOTS: usize = MAX_TXS_IN_BLOCK;
+
+pub(crate) const TX_TRUSTED_GAS_LIMIT_OFFSET: usize = TX_OVERHEAD_OFFSET + TX_OVERHEAD_SLOTS;
+pub(crate) const TX_TRUSTED_GAS_LIMIT_SLOTS: usize = MAX_TXS_IN_BLOCK;
+
+pub(crate) const COMPRESSED_BYTECODES_SLOTS: usize = 32768;
+
+pub(crate) const BOOTLOADER_TX_DESCRIPTION_OFFSET: usize =
+ COMPRESSED_BYTECODES_OFFSET + COMPRESSED_BYTECODES_SLOTS;
+
+/// The size of the bootloader memory dedicated to the encodings of transactions
+pub const BOOTLOADER_TX_ENCODING_SPACE: u32 =
+ (USED_BOOTLOADER_MEMORY_WORDS - TX_DESCRIPTION_OFFSET - MAX_TXS_IN_BLOCK) as u32;
+
+// Size of the bootloader tx description in words
+pub(crate) const BOOTLOADER_TX_DESCRIPTION_SIZE: usize = 2;
+
+/// The actual descriptions of transactions should start after the minor descriptions and a MAX_POSTOP_SLOTS
+/// free slots to allow postOp encoding.
+pub(crate) const TX_DESCRIPTION_OFFSET: usize = BOOTLOADER_TX_DESCRIPTION_OFFSET
+ + BOOTLOADER_TX_DESCRIPTION_SIZE * MAX_TXS_IN_BLOCK
+ + MAX_POSTOP_SLOTS;
+
+pub(crate) const TX_GAS_LIMIT_OFFSET: usize = 4;
+
+const INITIAL_BASE_PAGE: u32 = 8;
+pub const BOOTLOADER_HEAP_PAGE: u32 = heap_page_from_base(MemoryPage(INITIAL_BASE_PAGE)).0;
+pub const BLOCK_OVERHEAD_GAS: u32 = 1200000;
+pub const BLOCK_OVERHEAD_L1_GAS: u32 = 1000000;
+pub const BLOCK_OVERHEAD_PUBDATA: u32 = BLOCK_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE;
+
+/// VM Hooks are used for communication between bootloader and tracers.
+/// The 'type'/'opcode' is put into VM_HOOK_POSITION slot,
+/// and VM_HOOKS_PARAMS_COUNT parameters (each 32 bytes) are put in the slots before.
+/// So the layout looks like this:
+/// [param 0][param 1][vmhook opcode]
+pub const VM_HOOK_POSITION: u32 = RESULT_SUCCESS_FIRST_SLOT - 1;
+pub const VM_HOOK_PARAMS_COUNT: u32 = 2;
+pub const VM_HOOK_PARAMS_START_POSITION: u32 = VM_HOOK_POSITION - VM_HOOK_PARAMS_COUNT;
+
+pub(crate) const MAX_MEM_SIZE_BYTES: u32 = 16777216; // 2^24
+
+/// Arbitrary space in memory closer to the end of the page
+pub const RESULT_SUCCESS_FIRST_SLOT: u32 =
+ (MAX_MEM_SIZE_BYTES - (MAX_TXS_IN_BLOCK as u32) * 32) / 32;
+
+/// How many gas bootloader is allowed to spend within one block.
+/// Note that this value doesn't correspond to the gas limit of any particular transaction
+/// (except for the fact that, of course, gas limit for each transaction should be <= `BLOCK_GAS_LIMIT`).
+pub const BLOCK_GAS_LIMIT: u32 =
+ zk_evm_1_3_3::zkevm_opcode_defs::system_params::VM_INITIAL_FRAME_ERGS;
+
+/// How many gas is allowed to spend on a single transaction in eth_call method
+pub const ETH_CALL_GAS_LIMIT: u32 = MAX_L2_TX_GAS_LIMIT as u32;
+
+/// ID of the transaction from L1
+pub const L1_TX_TYPE: u8 = 255;
+
+pub(crate) const TX_OPERATOR_L2_BLOCK_INFO_OFFSET: usize =
+ TX_TRUSTED_GAS_LIMIT_OFFSET + TX_TRUSTED_GAS_LIMIT_SLOTS;
+
+pub(crate) const TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO: usize = 4;
+pub(crate) const TX_OPERATOR_L2_BLOCK_INFO_SLOTS: usize =
+ (MAX_TXS_IN_BLOCK + 1) * TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO;
+
+pub(crate) const COMPRESSED_BYTECODES_OFFSET: usize =
+ TX_OPERATOR_L2_BLOCK_INFO_OFFSET + TX_OPERATOR_L2_BLOCK_INFO_SLOTS;
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/bytecode.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/bytecode.rs
new file mode 100644
index 00000000000..2092c03e06e
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/bytecode.rs
@@ -0,0 +1,57 @@
+use itertools::Itertools;
+
+use zksync_state::{StoragePtr, WriteStorage};
+use zksync_types::U256;
+use zksync_utils::bytecode::{compress_bytecode, hash_bytecode, CompressedBytecodeInfo};
+use zksync_utils::bytes_to_be_words;
+
+use crate::vm_refunds_enhancement::{HistoryMode, Vm};
+
+impl Vm {
+ /// Checks the last transaction has successfully published compressed bytecodes and returns `true` if there is at least one is still unknown.
+ pub(crate) fn has_unpublished_bytecodes(&mut self) -> bool {
+ self.get_last_tx_compressed_bytecodes().iter().any(|info| {
+ !self
+ .state
+ .storage
+ .storage
+ .get_ptr()
+ .borrow_mut()
+ .is_bytecode_known(&hash_bytecode(&info.original))
+ })
+ }
+}
+
+/// Converts bytecode to tokens and hashes it.
+pub(crate) fn bytecode_to_factory_dep(bytecode: Vec) -> (U256, Vec) {
+ let bytecode_hash = hash_bytecode(&bytecode);
+ let bytecode_hash = U256::from_big_endian(bytecode_hash.as_bytes());
+
+ let bytecode_words = bytes_to_be_words(bytecode);
+
+ (bytecode_hash, bytecode_words)
+}
+
+pub(crate) fn compress_bytecodes(
+ bytecodes: &[Vec],
+ storage: StoragePtr,
+) -> Vec {
+ bytecodes
+ .iter()
+ .enumerate()
+ .sorted_by_key(|(_idx, dep)| *dep)
+ .dedup_by(|x, y| x.1 == y.1)
+ .filter(|(_idx, dep)| !storage.borrow_mut().is_bytecode_known(&hash_bytecode(dep)))
+ .sorted_by_key(|(idx, _dep)| *idx)
+ .filter_map(|(_idx, dep)| {
+ let compressed_bytecode = compress_bytecode(dep);
+
+ compressed_bytecode
+ .ok()
+ .map(|compressed| CompressedBytecodeInfo {
+ original: dep.clone(),
+ compressed,
+ })
+ })
+ .collect()
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/execution.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/execution.rs
new file mode 100644
index 00000000000..2691b5395d7
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/execution.rs
@@ -0,0 +1,131 @@
+use zk_evm_1_3_3::aux_structures::Timestamp;
+use zksync_state::WriteStorage;
+
+use crate::interface::{VmExecutionMode, VmExecutionResultAndLogs};
+use crate::vm_refunds_enhancement::old_vm::{
+ history_recorder::HistoryMode,
+ utils::{vm_may_have_ended_inner, VmExecutionResult},
+};
+use crate::vm_refunds_enhancement::tracers::{
+ traits::{TracerExecutionStatus, VmTracer},
+ DefaultExecutionTracer, RefundsTracer,
+};
+use crate::vm_refunds_enhancement::vm::Vm;
+use crate::vm_refunds_enhancement::VmExecutionStopReason;
+
+impl Vm {
+ pub(crate) fn inspect_inner(
+ &mut self,
+ tracers: Vec>>,
+ execution_mode: VmExecutionMode,
+ ) -> VmExecutionResultAndLogs {
+ let mut enable_refund_tracer = false;
+ if let VmExecutionMode::OneTx = execution_mode {
+ // Move the pointer to the next transaction
+ self.bootloader_state.move_tx_to_execute_pointer();
+ enable_refund_tracer = true;
+ }
+ let (_, result) =
+ self.inspect_and_collect_results(tracers, execution_mode, enable_refund_tracer);
+ result
+ }
+
+ /// Execute VM with given traces until the stop reason is reached.
+ /// Collect the result from the default tracers.
+ fn inspect_and_collect_results(
+ &mut self,
+ tracers: Vec>>,
+ execution_mode: VmExecutionMode,
+ with_refund_tracer: bool,
+ ) -> (VmExecutionStopReason, VmExecutionResultAndLogs) {
+ let refund_tracers =
+ with_refund_tracer.then_some(RefundsTracer::new(self.batch_env.clone()));
+ let mut tx_tracer: DefaultExecutionTracer = DefaultExecutionTracer::new(
+ self.system_env.default_validation_computational_gas_limit,
+ execution_mode,
+ tracers,
+ self.storage.clone(),
+ refund_tracers,
+ );
+
+ let timestamp_initial = Timestamp(self.state.local_state.timestamp);
+ let cycles_initial = self.state.local_state.monotonic_cycle_counter;
+ let gas_remaining_before = self.gas_remaining();
+ let spent_pubdata_counter_before = self.state.local_state.spent_pubdata_counter;
+
+ let stop_reason = self.execute_with_default_tracer(&mut tx_tracer);
+
+ let gas_remaining_after = self.gas_remaining();
+
+ let logs = self.collect_execution_logs_after_timestamp(timestamp_initial);
+
+ let (refunds, pubdata_published) = tx_tracer
+ .refund_tracer
+ .as_ref()
+ .map(|x| (x.get_refunds(), x.pubdata_published()))
+ .unwrap_or_default();
+
+ let statistics = self.get_statistics(
+ timestamp_initial,
+ cycles_initial,
+ &tx_tracer,
+ gas_remaining_before,
+ gas_remaining_after,
+ spent_pubdata_counter_before,
+ pubdata_published,
+ logs.total_log_queries_count,
+ );
+
+ let result = tx_tracer.result_tracer.into_result();
+
+ let result = VmExecutionResultAndLogs {
+ result,
+ logs,
+ statistics,
+ refunds,
+ };
+
+ (stop_reason, result)
+ }
+
+ /// Execute vm with given tracers until the stop reason is reached.
+ fn execute_with_default_tracer(
+ &mut self,
+ tracer: &mut DefaultExecutionTracer,
+ ) -> VmExecutionStopReason {
+ tracer.initialize_tracer(&mut self.state);
+ let result = loop {
+ // Sanity check: we should never reach the maximum value, because then we won't be able to process the next cycle.
+ assert_ne!(
+ self.state.local_state.monotonic_cycle_counter,
+ u32::MAX,
+ "VM reached maximum possible amount of cycles. Vm state: {:?}",
+ self.state
+ );
+
+ self.state
+ .cycle(tracer)
+ .expect("Failed execution VM cycle.");
+
+ if let TracerExecutionStatus::Stop(reason) =
+ tracer.finish_cycle(&mut self.state, &mut self.bootloader_state)
+ {
+ break VmExecutionStopReason::TracerRequestedStop(reason);
+ }
+ if self.has_ended() {
+ break VmExecutionStopReason::VmFinished;
+ }
+ };
+ tracer.after_vm_execution(&mut self.state, &self.bootloader_state, result.clone());
+ result
+ }
+
+ fn has_ended(&self) -> bool {
+ match vm_may_have_ended_inner(&self.state) {
+ None | Some(VmExecutionResult::MostLikelyDidNotFinish(_, _)) => false,
+ Some(
+ VmExecutionResult::Ok(_) | VmExecutionResult::Revert(_) | VmExecutionResult::Panic,
+ ) => true,
+ }
+ }
+}
diff --git a/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/gas.rs b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/gas.rs
new file mode 100644
index 00000000000..7f85ba7dda3
--- /dev/null
+++ b/core/lib/multivm/src/versions/vm_refunds_enhancement/implementation/gas.rs
@@ -0,0 +1,42 @@
+use zksync_state::WriteStorage;
+
+use crate::vm_refunds_enhancement::old_vm::history_recorder::HistoryMode;
+use crate::vm_refunds_enhancement::tracers::DefaultExecutionTracer;
+use crate::vm_refunds_enhancement::vm::Vm;
+
+impl