From e3f8cc11910e31674e2f9fd263d4660e49a9ee2d Mon Sep 17 00:00:00 2001 From: Zhang Zhuo Date: Thu, 12 Sep 2024 11:24:40 +0800 Subject: [PATCH 1/5] upgrade Rust toolchain (#1418) * partial.. * default enable circuit-params * clippy testool * clippy aggregator * remove unused * cargo update * fix tests * fix some default unused --------- Co-authored-by: lightsing Co-authored-by: Akase Haruka --- Cargo.lock | 813 +++++++++--------- aggregator/Cargo.toml | 3 +- aggregator/src/aggregation/circuit.rs | 2 + aggregator/src/aggregation/decoder.rs | 1 + .../src/aggregation/decoder/seq_exec.rs | 1 + .../tables/fixed/fse_table_transition.rs | 11 +- .../fixed/seq_data_interleaved_order.rs | 11 +- .../decoder/tables/fixed/seq_tag_order.rs | 17 +- .../decoder/tables/fixed/tag_transition.rs | 13 +- .../decoder/tables/seqinst_table.rs | 1 + aggregator/src/aggregation/decoder/witgen.rs | 17 +- .../src/aggregation/decoder/witgen/types.rs | 46 +- aggregator/src/aggregation/rlc/gates.rs | 1 - aggregator/src/compression/circuit.rs | 1 + aggregator/src/lib.rs | 2 +- aggregator/src/recursion/circuit.rs | 3 +- aggregator/src/recursion/util.rs | 1 - aggregator/src/tests/blob.rs | 1 + aggregator/src/tests/mock_chunk.rs | 1 + aggregator/src/tests/recursion.rs | 2 - aggregator/src/tests/rlc/dynamic_hashes.rs | 1 + aggregator/src/tests/rlc/gates.rs | 1 + bus-mapping/src/circuit_input_builder.rs | 9 +- .../circuit_input_builder/builder_client.rs | 13 +- bus-mapping/src/lib.rs | 2 +- eth-types/src/bytecode.rs | 10 +- eth-types/src/l2_types.rs | 6 +- eth-types/src/lib.rs | 2 - eth-types/src/sign_types.rs | 10 +- gadgets/Cargo.toml | 3 + gadgets/src/batched_is_zero.rs | 1 - gadgets/src/evm_word.rs | 1 - gadgets/src/is_equal.rs | 1 - gadgets/src/is_zero.rs | 5 +- gadgets/src/less_than.rs | 2 - gadgets/src/monotone.rs | 3 +- gadgets/src/mul_add.rs | 1 - integration-tests/src/lib.rs | 1 - .../tests/circuit_input_builder.rs | 1 - integration-tests/tests/l2_trace.rs | 1 - integration-tests/tests/rpc.rs | 1 - mock/src/lib.rs | 1 - mock/src/test_ctx.rs | 3 + prover/Cargo.toml | 2 +- prover/src/common/verifier.rs | 2 +- prover/src/io.rs | 4 +- prover/src/lib.rs | 2 - prover/src/proof.rs | 2 +- prover/src/zkevm/circuit.rs | 2 +- rust-toolchain | 1 - rust-toolchain.toml | 2 + testool/Config.toml | 5 - testool/src/abi.rs | 2 +- testool/src/compiler.rs | 1 - testool/src/config.rs | 8 - testool/src/main.rs | 2 - testool/src/statetest/executor.rs | 7 +- testool/src/statetest/results.rs | 2 - testool/src/statetest/suite.rs | 22 +- testool/src/statetest/yaml.rs | 40 +- testool/tests | 2 +- zkevm-circuits/Cargo.toml | 2 +- zkevm-circuits/src/bytecode_circuit/dev.rs | 1 - zkevm-circuits/src/copy_circuit/dev.rs | 1 - zkevm-circuits/src/ecc_circuit/dev.rs | 1 + zkevm-circuits/src/ecc_circuit/test.rs | 1 + zkevm-circuits/src/evm_circuit.rs | 2 +- .../execution/error_oog_precompile.rs | 2 +- .../util/math_gadget/comparison.rs | 2 +- .../evm_circuit/util/math_gadget/test_util.rs | 1 - zkevm-circuits/src/exp_circuit/dev.rs | 1 - zkevm-circuits/src/keccak_circuit/dev.rs | 1 - zkevm-circuits/src/keccak_circuit/table.rs | 1 - zkevm-circuits/src/lib.rs | 3 +- zkevm-circuits/src/modexp_circuit/dev.rs | 1 - zkevm-circuits/src/mpt_circuit.rs | 1 - zkevm-circuits/src/pi_circuit/dev.rs | 1 - zkevm-circuits/src/poseidon_circuit.rs | 1 - zkevm-circuits/src/rlp_circuit_fsm/dev.rs | 1 - zkevm-circuits/src/sha256_circuit/circuit.rs | 6 +- zkevm-circuits/src/sha256_circuit/test.rs | 1 + zkevm-circuits/src/sig_circuit/dev.rs | 1 + zkevm-circuits/src/state_circuit/dev.rs | 1 - zkevm-circuits/src/super_circuit.rs | 1 - zkevm-circuits/src/tx_circuit.rs | 3 +- zkevm-circuits/src/tx_circuit/dev.rs | 1 - 86 files changed, 572 insertions(+), 601 deletions(-) delete mode 100644 rust-toolchain create mode 100644 rust-toolchain.toml diff --git a/Cargo.lock b/Cargo.lock index a2bcbfc150..5d5908b90d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,18 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" @@ -101,9 +101,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-eips" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a3e14fa0d152d00bd8daf605eb74ad397efb0f54bd7155585823dddb4401e" +checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -148,13 +148,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83524c1f6162fcb5b0decf775498a125066c86dda6066ed609531b0e912f85a" +checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -174,47 +174,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -222,9 +223,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "arc-swap" @@ -266,7 +267,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "zeroize", ] @@ -365,15 +366,15 @@ checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -386,13 +387,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -403,7 +404,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -424,28 +425,28 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -516,9 +517,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitstream-io" -version = "2.2.0" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c9989a51171e2e81038ab168b6ae22886fe9ded214430dbb4f41c28cf176da" +checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" [[package]] name = "bitvec" @@ -549,7 +550,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] @@ -592,9 +593,9 @@ dependencies = [ [[package]] name = "blst" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ "cc", "glob", @@ -664,9 +665,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -694,23 +695,24 @@ dependencies = [ [[package]] name = "c-kzg" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -732,7 +734,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -740,12 +742,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.94" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -771,7 +774,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -808,9 +811,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -818,9 +821,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -830,27 +833,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cli-table" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbb116d9e2c4be7011360d0c0bee565712c11e969c9609b25b619366dc379d" +checksum = "b53f9241f288a7b12c56565f04aaeaeeab6b8923d42d99255d4ca428b4d97f89" dependencies = [ "cli-table-derive", "csv", @@ -860,9 +863,9 @@ dependencies = [ [[package]] name = "cli-table-derive" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af3bfb9da627b0a6c467624fb7963921433774ed435493b5c08a3053e829ad4" +checksum = "3e83a93253aaae7c74eb7428ce4faa6e219ba94886908048888701819f82fb94" dependencies = [ "proc-macro2", "quote", @@ -923,9 +926,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -939,9 +942,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -964,9 +967,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -986,24 +989,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if 1.0.0", ] @@ -1023,9 +1026,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1060,9 +1063,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1169,9 +1172,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der" @@ -1205,15 +1208,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 1.0.109", + "rustc_version 0.4.1", + "syn 2.0.77", ] [[package]] @@ -1272,9 +1275,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" @@ -1298,9 +1301,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1323,9 +1326,9 @@ dependencies = [ [[package]] name = "ena" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" dependencies = [ "log", ] @@ -1373,13 +1376,13 @@ dependencies = [ [[package]] name = "enumn" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" +checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -1403,9 +1406,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1571,7 +1574,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.60", + "syn 2.0.77", "toml 0.7.8", "walkdir", ] @@ -1588,7 +1591,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -1613,7 +1616,7 @@ dependencies = [ "serde", "serde_json", "strum 0.24.1", - "syn 2.0.60", + "syn 2.0.77", "tempfile", "thiserror", "tiny-keccak", @@ -1628,7 +1631,7 @@ dependencies = [ "ethers-core", "ethers-solc", "reqwest", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1732,7 +1735,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "solang-parser", @@ -1769,9 +1772,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -1815,9 +1818,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -1920,7 +1923,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -2007,9 +2010,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if 1.0.0", "libc", @@ -2018,9 +2021,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "git-version" @@ -2039,7 +2042,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -2174,7 +2177,7 @@ dependencies = [ [[package]] name = "halo2_gadgets" version = "1.1.0" -source = "git+https://github.com/scroll-tech/halo2.git?branch=v1.1#6c5e9eec5088dc8b4a23edcdd1eaf8705b5fc7dc" +source = "git+https://github.com/scroll-tech/halo2.git?branch=v1.1#e5ddf67e5ae16be38d6368ed355c7c41906272ab" dependencies = [ "arrayvec", "bitvec", @@ -2216,7 +2219,7 @@ dependencies = [ [[package]] name = "halo2curves" version = "0.1.0" -source = "git+https://github.com/scroll-tech/halo2curves?branch=v0.1.0#112f5b9bf27f6b1708ba7d1c2fc14cb3c6e55604" +source = "git+https://github.com/scroll-tech/halo2curves?branch=v0.1.0#a495a7b11ad13e5cd0cca7ca5d737b398cfaf1b7" dependencies = [ "blake2b_simd", "bls12_381", @@ -2226,6 +2229,7 @@ dependencies = [ "maybe-rayon", "num-bigint", "num-traits", + "pairing", "pasta_curves", "paste", "rand", @@ -2261,9 +2265,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -2296,6 +2300,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2350,9 +2360,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2368,9 +2378,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2489,12 +2499,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -2508,9 +2518,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if 1.0.0", ] @@ -2542,21 +2552,27 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.10.5" @@ -2592,18 +2608,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2633,9 +2649,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" +checksum = "422fbc7ff2f2f5bdffeb07718e5a5324dca72b0c9293d50df4026652385e3314" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -2671,18 +2687,18 @@ checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -2708,15 +2724,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -2724,9 +2740,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "log-mdc" @@ -2777,9 +2793,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -2789,22 +2805,23 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2861,9 +2878,9 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "num" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -2875,11 +2892,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "rand", @@ -2887,9 +2903,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -2922,9 +2938,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2933,11 +2949,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -2945,9 +2960,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -2959,7 +2974,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] @@ -3002,14 +3017,14 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3062,9 +3077,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -3076,11 +3091,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -3088,9 +3103,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -3098,15 +3113,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -3137,9 +3152,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "path-slash" @@ -3177,9 +3192,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.9" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" +checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" dependencies = [ "memchr", "thiserror", @@ -3188,9 +3203,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.9" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" +checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" dependencies = [ "pest", "pest_generator", @@ -3198,22 +3213,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.9" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" +checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "pest_meta" -version = "2.7.9" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" +checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" dependencies = [ "once_cell", "pest", @@ -3222,9 +3237,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap", @@ -3237,7 +3252,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -3270,7 +3285,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -3308,7 +3323,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -3351,7 +3366,7 @@ dependencies = [ [[package]] name = "poseidon-base" version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#6cc36ab9dfa153f554ff7b84305f39838366a8df" +source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#d52fa404e8f03b5c3f85c090ccb8b08c112e2f4d" dependencies = [ "bitvec", "halo2curves", @@ -3362,7 +3377,7 @@ dependencies = [ [[package]] name = "poseidon-circuit" version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#6cc36ab9dfa153f554ff7b84305f39838366a8df" +source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#d52fa404e8f03b5c3f85c090ccb8b08c112e2f4d" dependencies = [ "ff", "halo2_proofs", @@ -3381,9 +3396,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -3403,12 +3421,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.19" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -3451,27 +3469,27 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.22.20", ] [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", @@ -3481,7 +3499,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", "rusty-fork", "tempfile", "unarray", @@ -3522,9 +3540,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ "cc", ] @@ -3537,9 +3555,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3611,18 +3629,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -3631,25 +3649,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -3660,9 +3678,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -3725,7 +3743,7 @@ dependencies = [ [[package]] name = "revm-precompile" version = "9.2.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#03b072906faf3f826e4daf38ca0be69a73d90ce3" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#5e215742c4d9d771f73d74fcba39628b1a2e3452" dependencies = [ "aurora-engine-modexp", "c-kzg", @@ -3734,7 +3752,7 @@ dependencies = [ "once_cell", "revm-primitives", "ripemd", - "secp256k1 0.29.0", + "secp256k1 0.29.1", "sha2", "substrate-bn", ] @@ -3742,7 +3760,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "7.1.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#03b072906faf3f826e4daf38ca0be69a73d90ce3" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#5e215742c4d9d771f73d74fcba39628b1a2e3452" dependencies = [ "alloy-eips", "alloy-primitives", @@ -3754,11 +3772,9 @@ dependencies = [ "derive_more", "dyn-clone", "enumn", - "halo2curves", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "once_cell", - "poseidon-base", "serde", ] @@ -3883,9 +3899,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3910,18 +3926,18 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.22", + "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -3932,9 +3948,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -3973,9 +3989,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -3991,9 +4007,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -4015,9 +4031,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if 1.0.0", "derive_more", @@ -4027,11 +4043,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.2" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -4090,9 +4106,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "rand", "secp256k1-sys 0.10.0", @@ -4127,9 +4143,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -4157,9 +4173,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -4175,31 +4191,32 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4294,14 +4311,20 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" +checksum = "57d79b758b7cb2085612b11a235055e485605a5103faccdd633f35bd7aee69dd" dependencies = [ "cc", "cfg-if 1.0.0", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "2.2.0" @@ -4336,7 +4359,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snark-verifier" version = "0.1.0" -source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#fe1f8906041ad323034881fbd808908250d44829" +source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#572ef69d1595fca82213d3b05e859eaf355a5fa1" dependencies = [ "bytes", "ethereum-types", @@ -4359,12 +4382,13 @@ dependencies = [ [[package]] name = "snark-verifier-sdk" version = "0.0.1" -source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#fe1f8906041ad323034881fbd808908250d44829" +source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#572ef69d1595fca82213d3b05e859eaf355a5fa1" dependencies = [ "bincode", "ethereum-types", "ff", "halo2-base", + "halo2_proofs", "hex", "itertools 0.12.1", "log", @@ -4380,9 +4404,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4426,15 +4450,15 @@ dependencies = [ [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if 1.0.0", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -4506,7 +4530,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -4524,9 +4548,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" @@ -4539,7 +4563,7 @@ dependencies = [ "home", "once_cell", "reqwest", - "semver 1.0.22", + "semver 1.0.23", "serde", "serde_json", "sha2", @@ -4561,9 +4585,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -4605,14 +4629,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if 1.0.0", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4675,29 +4700,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "thread-id" -version = "4.2.1" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" +checksum = "cfe8f25bbdd100db7e1d34acf7fd2dc59c4bf8f7483f505eaa7d4f12f76cc0ea" dependencies = [ "libc", "winapi", @@ -4742,9 +4767,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4757,30 +4782,29 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -4810,16 +4834,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -4845,9 +4868,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -4862,25 +4885,25 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4901,7 +4924,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -5003,15 +5026,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "untrusted" @@ -5027,9 +5050,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -5050,9 +5073,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -5072,9 +5095,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -5112,34 +5135,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if 1.0.0", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -5149,9 +5173,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5159,28 +5183,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5229,11 +5253,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5248,7 +5272,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -5266,7 +5290,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5286,18 +5319,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5308,9 +5341,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5320,9 +5353,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5332,15 +5365,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5350,9 +5383,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5362,9 +5395,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5374,9 +5407,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5386,9 +5419,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -5399,6 +5432,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winnow" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.50.0" @@ -5420,7 +5462,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", @@ -5454,29 +5496,30 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -5489,7 +5532,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -5604,7 +5647,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ "libc", - "zstd-sys 2.0.10+zstd.1.5.6", + "zstd-sys 2.0.13+zstd.1.5.6", ] [[package]] @@ -5626,9 +5669,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/aggregator/Cargo.toml b/aggregator/Cargo.toml index 5006aced73..ca3748bf50 100644 --- a/aggregator/Cargo.toml +++ b/aggregator/Cargo.toml @@ -44,5 +44,6 @@ zstd-encoder = { package = "encoder", git = "https://github.com/scroll-tech/da-c csv = "1.1" [features] -default = ["revm-precompile/c-kzg"] +default = ["revm-precompile/c-kzg", "halo2_proofs/circuit-params"] +display = [] print-trace = ["ark-std/print-trace"] diff --git a/aggregator/src/aggregation/circuit.rs b/aggregator/src/aggregation/circuit.rs index 418d27dfe0..47aca02b7c 100644 --- a/aggregator/src/aggregation/circuit.rs +++ b/aggregator/src/aggregation/circuit.rs @@ -132,6 +132,8 @@ impl BatchCircuit { impl Circuit for BatchCircuit { type Config = (BatchCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); + fn without_witnesses(&self) -> Self { unimplemented!() } diff --git a/aggregator/src/aggregation/decoder.rs b/aggregator/src/aggregation/decoder.rs index 8a05f4ab32..bb9c7661f0 100644 --- a/aggregator/src/aggregation/decoder.rs +++ b/aggregator/src/aggregation/decoder.rs @@ -5468,6 +5468,7 @@ mod tests { impl Circuit for DecoderConfigTester { type Config = (DecoderConfig, U8Table, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() diff --git a/aggregator/src/aggregation/decoder/seq_exec.rs b/aggregator/src/aggregation/decoder/seq_exec.rs index 5a470dc20a..b854ff5336 100644 --- a/aggregator/src/aggregation/decoder/seq_exec.rs +++ b/aggregator/src/aggregation/decoder/seq_exec.rs @@ -1127,6 +1127,7 @@ mod tests { impl Circuit for SeqExecMock { type Config = SeqExecMockConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() } diff --git a/aggregator/src/aggregation/decoder/tables/fixed/fse_table_transition.rs b/aggregator/src/aggregation/decoder/tables/fixed/fse_table_transition.rs index 83a688c683..b369644519 100644 --- a/aggregator/src/aggregation/decoder/tables/fixed/fse_table_transition.rs +++ b/aggregator/src/aggregation/decoder/tables/fixed/fse_table_transition.rs @@ -2,16 +2,7 @@ use halo2_proofs::{circuit::Value, halo2curves::bn256::Fr}; use super::{FixedLookupTag, FixedLookupValues}; -pub struct RomFseTableTransition { - /// The block index on the previous FSE table. - pub block_idx_prev: u64, - /// The block index on the current FSE table. - pub block_idx_curr: u64, - /// The FSE table previously decoded. - pub table_kind_prev: u64, - /// The FSE table currently decoded. - pub table_kind_curr: u64, -} +pub struct RomFseTableTransition; impl FixedLookupValues for RomFseTableTransition { fn values() -> Vec<[Value; 7]> { diff --git a/aggregator/src/aggregation/decoder/tables/fixed/seq_data_interleaved_order.rs b/aggregator/src/aggregation/decoder/tables/fixed/seq_data_interleaved_order.rs index 932e236870..c14d274833 100644 --- a/aggregator/src/aggregation/decoder/tables/fixed/seq_data_interleaved_order.rs +++ b/aggregator/src/aggregation/decoder/tables/fixed/seq_data_interleaved_order.rs @@ -5,16 +5,7 @@ use crate::aggregation::decoder::{ witgen::FseTableKind, }; -pub struct RomSeqDataInterleavedOrder { - /// FSE table used in the previous bitstring. - pub table_kind_prev: FseTableKind, - /// FSE table used in the current bitstring. - pub table_kind_curr: FseTableKind, - /// Boolean flag to indicate whether we are initialising the FSE state. - pub is_init_state: bool, - /// Boolean flag to indicate whether we are updating the FSE state. - pub is_update_state: bool, -} +pub struct RomSeqDataInterleavedOrder; impl FixedLookupValues for RomSeqDataInterleavedOrder { fn values() -> Vec<[Value; 7]> { diff --git a/aggregator/src/aggregation/decoder/tables/fixed/seq_tag_order.rs b/aggregator/src/aggregation/decoder/tables/fixed/seq_tag_order.rs index c41994bf43..9527c45445 100644 --- a/aggregator/src/aggregation/decoder/tables/fixed/seq_tag_order.rs +++ b/aggregator/src/aggregation/decoder/tables/fixed/seq_tag_order.rs @@ -28,22 +28,7 @@ use super::FixedLookupValues; /// - SequenceHeader > FseCode > SequenceData (MOT) /// - (0, 0, 1): /// - SequenceHeader > FseCode > SequenceData (MLT) -pub struct RomSeqTagOrder { - /// Boolean flag to mark if LLT is Fse_Compressed_Mode or Predefined_Mode. - pub cmode_llt: bool, - /// Boolean flag to mark if MOT is Fse_Compressed_Mode or Predefined_Mode. - pub cmode_mot: bool, - /// Boolean flag to mark if MLT is Fse_Compressed_Mode or Predefined_Mode. - pub cmode_mlt: bool, - /// Tag that was handled before the current tag. - pub tag_prev: ZstdTag, - /// Tag currently being handled. - pub tag_curr: ZstdTag, - /// Tag that will be handled after the current tag. - pub tag_next: ZstdTag, - /// The FSE table that we expect with the current tag. - pub fse_table: FseTableKind, -} +pub struct RomSeqTagOrder; impl FixedLookupValues for RomSeqTagOrder { fn values() -> Vec<[Value; 7]> { diff --git a/aggregator/src/aggregation/decoder/tables/fixed/tag_transition.rs b/aggregator/src/aggregation/decoder/tables/fixed/tag_transition.rs index 3e90910e7a..463e4d2e68 100644 --- a/aggregator/src/aggregation/decoder/tables/fixed/tag_transition.rs +++ b/aggregator/src/aggregation/decoder/tables/fixed/tag_transition.rs @@ -4,18 +4,7 @@ use crate::aggregation::decoder::{tables::fixed::FixedLookupTag, witgen::ZstdTag use super::FixedLookupValues; -pub struct RomTagTransition { - /// The current tag. - pub tag: ZstdTag, - /// The tag that will be processed after the current tag is finished processing. - pub tag_next: ZstdTag, - /// The maximum number of bytes that are needed to represent the current tag. - pub max_len: u64, - /// Whether this tag is processed from back-to-front or not. - pub is_reverse: bool, - /// Whether this tag belongs to a ``block`` in zstd or not. - pub is_block: bool, -} +pub struct RomTagTransition; impl FixedLookupValues for RomTagTransition { fn values() -> Vec<[Value; 7]> { diff --git a/aggregator/src/aggregation/decoder/tables/seqinst_table.rs b/aggregator/src/aggregation/decoder/tables/seqinst_table.rs index fdd1418c12..2b321138b7 100644 --- a/aggregator/src/aggregation/decoder/tables/seqinst_table.rs +++ b/aggregator/src/aggregation/decoder/tables/seqinst_table.rs @@ -1003,6 +1003,7 @@ mod tests { impl Circuit for SeqTable { type Config = SeqInstTable; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() } diff --git a/aggregator/src/aggregation/decoder/witgen.rs b/aggregator/src/aggregation/decoder/witgen.rs index b0dde28d46..f1282e6e56 100644 --- a/aggregator/src/aggregation/decoder/witgen.rs +++ b/aggregator/src/aggregation/decoder/witgen.rs @@ -295,7 +295,6 @@ pub struct LiteralsBlockResult { pub offset: usize, pub witness_rows: Vec>, pub literals: Vec, - pub regen_size: usize, } #[allow(clippy::too_many_arguments)] @@ -318,7 +317,6 @@ fn process_block_zstd( offset: byte_offset, witness_rows: rows, regen_size, - compressed_size: _, } = process_block_zstd_literals_header::(src, block_idx, byte_offset, last_row, randomness); witness_rows.extend_from_slice(&rows); @@ -327,7 +325,6 @@ fn process_block_zstd( offset: byte_offset, witness_rows: rows, literals, - regen_size: _, } = { let last_row = rows.last().cloned().unwrap(); let multiplier = @@ -376,7 +373,6 @@ fn process_block_zstd( }) .collect::>(), literals: literals.iter().map(|b| *b as u64).collect::>(), - regen_size, } }; @@ -1606,7 +1602,6 @@ pub struct LiteralsHeaderProcessingResult { pub offset: usize, pub witness_rows: Vec>, pub regen_size: usize, - pub compressed_size: usize, } fn process_block_zstd_literals_header( @@ -1626,12 +1621,11 @@ fn process_block_zstd_literals_header( let literals_block_type = BlockType::from(lh_bytes[0] & 0x3); let size_format = (lh_bytes[0] >> 2) & 3; - let [n_bits_fmt, n_bits_regen, n_bits_compressed, _n_streams, n_bytes_header, _branch]: [usize; - 6] = match literals_block_type { + let [n_bits_fmt, n_bits_regen, n_bytes_header]: [usize; 3] = match literals_block_type { BlockType::RawBlock => match size_format { - 0b00 | 0b10 => [1, 5, 0, 1, 1, 0], - 0b01 => [2, 12, 0, 1, 2, 1], - 0b11 => [2, 20, 0, 1, 3, 2], + 0b00 | 0b10 => [1, 5, 1], + 0b01 => [2, 12, 2], + 0b11 => [2, 20, 3], _ => unreachable!("size_format out of bound"), }, _ => unreachable!("BlockType::* unexpected. Must be raw bytes for literals."), @@ -1644,8 +1638,6 @@ fn process_block_zstd_literals_header( })[(2 + n_bits_fmt)..(n_bytes_header * N_BITS_PER_BYTE)]; let regen_size = le_bits_to_value(&sizing_bits[0..n_bits_regen]) as usize; - let compressed_size = - le_bits_to_value(&sizing_bits[n_bits_regen..(n_bits_regen + n_bits_compressed)]) as usize; let tag_next = match literals_block_type { BlockType::RawBlock => ZstdTag::ZstdBlockLiteralsRawBytes, _ => unreachable!("BlockType::* unexpected. Must be raw bytes for literals."), @@ -1698,7 +1690,6 @@ fn process_block_zstd_literals_header( }) .collect::>(), regen_size, - compressed_size, } } diff --git a/aggregator/src/aggregation/decoder/witgen/types.rs b/aggregator/src/aggregation/decoder/witgen/types.rs index 8e7daba86f..22f5ac057d 100644 --- a/aggregator/src/aggregation/decoder/witgen/types.rs +++ b/aggregator/src/aggregation/decoder/witgen/types.rs @@ -187,19 +187,23 @@ pub enum FseTableKind { impl_expr!(FseTableKind); -impl ToString for ZstdTag { - fn to_string(&self) -> String { - String::from(match self { - Self::Null => "null", - Self::FrameHeaderDescriptor => "FrameHeaderDescriptor", - Self::FrameContentSize => "FrameContentSize", - Self::BlockHeader => "BlockHeader", - Self::ZstdBlockLiteralsHeader => "ZstdBlockLiteralsHeader", - Self::ZstdBlockLiteralsRawBytes => "ZstdBlockLiteralsRawBytes", - Self::ZstdBlockSequenceHeader => "ZstdBlockSequenceHeader", - Self::ZstdBlockSequenceFseCode => "ZstdBlockSequenceFseCode", - Self::ZstdBlockSequenceData => "ZstdBlockSequenceData", - }) +impl std::fmt::Display for ZstdTag { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Null => "null", + Self::FrameHeaderDescriptor => "FrameHeaderDescriptor", + Self::FrameContentSize => "FrameContentSize", + Self::BlockHeader => "BlockHeader", + Self::ZstdBlockLiteralsHeader => "ZstdBlockLiteralsHeader", + Self::ZstdBlockLiteralsRawBytes => "ZstdBlockLiteralsRawBytes", + Self::ZstdBlockSequenceHeader => "ZstdBlockSequenceHeader", + Self::ZstdBlockSequenceFseCode => "ZstdBlockSequenceFseCode", + Self::ZstdBlockSequenceData => "ZstdBlockSequenceData", + } + ) } } @@ -523,17 +527,6 @@ impl SequenceFixedStateActionTable { } } -/// Data for the FSE table's witness values. -#[derive(Clone, Debug)] -pub struct FseTableData { - /// The byte offset in the frame at which the FSE table is described. - pub byte_offset: u64, - /// The FSE table's size, i.e. 1 << AL (accuracy log). - pub table_size: u64, - /// Represent the states, symbols, and so on of this FSE table. - pub rows: Vec, -} - /// Auxiliary data accompanying the FSE table's witness values. #[derive(Clone, Debug)] pub struct FseAuxiliaryTableData { @@ -787,7 +780,7 @@ impl FseAuxiliaryTableData { let mut count = 0; let mut states_with_skipped: Vec<(u64, bool)> = Vec::with_capacity(N); while count < N { - if allocated_states.get(&state).is_some() { + if allocated_states.contains_key(&state) { // if state has been pre-allocated to some symbol with prob=-1. states_with_skipped.push((state, true)); } else { @@ -949,8 +942,7 @@ mod tests { (0x1e, 0x0c, 2), ] .iter() - .enumerate() - .map(|(_i, &(state, baseline, num_bits))| FseTableRow { + .map(|&(state, baseline, num_bits)| FseTableRow { state, symbol: 1, baseline, diff --git a/aggregator/src/aggregation/rlc/gates.rs b/aggregator/src/aggregation/rlc/gates.rs index 1527fd1418..94f781b1e6 100644 --- a/aggregator/src/aggregation/rlc/gates.rs +++ b/aggregator/src/aggregation/rlc/gates.rs @@ -1,6 +1,5 @@ use ethers_core::utils::keccak256; use halo2_proofs::{ - arithmetic::Field, circuit::{AssignedCell, Cell, Region, RegionIndex, Value}, halo2curves::bn256::Fr, plonk::Error, diff --git a/aggregator/src/compression/circuit.rs b/aggregator/src/compression/circuit.rs index 8c86667b02..619ab93398 100644 --- a/aggregator/src/compression/circuit.rs +++ b/aggregator/src/compression/circuit.rs @@ -53,6 +53,7 @@ pub struct CompressionCircuit { impl Circuit for CompressionCircuit { type Config = CompressionConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { let flattened_instances = self diff --git a/aggregator/src/lib.rs b/aggregator/src/lib.rs index bf608e7cdc..3369543aa3 100644 --- a/aggregator/src/lib.rs +++ b/aggregator/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(lazy_cell)] +#![allow(clippy::doc_lazy_continuation)] /// proof aggregation mod aggregation; /// This module implements `Batch` related data types. diff --git a/aggregator/src/recursion/circuit.rs b/aggregator/src/recursion/circuit.rs index 392e4bfd23..1f07b952ff 100644 --- a/aggregator/src/recursion/circuit.rs +++ b/aggregator/src/recursion/circuit.rs @@ -246,6 +246,7 @@ impl RecursionCircuit { impl Circuit for RecursionCircuit { type Config = config::RecursionConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self { @@ -528,7 +529,7 @@ impl Circuit for RecursionCircuit { #[cfg(feature = "display")] dbg!(ctx.total_advice); #[cfg(feature = "display")] - println!("Advice columns used: {}", ctx.advice_alloc[0][0].0 + 1); + println!("Advice columns used: {:?}", ctx.advice_alloc[0]); // Return the computed instance cells for this Recursion Circuit. Ok([lhs.x(), lhs.y(), rhs.x(), rhs.y()] diff --git a/aggregator/src/recursion/util.rs b/aggregator/src/recursion/util.rs index 14e0203af0..c8931cd219 100644 --- a/aggregator/src/recursion/util.rs +++ b/aggregator/src/recursion/util.rs @@ -28,7 +28,6 @@ mod dummy_circuit { impl> Circuit for CsProxy { type Config = C::Config; type FloorPlanner = C::FloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/aggregator/src/tests/blob.rs b/aggregator/src/tests/blob.rs index 18685f95f5..1bf35fa510 100644 --- a/aggregator/src/tests/blob.rs +++ b/aggregator/src/tests/blob.rs @@ -58,6 +58,7 @@ struct BlobConfig { impl Circuit for BlobCircuit { type Config = BlobConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() } diff --git a/aggregator/src/tests/mock_chunk.rs b/aggregator/src/tests/mock_chunk.rs index 0f208b742f..cea6776d6c 100644 --- a/aggregator/src/tests/mock_chunk.rs +++ b/aggregator/src/tests/mock_chunk.rs @@ -69,6 +69,7 @@ impl MockChunkCircuit { impl Circuit for MockChunkCircuit { type Config = MockConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self::default() diff --git a/aggregator/src/tests/recursion.rs b/aggregator/src/tests/recursion.rs index 4881f1885d..6c5e9ca01e 100644 --- a/aggregator/src/tests/recursion.rs +++ b/aggregator/src/tests/recursion.rs @@ -130,7 +130,6 @@ mod app { impl Circuit for Square { type Config = Selector; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { @@ -311,7 +310,6 @@ mod app_add_inst { impl Circuit for Square { type Config = (Selector, Column, Column); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/aggregator/src/tests/rlc/dynamic_hashes.rs b/aggregator/src/tests/rlc/dynamic_hashes.rs index 2cf70b41cc..e0914e2de3 100644 --- a/aggregator/src/tests/rlc/dynamic_hashes.rs +++ b/aggregator/src/tests/rlc/dynamic_hashes.rs @@ -34,6 +34,7 @@ struct DynamicHashCircuitConfig { impl Circuit for DynamicHashCircuit { type Config = (DynamicHashCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() diff --git a/aggregator/src/tests/rlc/gates.rs b/aggregator/src/tests/rlc/gates.rs index 7f177a5d94..4f4ad2fa31 100644 --- a/aggregator/src/tests/rlc/gates.rs +++ b/aggregator/src/tests/rlc/gates.rs @@ -25,6 +25,7 @@ struct ArithTestCircuit { impl Circuit for ArithTestCircuit { type Config = RlcConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self::default() } diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 756cce41d4..bd467f132b 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -147,10 +147,11 @@ impl Default for CircuitsParams { /// steps: /// /// 1. Take a [`eth_types::Block`] to build the circuit input associated with -/// the block. 2. For each [`eth_types::Transaction`] in the block, take the -/// [`eth_types::GethExecTrace`] to build the circuit input associated with -/// each transaction, and the bus-mapping operations associated with each -/// [`eth_types::GethExecStep`] in the [`eth_types::GethExecTrace`]. +/// the block. +/// 2. For each [`eth_types::Transaction`] in the block, take the [`eth_types::GethExecTrace`] +/// to build the circuit input associated with each transaction, +/// and the bus-mapping operations associated with each [`eth_types::GethExecStep`] +/// in the [`eth_types::GethExecTrace`]. /// /// The generated bus-mapping operations are: /// [`StackOp`](crate::operation::StackOp)s, diff --git a/bus-mapping/src/circuit_input_builder/builder_client.rs b/bus-mapping/src/circuit_input_builder/builder_client.rs index 9f1b47ef85..019ef070c6 100644 --- a/bus-mapping/src/circuit_input_builder/builder_client.rs +++ b/bus-mapping/src/circuit_input_builder/builder_client.rs @@ -1,6 +1,4 @@ use eth_types::{ - constants::SCROLL_COINBASE, - geth_types::{self, Account, BlockConstants}, state_db::{self, CodeDB, StateDB}, utils::hash_code_keccak, Address, EthBlock, GethExecTrace, ToWord, Word, H256, KECCAK_CODE_HASH_EMPTY, @@ -11,7 +9,6 @@ use hex::decode_to_slice; use super::{AccessSet, Block, Blocks, CircuitInputBuilder, CircuitsParams}; use crate::{error::Error, rpc::GethClient}; -use std::str::FromStr; use std::{collections::HashMap, iter}; /// Struct that wraps a GethClient and contains methods to perform all the steps @@ -461,6 +458,8 @@ impl BuilderClient

{ geth_traces: impl Iterator, complete_prestate: bool, ) -> Result { + use std::str::FromStr; + let (proofs, codes) = self.get_pre_state(geth_traces)?; let proofs = if complete_prestate { self.complete_prestate(eth_block, proofs).await? @@ -470,14 +469,14 @@ impl BuilderClient

{ // We will not need to regen pk each time if we use same coinbase. //let coinbase = eth_block.author.unwrap(); - let coinbase = Address::from_str(SCROLL_COINBASE).unwrap(); + let coinbase = Address::from_str(eth_types::constants::SCROLL_COINBASE).unwrap(); //let difficulty = eth_block.difficulty; let difficulty = Word::zero(); Ok(external_tracer::TraceConfig { chain_id: self.chain_id, history_hashes: vec![eth_block.parent_hash.to_word()], - block_constants: BlockConstants { + block_constants: eth_types::geth_types::BlockConstants { coinbase, timestamp: eth_block.timestamp, number: eth_block.number.unwrap(), @@ -488,7 +487,7 @@ impl BuilderClient

{ accounts: proofs .into_iter() .map(|proof| { - let acc = Account { + let acc = eth_types::geth_types::Account { address: proof.address, nonce: proof.nonce, balance: proof.balance, @@ -509,7 +508,7 @@ impl BuilderClient

{ transactions: eth_block .transactions .iter() - .map(geth_types::Transaction::from) + .map(eth_types::geth_types::Transaction::from) .collect(), logger_config: Default::default(), chain_config: None, diff --git a/bus-mapping/src/lib.rs b/bus-mapping/src/lib.rs index e7a239ef0d..294dee2972 100644 --- a/bus-mapping/src/lib.rs +++ b/bus-mapping/src/lib.rs @@ -208,6 +208,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] // Temporary until we have more of the crate implemented. #![allow(dead_code)] +#![allow(clippy::doc_lazy_continuation)] // We want to have UPPERCASE idents sometimes. #![allow(non_snake_case)] // Catch documentation errors caused by code changes. @@ -218,7 +219,6 @@ #![allow(clippy::result_large_err)] // it's large, but what can we do? #![allow(clippy::collapsible_else_if)] #![allow(incomplete_features)] -#![feature(lazy_cell)] #![feature(adt_const_params)] extern crate alloc; diff --git a/eth-types/src/bytecode.rs b/eth-types/src/bytecode.rs index eed188ccfb..36a38b4e4b 100644 --- a/eth-types/src/bytecode.rs +++ b/eth-types/src/bytecode.rs @@ -140,7 +140,7 @@ impl Bytecode { pub fn get_pos(&self, marker: &str) -> usize { *self .markers - .get(&marker.to_string()) + .get(marker) .unwrap_or_else(|| panic!("marker '{marker}' not found")) } @@ -249,11 +249,11 @@ impl FromStr for OpcodeWithData { } } -impl ToString for OpcodeWithData { - fn to_string(&self) -> String { +impl std::fmt::Display for OpcodeWithData { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - OpcodeWithData::Opcode(opcode) => format!("{opcode:?}"), - OpcodeWithData::PushWithData(n, word) => format!("PUSH{n}({word})"), + OpcodeWithData::Opcode(opcode) => write!(f, "{opcode:?}"), + OpcodeWithData::PushWithData(n, word) => write!(f, "PUSH{n}({word})"), } } } diff --git a/eth-types/src/l2_types.rs b/eth-types/src/l2_types.rs index 260cf34d74..103c395e9a 100644 --- a/eth-types/src/l2_types.rs +++ b/eth-types/src/l2_types.rs @@ -459,13 +459,13 @@ pub struct StorageTrace { /// additional deletion proofs pub deletion_proofs: Vec, #[serde(rename = "flattenProofs", default)] - /// + /// all trie nodes with preimages pub flatten_proofs: HashMap, #[serde(rename = "addressHashes", default)] - /// + /// hashes of addresses pub address_hashes: HashMap, #[serde(rename = "storeKeyHashes", default)] - /// + /// hashes of keys pub store_key_hashes: HashMap, } diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index d518ef95a2..c0461dcb29 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -6,12 +6,10 @@ #![allow(incomplete_features)] // We want to have UPPERCASE idents sometimes. #![allow(non_snake_case)] -#![allow(incomplete_features)] // Catch documentation errors caused by code changes. #![deny(rustdoc::broken_intra_doc_links)] // GasCost is used as type parameter #![feature(adt_const_params)] -#![feature(lazy_cell)] #![deny(missing_docs)] //#![deny(unsafe_code)] Allowed now until we find a // better way to handle downcasting from Operation into it's variants. diff --git a/eth-types/src/sign_types.rs b/eth-types/src/sign_types.rs index e81f9109c7..31df716bb3 100644 --- a/eth-types/src/sign_types.rs +++ b/eth-types/src/sign_types.rs @@ -16,11 +16,7 @@ use ethers_core::{ }; use halo2curves::{ ff::FromUniformBytes, - group::{ - ff::{Field as GroupField, PrimeField}, - prime::PrimeCurveAffine, - Curve, - }, + group::{ff::PrimeField, prime::PrimeCurveAffine, Curve}, secp256k1::{Fp, Fq, Secp256k1Affine}, Coordinates, CurveAffine, }; @@ -207,9 +203,7 @@ pub fn ct_option_ok_or(v: CtOption, err: E) -> Result { /// Return a copy of the serialized public key with swapped Endianness. pub fn pk_bytes_swap_endianness(pk: &[T]) -> [T; 64] { assert_eq!(pk.len(), 64); - let mut pk_swap = <&[T; 64]>::try_from(pk) - .map(|r| r.clone()) - .expect("pk.len() != 64"); + let mut pk_swap = <&[T; 64]>::try_from(pk).cloned().expect("pk.len() != 64"); pk_swap[..32].reverse(); pk_swap[32..].reverse(); pk_swap diff --git a/gadgets/Cargo.toml b/gadgets/Cargo.toml index 4a0f98fede..64b0da74b6 100644 --- a/gadgets/Cargo.toml +++ b/gadgets/Cargo.toml @@ -14,3 +14,6 @@ poseidon-base.workspace = true [dev-dependencies] rand_xorshift.workspace = true rand.workspace = true + +[features] +default = ["halo2_proofs/circuit-params"] diff --git a/gadgets/src/batched_is_zero.rs b/gadgets/src/batched_is_zero.rs index 933cf30adb..f7b684aed2 100644 --- a/gadgets/src/batched_is_zero.rs +++ b/gadgets/src/batched_is_zero.rs @@ -158,7 +158,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/evm_word.rs b/gadgets/src/evm_word.rs index b1ab183e66..cd8da06880 100644 --- a/gadgets/src/evm_word.rs +++ b/gadgets/src/evm_word.rs @@ -177,7 +177,6 @@ mod tests { // commitment which will be provided as public inputs. type Config = (WordConfig, Column); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/is_equal.rs b/gadgets/src/is_equal.rs index 9fab9707c9..9318555369 100644 --- a/gadgets/src/is_equal.rs +++ b/gadgets/src/is_equal.rs @@ -158,7 +158,6 @@ mod tests { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/is_zero.rs b/gadgets/src/is_zero.rs index 3785a6bc69..6ae9668bfb 100644 --- a/gadgets/src/is_zero.rs +++ b/gadgets/src/is_zero.rs @@ -1,8 +1,7 @@ //! IsZero gadget works as follows: //! //! Given a `value` to be checked if it is zero: -//! - witnesses `inv0(value)`, where `inv0(x)` is 0 when `x` = 0, and -//! `1/x` otherwise +//! - witnesses `inv0(value)`, where `inv0(x)` is 0 when `x` = 0, and `1/x` otherwise use crate::Field; use halo2_proofs::{ @@ -222,7 +221,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { @@ -351,7 +349,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/less_than.rs b/gadgets/src/less_than.rs index 573f4df22f..e5ea8a2b0a 100644 --- a/gadgets/src/less_than.rs +++ b/gadgets/src/less_than.rs @@ -253,7 +253,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { @@ -377,7 +376,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/monotone.rs b/gadgets/src/monotone.rs index 8c433dad2e..bc711518bf 100644 --- a/gadgets/src/monotone.rs +++ b/gadgets/src/monotone.rs @@ -8,7 +8,7 @@ use halo2_proofs::{ plonk::{Advice, Column, ConstraintSystem, Error, Expression, Fixed, VirtualCells}, poly::Rotation, }; -use std::{marker::PhantomData, u64}; +use std::marker::PhantomData; #[allow(dead_code)] #[derive(Clone, Debug)] @@ -138,7 +138,6 @@ mod test { { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/gadgets/src/mul_add.rs b/gadgets/src/mul_add.rs index 0f2bc52142..98dbccf183 100644 --- a/gadgets/src/mul_add.rs +++ b/gadgets/src/mul_add.rs @@ -502,7 +502,6 @@ mod test { impl Circuit for TestCircuit { type Config = TestCircuitConfig; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn configure(meta: &mut halo2_proofs::plonk::ConstraintSystem) -> Self::Config { diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index bcbd158762..5e161fc8ae 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(lazy_cell)] //! Integration testing #![deny(rustdoc::broken_intra_doc_links)] diff --git a/integration-tests/tests/circuit_input_builder.rs b/integration-tests/tests/circuit_input_builder.rs index a8ee0a6c3f..2c88ac5d0e 100644 --- a/integration-tests/tests/circuit_input_builder.rs +++ b/integration-tests/tests/circuit_input_builder.rs @@ -1,4 +1,3 @@ -#![feature(lazy_cell)] #![cfg(feature = "circuit_input_builder")] use bus_mapping::circuit_input_builder::{build_state_code_db, BuilderClient, CircuitsParams}; diff --git a/integration-tests/tests/l2_trace.rs b/integration-tests/tests/l2_trace.rs index a32a88e8ca..9e275d6388 100644 --- a/integration-tests/tests/l2_trace.rs +++ b/integration-tests/tests/l2_trace.rs @@ -1,4 +1,3 @@ -#![feature(lazy_cell)] #![cfg(feature = "scroll")] use bus_mapping::{ diff --git a/integration-tests/tests/rpc.rs b/integration-tests/tests/rpc.rs index 706ee59c9d..4b31fe213a 100644 --- a/integration-tests/tests/rpc.rs +++ b/integration-tests/tests/rpc.rs @@ -1,4 +1,3 @@ -#![feature(lazy_cell)] #![cfg(feature = "rpc")] use eth_types::{StorageProof, Word}; diff --git a/mock/src/lib.rs b/mock/src/lib.rs index 5d7c89c2cc..a7e8a1602e 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(lazy_cell)] //! Mock types and functions to generate GethData used for tests use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Word}; diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index e299b7b01b..179c22764d 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -324,6 +324,7 @@ pub mod helpers { /// [`static@MOCK_ACCOUNTS`]: /// - 0x000000000000000000000000000000000cafe111 /// - 0x000000000000000000000000000000000cafe222 + /// /// And injects the provided bytecode into the first one. pub fn account_0_code_account_1_no_code(code: Bytecode) -> impl FnOnce([&mut MockAccount; 2]) { |accs| { @@ -339,8 +340,10 @@ pub mod helpers { /// the receiver is from /// [`static@MOCK_ACCOUNTS`]: /// - 0x000000000000000000000000000000000cafe111 + /// /// and sender is a random wallet account from the first of /// [`static@MOCK_WALLETS`]; + /// /// And injects the provided bytecode into the first one. pub fn account_0_code_wallet_0_no_code(code: Bytecode) -> impl FnOnce([&mut MockAccount; 2]) { |accs| { diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 987b86ef2c..a51f7c5b6b 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -26,7 +26,7 @@ git-version = "0.3.5" hex.workspace = true itertools.workspace = true log.workspace = true -log4rs = { version = "1.2.0", default_features = false, features = ["console_appender", "file_appender"] } +log4rs = { version = "1.2.0", default-features = false, features = ["console_appender", "file_appender"] } num-bigint.workspace = true rand.workspace = true rand_xorshift.workspace = true diff --git a/prover/src/common/verifier.rs b/prover/src/common/verifier.rs index 053d6fccc6..5474811ecd 100644 --- a/prover/src/common/verifier.rs +++ b/prover/src/common/verifier.rs @@ -17,7 +17,7 @@ pub struct Verifier<'params, C: CircuitExt> { phantom: PhantomData, } -impl<'params, C: CircuitExt> Verifier<'params, C> { +impl<'params, C: CircuitExt> Verifier<'params, C> { pub fn new(params: &'params ParamsKZG, vk: VerifyingKey) -> Self { Self { params, diff --git a/prover/src/io.rs b/prover/src/io.rs index 4ed0b46a6b..9b42e5a91b 100644 --- a/prover/src/io.rs +++ b/prover/src/io.rs @@ -100,8 +100,8 @@ pub fn serialize_vk(vk: &VerifyingKey) -> Vec { result } -pub fn deserialize_vk>(raw_vk: &[u8]) -> VerifyingKey { - VerifyingKey::::read::<_, C>(&mut Cursor::new(raw_vk), SerdeFormat::Processed) +pub fn deserialize_vk>(raw_vk: &[u8]) -> VerifyingKey { + VerifyingKey::::read::<_, C>(&mut Cursor::new(raw_vk), SerdeFormat::Processed, ()) .unwrap() } diff --git a/prover/src/lib.rs b/prover/src/lib.rs index 64a9a14da2..f3dca5af1e 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -1,5 +1,3 @@ -#![feature(lazy_cell)] - /// Meaning of each circuit: /// inner: first layer EVM super circuit /// layer1: compression circuit of "inner" diff --git a/prover/src/proof.rs b/prover/src/proof.rs index 5e662794df..1a0a3a2c95 100644 --- a/prover/src/proof.rs +++ b/prover/src/proof.rs @@ -92,7 +92,7 @@ impl Proof { &self.vk } - pub fn vk>(&self) -> VerifyingKey { + pub fn vk>(&self) -> VerifyingKey { deserialize_vk::(&self.vk) } } diff --git a/prover/src/zkevm/circuit.rs b/prover/src/zkevm/circuit.rs index 8139e22cb9..302a7195fe 100644 --- a/prover/src/zkevm/circuit.rs +++ b/prover/src/zkevm/circuit.rs @@ -15,7 +15,7 @@ pub use zkevm_circuits::super_circuit::params::{MAX_CALLDATA, MAX_INNER_BLOCKS, /// circuits from traces. pub trait TargetCircuit { /// The actual inner circuit that implements Circuit trait. - type Inner: CircuitExt + SubCircuit; + type Inner: CircuitExt + SubCircuit; /// Generate a dummy circuit with an empty trace. /// This is useful for generating vk and pk. diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 27c108be5c..0000000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -nightly-2023-12-03 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000000..804a8d6114 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly-2024-07-07" diff --git a/testool/Config.toml b/testool/Config.toml index 64c6a15f92..ca7e76b5d0 100644 --- a/testool/Config.toml +++ b/testool/Config.toml @@ -87,11 +87,6 @@ max_gas = 0 max_steps = 100000 ignore_tests = [] -[[set]] -id = "sigkill" -desc = "tests that sigkill" -tests = [] - # skipped tests, do not need to be fixed -------------------------------------------------- # ignored paths ------------------------------------------------------------------------- diff --git a/testool/src/abi.rs b/testool/src/abi.rs index aec8f5041a..46830b67aa 100644 --- a/testool/src/abi.rs +++ b/testool/src/abi.rs @@ -5,7 +5,7 @@ use std::cell::RefCell; thread_local! { /// dirty hack to enable normalization - pub static ENABLE_NORMALIZE: RefCell = RefCell::new(true); + pub static ENABLE_NORMALIZE: RefCell = const { RefCell::new(true) }; } /// encodes an abi call (e.g. "f(uint) 1") diff --git a/testool/src/compiler.rs b/testool/src/compiler.rs index 50492af89c..2ee90a42c1 100644 --- a/testool/src/compiler.rs +++ b/testool/src/compiler.rs @@ -48,7 +48,6 @@ impl Cache { let entry = format!("{}={}\n", hex::encode(code_hash), hex::encode(&bytecode)); std::fs::OpenOptions::new() .read(true) - .write(true) .create(true) .append(true) .open(&self.path)? diff --git a/testool/src/config.rs b/testool/src/config.rs index 6ac56959e7..b8f6f3d8bd 100644 --- a/testool/src/config.rs +++ b/testool/src/config.rs @@ -6,7 +6,6 @@ const CONFIG_FILE: &str = "Config.toml"; #[derive(Debug, Clone, Deserialize)] pub struct Config { pub suite: Vec, - pub set: Vec, #[serde(default)] pub skip_paths: Vec, #[serde(default)] @@ -64,13 +63,6 @@ impl Config { } } -#[derive(Debug, Clone, Deserialize)] -pub struct TestsSet { - pub id: String, - pub desc: Option, - pub tests: Vec, -} - #[derive(Debug, Clone, Deserialize)] pub struct SkipPaths { pub desc: Option, diff --git a/testool/src/main.rs b/testool/src/main.rs index f91de184f9..b972bf83b6 100644 --- a/testool/src/main.rs +++ b/testool/src/main.rs @@ -1,5 +1,3 @@ -#![feature(lazy_cell)] - /// Execute the bytecode from an empty state and run the EVM and State circuits mod abi; mod compiler; diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 065cd7ea4d..83a04f1f12 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -536,7 +536,7 @@ pub fn run_test( }; #[cfg(feature = "scroll")] - let (scroll_trace, witness_block, mut builder) = { + let (_scroll_trace, witness_block, mut builder) = { let result = trace_config_to_witness_block_l2( trace_config.clone(), st.clone(), @@ -643,7 +643,10 @@ pub fn run_test( #[cfg(feature = "chunk-prove")] { eth_types::constants::set_env_coinbase(&st.env.current_coinbase); - prover::test::chunk_prove(&test_id, prover::ChunkProvingTask::from(vec![scroll_trace])); + prover::test::chunk_prove( + &test_id, + prover::ChunkProvingTask::from(vec![_scroll_trace]), + ); } #[cfg(not(any(feature = "inner-prove", feature = "chunk-prove")))] diff --git a/testool/src/statetest/results.rs b/testool/src/statetest/results.rs index 2c71e42b3f..dead6212ce 100644 --- a/testool/src/statetest/results.rs +++ b/testool/src/statetest/results.rs @@ -403,7 +403,6 @@ impl Results { if let Some(path) = &self.cache { let mut file = std::fs::OpenOptions::new() .read(true) - .write(true) .create(true) .append(true) .open(path)?; @@ -452,7 +451,6 @@ impl Results { if let Some(path) = &self.cache { std::fs::OpenOptions::new() .read(true) - .write(true) .create(true) .append(true) .open(path)? diff --git a/testool/src/statetest/suite.rs b/testool/src/statetest/suite.rs index 6a6006829d..3604c53789 100644 --- a/testool/src/statetest/suite.rs +++ b/testool/src/statetest/suite.rs @@ -19,8 +19,26 @@ pub fn load_statetests_suite( config: Config, compiler: Compiler, ) -> Result> { - let skip_paths: Vec<&String> = config.skip_paths.iter().flat_map(|t| &t.paths).collect(); - let skip_tests: Vec<&String> = config.skip_tests.iter().flat_map(|t| &t.tests).collect(); + let skip_paths: Vec<&String> = config + .skip_paths + .iter() + .flat_map(|t| { + t.desc.as_ref().inspect(|desc| { + log::info!("Skipping paths: {}", desc); + }); + &t.paths + }) + .collect(); + let skip_tests: Vec<&String> = config + .skip_tests + .iter() + .flat_map(|t| { + t.desc.as_ref().inspect(|desc| { + log::info!("Skipping tests: {}", desc); + }); + &t.tests + }) + .collect(); let tcs = suite .paths diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index 22e10d0e30..c97a865569 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -587,6 +587,7 @@ mod test { statetest::{run_test, CircuitsConfig, StateTestError}, }; use eth_types::{address, AccessList, AccessListItem}; + use std::fmt::{Display, Formatter}; const TEMPLATE: &str = r#" arith: @@ -700,23 +701,27 @@ arith: } } } - impl ToString for Template { - fn to_string(&self) -> String { - TEMPLATE - .replace("{{ gas_limit }}", &self.gas_limit) - .replace("{{ pre_code }}", &self.pre_code) - .replace("{{ res_storage }}", &self.res_storage) - .replace("{{ res_balance }}", &self.res_balance) - .replace("{{ res_code }}", &self.res_code) - .replace("{{ res_nonce }}", &self.res_nonce) - .replace( - "{{ expect_exception_network }}", - if self.res_exception { - ">=Istanbul" - } else { - "Istanbul" - }, - ) + impl Display for Template { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + TEMPLATE + .replace("{{ gas_limit }}", &self.gas_limit) + .replace("{{ pre_code }}", &self.pre_code) + .replace("{{ res_storage }}", &self.res_storage) + .replace("{{ res_balance }}", &self.res_balance) + .replace("{{ res_code }}", &self.res_code) + .replace("{{ res_nonce }}", &self.res_nonce) + .replace( + "{{ expect_exception_network }}", + if self.res_exception { + ">=Istanbul" + } else { + "Istanbul" + }, + ) + ) } } @@ -980,7 +985,6 @@ arith: Ok(()) } - #[cfg(feature = "warn-unimplemented")] #[test] fn fail_bad_code() -> Result<()> { let mut tc = YamlStateTestBuilder::new(&Compiler::default()).load_yaml( diff --git a/testool/tests b/testool/tests index 066a5878da..fd26aad70e 160000 --- a/testool/tests +++ b/testool/tests @@ -1 +1 @@ -Subproject commit 066a5878da000bbf0ff95205c62a6c5c91ca6f52 +Subproject commit fd26aad70e24f042fcd135b2f0338b1c6bf1a324 diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index f691d33413..b79c83578b 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -54,7 +54,7 @@ cli-table = "0.4" paste = "1.0" [features] -default = ["test", "test-circuits", "debug-annotations", "parallel_syn"] +default = ["test", "test-circuits", "debug-annotations", "parallel_syn", "halo2_proofs/circuit-params"] test = ["mock", "bus-mapping/test"] scroll = ["bus-mapping/scroll", "eth-types/scroll", "mock?/scroll", "zktrie", "poseidon-codehash", "dual-bytecode"] diff --git a/zkevm-circuits/src/bytecode_circuit/dev.rs b/zkevm-circuits/src/bytecode_circuit/dev.rs index 9f2ac61f05..4334714151 100644 --- a/zkevm-circuits/src/bytecode_circuit/dev.rs +++ b/zkevm-circuits/src/bytecode_circuit/dev.rs @@ -27,7 +27,6 @@ pub type CircuitConfig = super::circuit::BytecodeCircuitConfig; impl Circuit for BytecodeCircuit { type Config = (CircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/copy_circuit/dev.rs b/zkevm-circuits/src/copy_circuit/dev.rs index 9d3babc52a..eedd76c8b0 100644 --- a/zkevm-circuits/src/copy_circuit/dev.rs +++ b/zkevm-circuits/src/copy_circuit/dev.rs @@ -14,7 +14,6 @@ use halo2_proofs::{ impl Circuit for CopyCircuit { type Config = (CopyCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/ecc_circuit/dev.rs b/zkevm-circuits/src/ecc_circuit/dev.rs index 6e74489861..478d127dff 100644 --- a/zkevm-circuits/src/ecc_circuit/dev.rs +++ b/zkevm-circuits/src/ecc_circuit/dev.rs @@ -14,6 +14,7 @@ use super::{EccCircuit, EccCircuitConfig, EccCircuitConfigArgs}; impl Circuit for EccCircuit { type Config = (EccCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self::default() diff --git a/zkevm-circuits/src/ecc_circuit/test.rs b/zkevm-circuits/src/ecc_circuit/test.rs index a077b9e235..94f490c5f3 100644 --- a/zkevm-circuits/src/ecc_circuit/test.rs +++ b/zkevm-circuits/src/ecc_circuit/test.rs @@ -1,3 +1,4 @@ +#![allow(clippy::needless_borrows_for_generic_args)] use std::{ marker::PhantomData, ops::{Add, Mul, Neg}, diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 298c3b33f6..2adbf1a792 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -416,6 +416,7 @@ pub(crate) mod cached { impl Circuit for EvmCircuitCached { type Config = (EvmCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self(self.0.without_witnesses()) @@ -452,7 +453,6 @@ use crate::util::MockChallenges as Challenges; impl Circuit for EvmCircuit { type Config = (EvmCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs index 2d006b44cf..94be1f8958 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_precompile.rs @@ -69,7 +69,7 @@ impl ExecutionGadget for ErrorOOGPrecompileGadget { }); // calculate required gas for precompile - let precompiles_required_gas = vec![ + let precompiles_required_gas = [ ( addr_bits.value_equals(PrecompileCalls::Ecrecover), GasCost::PRECOMPILE_ECRECOVER_BASE.expr(), diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/comparison.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/comparison.rs index dbcc06223d..d935df6b05 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/comparison.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/comparison.rs @@ -24,7 +24,7 @@ impl ComparisonGadget { rhs: Expression, ) -> Self { let lt = LtGadget::::construct(cb, lhs, rhs); - let eq = IsZeroGadget::::construct(cb, sum::expr(<.diff_bytes())); + let eq = IsZeroGadget::::construct(cb, sum::expr(lt.diff_bytes())); Self { lt, eq } } diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs index 256bc3007c..72a3104813 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs @@ -103,7 +103,6 @@ impl UnitTestMathGadgetBaseCircuit { impl> Circuit for UnitTestMathGadgetBaseCircuit { type Config = (UnitTestMathGadgetBaseCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/exp_circuit/dev.rs b/zkevm-circuits/src/exp_circuit/dev.rs index 4a6e84df12..04a831213d 100644 --- a/zkevm-circuits/src/exp_circuit/dev.rs +++ b/zkevm-circuits/src/exp_circuit/dev.rs @@ -13,7 +13,6 @@ use halo2_proofs::{ impl Circuit for ExpCircuit { type Config = (ExpCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/keccak_circuit/dev.rs b/zkevm-circuits/src/keccak_circuit/dev.rs index 86c9b795bf..06998c2b7e 100644 --- a/zkevm-circuits/src/keccak_circuit/dev.rs +++ b/zkevm-circuits/src/keccak_circuit/dev.rs @@ -13,7 +13,6 @@ use halo2_proofs::{ impl Circuit for KeccakCircuit { type Config = (KeccakCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/keccak_circuit/table.rs b/zkevm-circuits/src/keccak_circuit/table.rs index 25f3878e71..a7dba481b8 100644 --- a/zkevm-circuits/src/keccak_circuit/table.rs +++ b/zkevm-circuits/src/keccak_circuit/table.rs @@ -257,7 +257,6 @@ mod tests { impl Circuit for TableTestCircuit { type Config = [TableColumn; 2]; type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/lib.rs b/zkevm-circuits/src/lib.rs index f3696d1934..92626dde20 100644 --- a/zkevm-circuits/src/lib.rs +++ b/zkevm-circuits/src/lib.rs @@ -3,11 +3,10 @@ // We should try not to use incomplete_features unless it is really really needed and cannot be // avoided like `adt_const_params` used by DummyGadget #![allow(incomplete_features)] +#![allow(clippy::doc_lazy_continuation)] // Needed by DummyGadget in evm circuit #![feature(adt_const_params)] #![feature(trait_alias)] -#![feature(slice_group_by)] -#![feature(lazy_cell)] // Needed by some builder patterns in testing modules. #![cfg_attr(docsrs, feature(doc_cfg))] // Temporary until we have more of the crate implemented. diff --git a/zkevm-circuits/src/modexp_circuit/dev.rs b/zkevm-circuits/src/modexp_circuit/dev.rs index 88ca65b416..85578ba3f3 100644 --- a/zkevm-circuits/src/modexp_circuit/dev.rs +++ b/zkevm-circuits/src/modexp_circuit/dev.rs @@ -9,7 +9,6 @@ use halo2_proofs::{ impl Circuit for ModExpCircuit { type Config = (ModExpCircuitConfig, MockChallenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/mpt_circuit.rs b/zkevm-circuits/src/mpt_circuit.rs index 39f6694f13..be64687fe4 100644 --- a/zkevm-circuits/src/mpt_circuit.rs +++ b/zkevm-circuits/src/mpt_circuit.rs @@ -166,7 +166,6 @@ impl SubCircuit for MptCircuit { impl Circuit for MptCircuit { type Config = (MptCircuitConfig, PoseidonTable, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/pi_circuit/dev.rs b/zkevm-circuits/src/pi_circuit/dev.rs index f7c130075f..9144749f24 100644 --- a/zkevm-circuits/src/pi_circuit/dev.rs +++ b/zkevm-circuits/src/pi_circuit/dev.rs @@ -78,7 +78,6 @@ impl, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/poseidon_circuit.rs b/zkevm-circuits/src/poseidon_circuit.rs index f4773931cb..b34ef65de4 100644 --- a/zkevm-circuits/src/poseidon_circuit.rs +++ b/zkevm-circuits/src/poseidon_circuit.rs @@ -208,7 +208,6 @@ impl SubCircuit for PoseidonCircuit { impl Circuit for PoseidonCircuit { type Config = (PoseidonCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/rlp_circuit_fsm/dev.rs b/zkevm-circuits/src/rlp_circuit_fsm/dev.rs index 8e7167e8c3..81a94fcd7d 100644 --- a/zkevm-circuits/src/rlp_circuit_fsm/dev.rs +++ b/zkevm-circuits/src/rlp_circuit_fsm/dev.rs @@ -12,7 +12,6 @@ use halo2_proofs::{ impl Circuit for RlpCircuit { type Config = (RlpCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/sha256_circuit/circuit.rs b/zkevm-circuits/src/sha256_circuit/circuit.rs index 76e15c63b5..22f8f962f2 100644 --- a/zkevm-circuits/src/sha256_circuit/circuit.rs +++ b/zkevm-circuits/src/sha256_circuit/circuit.rs @@ -1134,6 +1134,7 @@ mod tests { impl Circuit for MyCircuit { type Config = CircuitConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() @@ -1322,8 +1323,10 @@ mod tests { assert_eq!(prover.verify(), Ok(())); } + /* + #[ignore] #[test] - #[cfg(feature = "dev-graph")] + // Draw a circuit graph fn print_sha256_circuit() { use plotters::prelude::*; @@ -1351,4 +1354,5 @@ mod tests { }; assert_eq!(prover.verify(), Ok(())); } + */ } diff --git a/zkevm-circuits/src/sha256_circuit/test.rs b/zkevm-circuits/src/sha256_circuit/test.rs index 9a85cc0e51..cd253ccd35 100644 --- a/zkevm-circuits/src/sha256_circuit/test.rs +++ b/zkevm-circuits/src/sha256_circuit/test.rs @@ -32,6 +32,7 @@ struct MyCircuit { impl Circuit for MyCircuit { type Config = (CircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { unimplemented!() diff --git a/zkevm-circuits/src/sig_circuit/dev.rs b/zkevm-circuits/src/sig_circuit/dev.rs index 1555db56c7..2e9e3a4e61 100644 --- a/zkevm-circuits/src/sig_circuit/dev.rs +++ b/zkevm-circuits/src/sig_circuit/dev.rs @@ -39,6 +39,7 @@ impl SigCircuitTesterConfig { impl Circuit for SigCircuit { type Config = SigCircuitTesterConfig; type FloorPlanner = SimpleFloorPlanner; + type Params = (); fn without_witnesses(&self) -> Self { Self::default() diff --git a/zkevm-circuits/src/state_circuit/dev.rs b/zkevm-circuits/src/state_circuit/dev.rs index 4a186f199f..10602bbb25 100644 --- a/zkevm-circuits/src/state_circuit/dev.rs +++ b/zkevm-circuits/src/state_circuit/dev.rs @@ -16,7 +16,6 @@ where { type Config = (StateCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/super_circuit.rs b/zkevm-circuits/src/super_circuit.rs index c237d3c4a1..f9cb286a0d 100644 --- a/zkevm-circuits/src/super_circuit.rs +++ b/zkevm-circuits/src/super_circuit.rs @@ -815,7 +815,6 @@ impl< { type Config = (SuperCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { diff --git a/zkevm-circuits/src/tx_circuit.rs b/zkevm-circuits/src/tx_circuit.rs index d7cea0f8bd..6703662789 100644 --- a/zkevm-circuits/src/tx_circuit.rs +++ b/zkevm-circuits/src/tx_circuit.rs @@ -4036,8 +4036,7 @@ impl TxCircuit { .txs .iter() .chain(iter::once(&padding_tx)) - .enumerate() - .map(|(_, tx)| { + .map(|tx| { if tx.tx_type.is_l1_msg() { Ok(SignData::default()) } else { diff --git a/zkevm-circuits/src/tx_circuit/dev.rs b/zkevm-circuits/src/tx_circuit/dev.rs index 9afdbbc252..1e2bb9cbb0 100644 --- a/zkevm-circuits/src/tx_circuit/dev.rs +++ b/zkevm-circuits/src/tx_circuit/dev.rs @@ -159,7 +159,6 @@ impl SubCircuit for TxCircuitTester { impl Circuit for TxCircuitTester { type Config = (TxCircuitTesterConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - #[cfg(feature = "circuit-params")] type Params = (); fn without_witnesses(&self) -> Self { From 724c1012b325d09f835220221e2d3e7abf285227 Mon Sep 17 00:00:00 2001 From: Ray Gao Date: Thu, 12 Sep 2024 11:40:13 -0400 Subject: [PATCH 2/5] Add pairing check in compression circuit construction for all accumulators --- Cargo.lock | 2 +- compression/src/circuit.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c85e049f3..05ce52368a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1016,7 +1016,7 @@ dependencies = [ [[package]] name = "compression" -version = "0.12.0" +version = "0.14.0" dependencies = [ "aggregator", "ark-std 0.3.0", diff --git a/compression/src/circuit.rs b/compression/src/circuit.rs index 79d6c5eae5..d0ed81eb27 100644 --- a/compression/src/circuit.rs +++ b/compression/src/circuit.rs @@ -138,22 +138,22 @@ pub(crate) fn verify_snark_accumulator_pairing<'a>( &mut transcript_read, ); - let acc = Shplonk::succinct_verify(&svk, &snark.protocol, &snark.instances, &proof)[0].clone(); - - let KzgAccumulator { lhs, rhs } = acc; - let left = Bn256::pairing(&lhs, ¶ms.g2()); - let right = Bn256::pairing(&rhs, ¶ms.s_g2()); - - log::trace!("compression circuit accumulator pre-check: left {:?}", left); - log::trace!( - "compression circuit accumulator pre-check: right {:?}", - right - ); + for (idx, acc) in Shplonk::succinct_verify(&svk, &snark.protocol, &snark.instances, &proof).into_iter().enumerate() { + let KzgAccumulator { lhs, rhs } = acc; + let left = Bn256::pairing(&lhs, ¶ms.g2()); + let right = Bn256::pairing(&rhs, ¶ms.s_g2()); + + log::trace!("compression circuit accumulator pre-check: left {:?}", left); + log::trace!( + "compression circuit accumulator pre-check: right {:?}", + right + ); - if left != right { - return Err(snark_verifier::Error::AssertionFailure(format!( - "accumulator check failed {left:?} {right:?}", - ))); + if left != right { + return Err(snark_verifier::Error::AssertionFailure(format!( + "accumulator check failed in compression circuit construction {left:?} {right:?}, {idx:?}", + ))); + } } Ok(snark) From 8905ed3028c1c7b01adc5d3aa6dd7e6bd0e96d08 Mon Sep 17 00:00:00 2001 From: Ray Gao Date: Thu, 12 Sep 2024 11:41:46 -0400 Subject: [PATCH 3/5] fmt --- compression/src/circuit.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compression/src/circuit.rs b/compression/src/circuit.rs index d0ed81eb27..a094b3c4db 100644 --- a/compression/src/circuit.rs +++ b/compression/src/circuit.rs @@ -138,7 +138,10 @@ pub(crate) fn verify_snark_accumulator_pairing<'a>( &mut transcript_read, ); - for (idx, acc) in Shplonk::succinct_verify(&svk, &snark.protocol, &snark.instances, &proof).into_iter().enumerate() { + for (idx, acc) in Shplonk::succinct_verify(&svk, &snark.protocol, &snark.instances, &proof) + .into_iter() + .enumerate() + { let KzgAccumulator { lhs, rhs } = acc; let left = Bn256::pairing(&lhs, ¶ms.g2()); let right = Bn256::pairing(&rhs, ¶ms.s_g2()); From b18623f05718c2875799b57ff49eead0409dbb2c Mon Sep 17 00:00:00 2001 From: Ray Gao Date: Thu, 12 Sep 2024 12:01:59 -0400 Subject: [PATCH 4/5] Resolve conflict and rebuild --- Cargo.lock | 109 ++++++------ aggregator/src/aggregation/rlc/gates.rs | 5 +- aggregator/src/compression/circuit.rs | 225 ------------------------ eth-types/src/sign_types.rs | 2 +- 4 files changed, 63 insertions(+), 278 deletions(-) delete mode 100644 aggregator/src/compression/circuit.rs diff --git a/Cargo.lock b/Cargo.lock index 3174b17523..7311f3ac62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ version = "0.14.0" dependencies = [ "ark-std 0.3.0", "bitstream-io", - "c-kzg 1.0.2", + "c-kzg 1.0.3", "csv", "ctor", "encoder", @@ -103,14 +103,12 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-eips" version = "0.2.1" -version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" -checksum = "d9431c99a3b3fe606ede4b3d4043bdfbcb780c45b8d8d226c3804e2b75cfbe68" dependencies = [ "alloy-primitives 0.7.7", "alloy-rlp", - "c-kzg 1.0.2", + "c-kzg 1.0.3", "k256", "once_cell", "serde", @@ -243,9 +241,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.87" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +checksum = "4e1496f8fb1fbf272686b8d37f523dab3e4a7443300055e74cdaa449f3114356" [[package]] name = "arc-swap" @@ -527,7 +525,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.60", + "syn 2.0.77", "which", ] @@ -1280,7 +1278,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -1302,7 +1300,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -2157,14 +2155,14 @@ dependencies = [ [[package]] name = "getset" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +checksum = "f636605b743120a8d32ed92fc27b6cde1a769f8f936c065151eb66f88ded513c" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -2242,7 +2240,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2406,7 +2404,7 @@ dependencies = [ [[package]] name = "halo2curves" version = "0.1.0" -source = "git+https://github.com/scroll-tech/halo2curves?branch=v0.1.0#112f5b9bf27f6b1708ba7d1c2fc14cb3c6e55604" +source = "git+https://github.com/scroll-tech/halo2curves?branch=use_pairing#8e0020d95b86b8e1a5d37083ae063386730c29f6" dependencies = [ "blake2b_simd", "bls12_381", @@ -2853,9 +2851,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422fbc7ff2f2f5bdffeb07718e5a5324dca72b0c9293d50df4026652385e3314" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -2908,7 +2906,17 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" name = "libc" version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" + +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if 1.0.0", + "windows-targets 0.52.6", +] [[package]] name = "libm" @@ -3474,7 +3482,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.5.0", ] [[package]] @@ -3724,27 +3732,25 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.77", ] [[package]] @@ -3902,9 +3908,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -4053,10 +4059,10 @@ dependencies = [ [[package]] name = "revm-precompile" version = "9.2.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#03b072906faf3f826e4daf38ca0be69a73d90ce3" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#5e215742c4d9d771f73d74fcba39628b1a2e3452" dependencies = [ "aurora-engine-modexp", - "c-kzg 1.0.2", + "c-kzg 1.0.3", "cfg-if 1.0.0", "k256", "once_cell", @@ -4080,7 +4086,7 @@ dependencies = [ "bitvec", "c-kzg 0.1.1", "enumn", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "hex", "once_cell", ] @@ -4088,14 +4094,14 @@ dependencies = [ [[package]] name = "revm-primitives" version = "7.1.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#03b072906faf3f826e4daf38ca0be69a73d90ce3" +source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v40#5e215742c4d9d771f73d74fcba39628b1a2e3452" dependencies = [ "alloy-eips", "alloy-primitives 0.7.7", "auto_impl", "bitflags 2.6.0", "bitvec", - "c-kzg 1.0.2", + "c-kzg 1.0.3", "cfg-if 1.0.0", "derive_more", "dyn-clone", @@ -4263,9 +4269,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -4448,7 +4454,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" dependencies = [ "rand", - "secp256k1-sys 0.10.0", + "secp256k1-sys 0.10.1", ] [[package]] @@ -4471,9 +4477,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" dependencies = [ "cc", ] @@ -4636,7 +4642,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -4685,9 +4691,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d79b758b7cb2085612b11a235055e485605a5103faccdd633f35bd7aee69dd" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" dependencies = [ "cc", "cfg-if 1.0.0", @@ -4782,7 +4788,8 @@ dependencies = [ "bincode", "ethereum-types", "ff", - "halo2-base", + "halo2-base 0.2.2", + "halo2_proofs", "hex", "itertools 0.12.1", "log", @@ -5095,7 +5102,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", ] [[package]] @@ -5106,7 +5113,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.77", "test-case-core", ] @@ -5343,7 +5350,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -5356,7 +5363,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "toml_datetime", "winnow 0.6.18", ] @@ -5473,9 +5480,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" diff --git a/aggregator/src/aggregation/rlc/gates.rs b/aggregator/src/aggregation/rlc/gates.rs index 94f781b1e6..de2a91ceb9 100644 --- a/aggregator/src/aggregation/rlc/gates.rs +++ b/aggregator/src/aggregation/rlc/gates.rs @@ -1,7 +1,10 @@ use ethers_core::utils::keccak256; use halo2_proofs::{ circuit::{AssignedCell, Cell, Region, RegionIndex, Value}, - halo2curves::bn256::Fr, + halo2curves::{ + ff::Field, + bn256::Fr + }, plonk::Error, }; use zkevm_circuits::util::Challenges; diff --git a/aggregator/src/compression/circuit.rs b/aggregator/src/compression/circuit.rs deleted file mode 100644 index 045a9bb043..0000000000 --- a/aggregator/src/compression/circuit.rs +++ /dev/null @@ -1,225 +0,0 @@ -//! Circuit implementation for compression circuit. - -use std::fs::File; - -use ark_std::{end_timer, start_timer}; -use halo2_proofs::{ - circuit::{Cell, Layouter, SimpleFloorPlanner, Value}, - halo2curves::bn256::G1Affine, - plonk::{Circuit, ConstraintSystem, Error}, -}; -use rand::Rng; -use snark_verifier::{ - loader::halo2::{ - halo2_ecc::{ - halo2_base, - halo2_base::{ - halo2_proofs::{ - halo2curves::bn256::{Bn256, Fr}, - poly::{commitment::ParamsProver, kzg::commitment::ParamsKZG}, - }, - Context, ContextParams, - }, - }, - Halo2Loader, - }, - pcs::kzg::{Bdfg21, Kzg, KzgSuccinctVerifyingKey}, -}; -use snark_verifier_sdk::{aggregate, flatten_accumulator, types::Svk, Snark, SnarkWitness}; - -use crate::{core::extract_proof_and_instances_with_pairing_check, param::ConfigParams, ACC_LEN}; - -use super::config::CompressionConfig; - -/// Input a proof, this compression circuit generates a new proof that may have smaller size. -/// -/// It re-exposes same public inputs from the input snark. -/// All this circuit does is to reduce the proof size. -#[derive(Clone, Debug)] -pub struct CompressionCircuit { - pub(crate) svk: KzgSuccinctVerifyingKey, - pub(crate) snark: SnarkWitness, - /// whether this circuit compresses a fresh snark - pub(crate) has_accumulator: bool, - /// instances, flattened. - /// It re-exposes same public inputs from the input snark. - /// If the previous snark is already a compressed, this flattened_instances will - /// exclude the previous accumulator. - pub(crate) flattened_instances: Vec, - // accumulation scheme proof, private input - pub(crate) as_proof: Value>, -} - -impl Circuit for CompressionCircuit { - type Config = CompressionConfig; - type FloorPlanner = SimpleFloorPlanner; - type Params = (); - - fn without_witnesses(&self) -> Self { - let flattened_instances = self - .snark - .instances - .iter() - .flat_map(|instance| instance.iter().map(|_| Fr::zero())) - .collect(); - - Self { - svk: self.svk, - snark: SnarkWitness::without_witnesses(&self.snark), - has_accumulator: false, - flattened_instances, - as_proof: Value::unknown(), - } - } - - fn configure(meta: &mut ConstraintSystem) -> Self::Config { - // Too bad that configure function doesn't take additional input - // it would be nicer to load parameters from API rather than ENV - let path = std::env::var("COMPRESSION_CONFIG") - .unwrap_or_else(|_| "configs/compression_wide.config".to_owned()); - let params: ConfigParams = serde_json::from_reader( - File::open(path.as_str()).unwrap_or_else(|_| panic!("{path:?} does not exist")), - ) - .unwrap_or_else(|_| ConfigParams::default_compress_wide_param()); - - log::info!( - "compression circuit configured with k = {} and {:?} advice columns", - params.degree, - params.num_advice - ); - - // circuit configuration is built from config with given num columns etc - // can be wide or thin circuit - Self::Config::configure(meta, params) - } - - fn synthesize( - &self, - config: Self::Config, - mut layouter: impl Layouter, - ) -> Result<(), Error> { - let witness_time = start_timer!(|| "synthesize | compression Circuit"); - config - .range() - .load_lookup_table(&mut layouter) - .expect("load range lookup table"); - - let mut first_pass = halo2_base::SKIP_FIRST_PASS; - - let instances = layouter.assign_region( - || "compression circuit", - |region| -> Result, Error> { - if first_pass { - first_pass = false; - return Ok(vec![]); - } - let mut instances = vec![]; - let ctx = Context::new( - region, - ContextParams { - max_rows: config.gate().max_rows, - num_context_ids: 1, - fixed_columns: config.gate().constants.clone(), - }, - ); - - let ecc_chip = config.ecc_chip(); - let loader = Halo2Loader::new(ecc_chip, ctx); - let (assigned_instances, acc) = aggregate::>( - &self.svk, - &loader, - &[self.snark.clone()], - self.as_proof(), - ); - - // instance of the compression circuit is defined as - // - accumulators - // - re-export the public input from snark - instances.extend( - flatten_accumulator(acc) - .iter() - .map(|assigned| assigned.cell()), - ); - // - if the snark is not a fresh one, assigned_instances already contains an - // accumulator so we want to skip the first 12 elements from the public input - let skip = if self.has_accumulator { ACC_LEN } else { 0 }; - instances.extend(assigned_instances.iter().flat_map(|instance_column| { - instance_column.iter().skip(skip).map(|x| x.cell()) - })); - - config.range().finalize(&mut loader.ctx_mut()); - - loader.ctx_mut().print_stats(&["Range"]); - Ok(instances) - }, - )?; - - // Expose instances - for (i, cell) in instances.into_iter().enumerate() { - layouter.constrain_instance(cell, config.instance, i)?; - } - - end_timer!(witness_time); - Ok(()) - } -} - -impl CompressionCircuit { - /// Build a new circuit from a snark, with a flag whether this snark has been compressed before - pub fn new( - params: &ParamsKZG, - snark: Snark, - has_accumulator: bool, - rng: impl Rng + Send, - ) -> Result { - let svk = params.get_g()[0].into(); - - // for the proof compression, only ONE snark is under accumulation - // it is turned into an accumulator via KzgAs accumulation scheme - // in case not first time: - log::trace!("compression circuit pairing check"); - let (as_proof, acc_instances) = - extract_proof_and_instances_with_pairing_check(params, &[snark.clone()], rng)?; - - // skip the old accumulator if exists - let skip = if has_accumulator { ACC_LEN } else { 0 }; - let snark_instance = snark - .instances - .iter() - .flat_map(|instance| instance.iter().skip(skip)); - - let flattened_instances = acc_instances - .iter() - .chain(snark_instance) - .cloned() - .collect::>(); - - { - log::trace!("flattened instances:"); - for i in flattened_instances.iter() { - log::trace!("{:?}", i); - } - } - - Ok(Self { - svk, - snark: snark.into(), - has_accumulator, - flattened_instances, - as_proof: Value::known(as_proof), - }) - } - - pub fn succinct_verifying_key(&self) -> &Svk { - &self.svk - } - - pub fn snark(&self) -> &SnarkWitness { - &self.snark - } - - pub fn as_proof(&self) -> Value<&[u8]> { - self.as_proof.as_ref().map(Vec::as_slice) - } -} - diff --git a/eth-types/src/sign_types.rs b/eth-types/src/sign_types.rs index 31df716bb3..fac4d6efff 100644 --- a/eth-types/src/sign_types.rs +++ b/eth-types/src/sign_types.rs @@ -15,7 +15,7 @@ use ethers_core::{ utils::keccak256, }; use halo2curves::{ - ff::FromUniformBytes, + ff::{Field, FromUniformBytes}, group::{ff::PrimeField, prime::PrimeCurveAffine, Curve}, secp256k1::{Fp, Fq, Secp256k1Affine}, Coordinates, CurveAffine, From af9a9cd07fb8133eb483b22689b3eb5bf32e7b1e Mon Sep 17 00:00:00 2001 From: Ray Gao Date: Thu, 12 Sep 2024 12:03:01 -0400 Subject: [PATCH 5/5] fmt --- aggregator/src/aggregation/rlc/gates.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aggregator/src/aggregation/rlc/gates.rs b/aggregator/src/aggregation/rlc/gates.rs index de2a91ceb9..28a6753c4b 100644 --- a/aggregator/src/aggregation/rlc/gates.rs +++ b/aggregator/src/aggregation/rlc/gates.rs @@ -1,10 +1,7 @@ use ethers_core::utils::keccak256; use halo2_proofs::{ circuit::{AssignedCell, Cell, Region, RegionIndex, Value}, - halo2curves::{ - ff::Field, - bn256::Fr - }, + halo2curves::{bn256::Fr, ff::Field}, plonk::Error, }; use zkevm_circuits::util::Challenges;