diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82e8c50d50..65a2ffd96e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,12 +38,13 @@ jobs: test-default: name: Test Default + if: false needs: [runner] runs-on: ${{ matrix.os }} - concurrency: ${{ needs.runner.outputs.concurrency-group2 }} + concurrency: ${{ needs.runner.outputs.concurrency-group1 }} strategy: matrix: - os: ${{ fromJSON(needs.runner.outputs.runner-matrix2) }} + os: ${{ fromJSON(needs.runner.outputs.runner-matrix1) }} steps: - uses: actions/checkout@v4 @@ -52,12 +53,12 @@ jobs: echo "HOME=/home/CI" >> $GITHUB_ENV - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 - name: Setup golang uses: actions/setup-go@v3 with: cache: false - go-version: ~1.21 + go-version: ~1.22 # Go cache for building geth-utils - name: Go cache uses: actions/cache@v3 @@ -83,10 +84,10 @@ jobs: name: Test Scroll needs: [runner] runs-on: ${{ matrix.os }} - concurrency: ${{ needs.runner.outputs.concurrency-group1 }} + concurrency: ${{ needs.runner.outputs.concurrency-group2 }} strategy: matrix: - os: ${{ fromJSON(needs.runner.outputs.runner-matrix1) }} + os: ${{ fromJSON(needs.runner.outputs.runner-matrix2) }} steps: - uses: actions/checkout@v4 @@ -95,12 +96,12 @@ jobs: echo "HOME=/home/CI" >> $GITHUB_ENV - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 - name: Setup golang uses: actions/setup-go@v3 with: cache: false - go-version: ~1.21 + go-version: ~1.22 # Go cache for building geth-utils - name: Go cache uses: actions/cache@v3 @@ -146,7 +147,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 - name: Add target run: rustup target add ${{ matrix.target }} # Go cache for building geth-utils @@ -183,7 +184,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 # Go cache for building geth-utils - name: Go cache uses: actions/cache@v3 @@ -216,7 +217,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 # Go cache for building geth-utils - name: Go cache uses: actions/cache@v3 @@ -253,7 +254,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 components: rustfmt # Go cache for building geth-utils - name: Go cache diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c1c9c7597f..b879ef70fe 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 - name: Setup golang uses: actions/setup-go@v3 with: diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 08c7d3fa51..1e2345ca12 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 components: clippy # Go cache for building geth-utils - name: Go cache diff --git a/.github/workflows/test-features.yml b/.github/workflows/test-features.yml index 7f55372f01..f80f1f29f2 100644 --- a/.github/workflows/test-features.yml +++ b/.github/workflows/test-features.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-12-03 + toolchain: nightly-2024-01-25 # Go cache for building geth-utils - name: Go cache diff --git a/Cargo.lock b/Cargo.lock index ad5658a3bb..0905ca43c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -558,9 +558,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitstream-io" -version = "2.5.3" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452" +checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e" [[package]] name = "bitvec" @@ -3606,7 +3606,7 @@ dependencies = [ [[package]] name = "poseidon-base" version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#d52fa404e8f03b5c3f85c090ccb8b08c112e2f4d" +source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#6cc36ab9dfa153f554ff7b84305f39838366a8df" dependencies = [ "bitvec", "halo2curves", @@ -3617,7 +3617,7 @@ dependencies = [ [[package]] name = "poseidon-circuit" version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#d52fa404e8f03b5c3f85c090ccb8b08c112e2f4d" +source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#6cc36ab9dfa153f554ff7b84305f39838366a8df" dependencies = [ "ff", "halo2_proofs", diff --git a/aggregator/src/lib.rs b/aggregator/src/lib.rs index 1fc7f78c92..9355a00851 100644 --- a/aggregator/src/lib.rs +++ b/aggregator/src/lib.rs @@ -1,4 +1,4 @@ -#![allow(clippy::doc_lazy_continuation)] +#![feature(lazy_cell)] /// proof aggregation mod aggregation; /// This module implements `Batch` related data types. diff --git a/bus-mapping/src/lib.rs b/bus-mapping/src/lib.rs index 294dee2972..e7a239ef0d 100644 --- a/bus-mapping/src/lib.rs +++ b/bus-mapping/src/lib.rs @@ -208,7 +208,6 @@ #![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. @@ -219,6 +218,7 @@ #![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/evm_types/opcode_ids.rs b/eth-types/src/evm_types/opcode_ids.rs index 252c4ef9c7..30bc39217b 100644 --- a/eth-types/src/evm_types/opcode_ids.rs +++ b/eth-types/src/evm_types/opcode_ids.rs @@ -1247,13 +1247,10 @@ impl FromStr for OpcodeId { #[cfg(not(feature = "scroll"))] "SELFDESTRUCT" => OpcodeId::SELFDESTRUCT, "CHAINID" => OpcodeId::CHAINID, - "opcode 0x48 not defined" => OpcodeId::BASEFEE, "BASEFEE" => OpcodeId::BASEFEE, "BLOBHASH" => OpcodeId::INVALID(0x49), "BLOBBASEFEE" => OpcodeId::INVALID(0x4a), - "opcode 0x5c not defined" => OpcodeId::TLOAD, "TLOAD" => OpcodeId::TLOAD, - "opcode 0x5d not defined" => OpcodeId::TSTORE, "TSTORE" => OpcodeId::TSTORE, _ => { // Parse an invalid opcode value as reported by geth diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index c0461dcb29..92e2ecd336 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -10,6 +10,7 @@ #![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/geth-utils/l2geth/go.mod b/geth-utils/l2geth/go.mod index c7051095cb..433a32f7ec 100644 --- a/geth-utils/l2geth/go.mod +++ b/geth-utils/l2geth/go.mod @@ -1,20 +1,22 @@ module l2gethutil -go 1.21 +go 1.22 + +toolchain go1.23.2 require ( github.com/imdario/mergo v0.3.16 - github.com/scroll-tech/go-ethereum v1.10.14-0.20240717120140-0360eba83660 + github.com/scroll-tech/go-ethereum v1.10.14-0.20241001202020-2ed7456a4bc0 ) require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/bits-and-blooms/bitset v1.14.3 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect + github.com/consensys/bavard v0.1.22 // indirect + github.com/consensys/gnark-crypto v0.14.0 // indirect + github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect @@ -30,9 +32,9 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.4 // indirect + github.com/holiman/uint256 v1.3.1 // indirect github.com/huin/goupnp v1.0.2 // indirect - github.com/iden3/go-iden3-crypto v0.0.16 // indirect + github.com/iden3/go-iden3-crypto v0.0.17 // indirect github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -46,16 +48,16 @@ require ( github.com/scroll-tech/zktrie v0.8.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect - github.com/supranational/blst v0.3.12 // indirect + github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect - github.com/tklauser/numcpus v0.8.0 // indirect + github.com/tklauser/numcpus v0.9.0 // indirect github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/crypto v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/text v0.19.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/geth-utils/l2geth/go.sum b/geth-utils/l2geth/go.sum index bb2bbc25ef..909daa9bd4 100644 --- a/geth-utils/l2geth/go.sum +++ b/geth-utils/l2geth/go.sum @@ -10,6 +10,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.14.3 h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj1436qilA= +github.com/bits-and-blooms/bitset v1.14.3/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -29,10 +31,16 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/bavard v0.1.22 h1:Uw2CGvbXSZWhqK59X0VG/zOjpTFuOMcPLStrp1ihI0A= +github.com/consensys/bavard v0.1.22/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/consensys/gnark-crypto v0.14.0 h1:DDBdl4HaBtdQsq/wfMwJvZNE80sHidrK3Nfrefatm0E= +github.com/consensys/gnark-crypto v0.14.0/go.mod h1:CU4UijNPsHawiVGNxe9co07FkzCeWHHrb1li/n1XoU0= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= +github.com/crate-crypto/go-kzg-4844 v1.1.0/go.mod h1:JolLjpSff1tCCJKaJx4psrlEdlXuJEC996PL3tTAFks= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -94,6 +102,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= +github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= @@ -101,6 +111,8 @@ github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3 github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/iden3/go-iden3-crypto v0.0.16 h1:zN867xiz6HgErXVIV/6WyteGcOukE9gybYTorBMEdsk= github.com/iden3/go-iden3-crypto v0.0.16/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E= +github.com/iden3/go-iden3-crypto v0.0.17 h1:NdkceRLJo/pI4UpcjVah4lN/a3yzxRUGXqxbWcYh9mY= +github.com/iden3/go-iden3-crypto v0.0.17/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= @@ -114,6 +126,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -179,6 +192,8 @@ github.com/scroll-tech/go-ethereum v1.10.14-0.20240603142403-9ec83a509ac7 h1:z+l github.com/scroll-tech/go-ethereum v1.10.14-0.20240603142403-9ec83a509ac7/go.mod h1:UyUop/xDNmbxIIA38L8bjdG3nNbos2azGOqrfqTVgD4= github.com/scroll-tech/go-ethereum v1.10.14-0.20240621133406-517e5b4b0764 h1:lzOZjEuAcrHwDGdTTqn06Ylo9qk5tRkMFVV32VKZiBY= github.com/scroll-tech/go-ethereum v1.10.14-0.20240621133406-517e5b4b0764/go.mod h1:byf/mZ8jLYUCnUePTicjJWn+RvKdxDn7buS6glTnMwQ= +github.com/scroll-tech/go-ethereum v1.10.14-0.20241001202020-2ed7456a4bc0 h1:+l2Xru9yBH+TGoltTdShtzhFU18oNWdXb4J4BI4aZVI= +github.com/scroll-tech/go-ethereum v1.10.14-0.20241001202020-2ed7456a4bc0/go.mod h1:xRDJvaNUe7lCU2fB+AqyS7gahar+dfJPrUJplfXF4dw= github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE= github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= github.com/scroll-tech/zktrie v0.8.2 h1:UMuIfA+jdgWMLmTgTL64Emo+zzMOdcnH0+eYdDcshxQ= @@ -202,6 +217,8 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/supranational/blst v0.3.12 h1:Vfas2U2CFHhniv2QkUm2OVa1+pGTdqtpqm9NnhUUbZ8= github.com/supranational/blst v0.3.12/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -212,6 +229,8 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= +github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= +github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -230,6 +249,8 @@ golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -251,6 +272,8 @@ golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -280,6 +303,8 @@ golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -289,6 +314,7 @@ golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= diff --git a/go.work b/go.work index 8e850659a2..9024fb14e0 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,6 @@ -go 1.21 +go 1.22 + +toolchain go1.23.2 use ./geth-utils/l1geth diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 5e161fc8ae..bcbd158762 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -1,3 +1,4 @@ +#![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 2c88ac5d0e..a8ee0a6c3f 100644 --- a/integration-tests/tests/circuit_input_builder.rs +++ b/integration-tests/tests/circuit_input_builder.rs @@ -1,3 +1,4 @@ +#![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/rpc.rs b/integration-tests/tests/rpc.rs index 4b31fe213a..706ee59c9d 100644 --- a/integration-tests/tests/rpc.rs +++ b/integration-tests/tests/rpc.rs @@ -1,3 +1,4 @@ +#![feature(lazy_cell)] #![cfg(feature = "rpc")] use eth_types::{StorageProof, Word}; diff --git a/mock/src/lib.rs b/mock/src/lib.rs index a7e8a1602e..5d7c89c2cc 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,3 +1,4 @@ +#![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/prover/src/lib.rs b/prover/src/lib.rs index f3dca5af1e..64a9a14da2 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -1,3 +1,5 @@ +#![feature(lazy_cell)] + /// Meaning of each circuit: /// inner: first layer EVM super circuit /// layer1: compression circuit of "inner" diff --git a/prover/src/utils.rs b/prover/src/utils.rs index 534016376f..c34535ed5a 100644 --- a/prover/src/utils.rs +++ b/prover/src/utils.rs @@ -83,42 +83,13 @@ pub fn load_params( Ok(p) } -#[deprecated] -fn post_process_tx_storage_proof(trace: &mut BlockTrace) { - // fill intrinsicStorageProofs into tx storage proof - let addrs = vec![ - *bus_mapping::l2_predeployed::message_queue::ADDRESS, - *bus_mapping::l2_predeployed::l1_gas_price_oracle::ADDRESS, - ]; - for tx_storage_trace in &mut trace.tx_storage_trace { - if let Some(proof) = tx_storage_trace.proofs.as_mut() { - for addr in &addrs { - proof.insert( - *addr, - trace - .storage_trace - .proofs - .as_ref() - .map(|p| p[addr].clone()) - .unwrap(), - ); - } - } - for addr in &addrs { - tx_storage_trace - .storage_proofs - .insert(*addr, trace.storage_trace.storage_proofs[addr].clone()); - } - } -} - /// get a block-result from file pub fn get_block_trace_from_file>(path: P) -> BlockTrace { let mut buffer = Vec::new(); let mut f = File::open(&path).unwrap(); f.read_to_end(&mut buffer).unwrap(); - let mut trace = serde_json::from_slice::(&buffer).unwrap_or_else(|e1| { + serde_json::from_slice::(&buffer).unwrap_or_else(|e1| { serde_json::from_slice::(&buffer) .map_err(|e2| { panic!( @@ -130,9 +101,7 @@ pub fn get_block_trace_from_file>(path: P) -> BlockTrace { }) .unwrap() .result - }); - post_process_tx_storage_proof(&mut trace); - trace + }) } pub fn read_env_var(var_name: &'static str, default: T) -> T { diff --git a/prover/src/zkevm/circuit.rs b/prover/src/zkevm/circuit.rs index 302a7195fe..f936282157 100644 --- a/prover/src/zkevm/circuit.rs +++ b/prover/src/zkevm/circuit.rs @@ -6,7 +6,7 @@ use zkevm_circuits::{super_circuit::params::ScrollSuperCircuit, util::SubCircuit mod builder; pub use self::builder::{ block_traces_to_witness_block, calculate_row_usage_of_witness_block, finalize_builder, - print_chunk_stats, validite_block_traces, + print_chunk_stats, }; pub use zkevm_circuits::super_circuit::params::{MAX_CALLDATA, MAX_INNER_BLOCKS, MAX_TXS}; diff --git a/prover/src/zkevm/circuit/builder.rs b/prover/src/zkevm/circuit/builder.rs index 69add86a83..f2b946e137 100644 --- a/prover/src/zkevm/circuit/builder.rs +++ b/prover/src/zkevm/circuit/builder.rs @@ -1,45 +1,25 @@ -use crate::{utils::read_env_var, zkevm::SubCircuitRowUsage}; +use crate::zkevm::SubCircuitRowUsage; use anyhow::{bail, Result}; use bus_mapping::circuit_input_builder::CircuitInputBuilder; use eth_types::{l2_types::BlockTrace, ToWord}; use itertools::Itertools; use mpt_zktrie::state::ZkTrieHash; -use std::sync::LazyLock; use zkevm_circuits::{ evm_circuit::witness::Block, super_circuit::params::{get_super_circuit_params, ScrollSuperCircuit, MAX_TXS}, witness::block_convert, }; -static CHAIN_ID: LazyLock = LazyLock::new(|| read_env_var("CHAIN_ID", 534352)); - pub fn calculate_row_usage_of_witness_block( witness_block: &Block, ) -> Result> { - let mut rows = ScrollSuperCircuit::min_num_rows_block_subcircuits(witness_block); + let rows = ScrollSuperCircuit::min_num_rows_block_subcircuits(witness_block); + // Check whether we need to "estimate" poseidon sub circuit row usage if witness_block.mpt_updates.smt_traces.is_empty() { - assert_eq!(rows[11].name, "poseidon"); - assert_eq!(rows[14].name, "mpt"); - - // TODO: make this a function parameter? - let is_follower = witness_block.txs.len() > 1; - - // For a storage access, avg account trie depth + storage trie depth - // These 2 numbers are very very conservative now. - let avg_trie_depth = if is_follower { 64 } else { 128 }; - - // Fr::hash_block_size() - let poseidon_round_rows = 9; - // 96 is 3 word lookup. See comments of MptCircuit::min_num_rows_block - let mpt_updates_num = rows[14].row_num_real / 96; - let mpt_poseidon_rows = mpt_updates_num * avg_trie_depth * poseidon_round_rows; - - rows[11].row_num_real += mpt_poseidon_rows; - log::debug!("calculate_row_usage_of_witness_block light mode, adding {mpt_poseidon_rows} poseidon rows"); - } else { - log::debug!("calculate_row_usage_of_witness_block normal mode, skip adding poseidon rows"); + bail!("light mode no longer supported"); } + let first_block_num = witness_block.first_block_number(); let last_block_num = witness_block.last_block_number(); @@ -82,25 +62,10 @@ pub fn print_chunk_stats(block_traces: &[BlockTrace]) { ); } -/// check if block traces match preset parameters -pub fn validite_block_traces(block_traces: &[BlockTrace]) -> Result<()> { - let chain_id = block_traces - .iter() - .map(|block_trace| block_trace.chain_id) - .next() - .unwrap_or(*CHAIN_ID); - if *CHAIN_ID != chain_id { - bail!( - "CHAIN_ID env var is wrong. chain id in trace {chain_id}, CHAIN_ID {}", - *CHAIN_ID - ); - } - Ok(()) -} - pub fn dummy_witness_block() -> Result { log::debug!("generate dummy witness block"); - let witness_block = zkevm_circuits::witness::dummy_witness_block(*CHAIN_ID); + let dummy_chain_id = 0; + let witness_block = zkevm_circuits::witness::dummy_witness_block(dummy_chain_id); log::debug!("generate dummy witness block done"); Ok(witness_block) } @@ -109,7 +74,6 @@ pub fn block_traces_to_witness_block(block_traces: Vec) -> Result