diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 45da171e..bbaa697e 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -35,11 +35,13 @@ runs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ target/ - key: rust-1.79.0-${{ hashFiles('**/Cargo.toml') }} - restore-keys: rust-1.79.0- + key: rust-nightly-${{ hashFiles('**/Cargo.toml') }} + restore-keys: rust-nightly- - name: Setup toolchain id: rustc-toolchain shell: bash run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.79.0 -y + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y + source "$HOME/.cargo/env" + rustup default nightly diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml index 92846375..073708bc 100644 --- a/.github/workflows/compile.yaml +++ b/.github/workflows/compile.yaml @@ -17,32 +17,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Compile the fault proof program - run: cargo build --profile release-client-lto - working-directory: programs/fault-proof + - name: Setup CI + uses: ./.github/actions/setup - name: Compile the range program run: cargo build --profile release-client-lto working-directory: programs/range - build_zkvm_programs: - runs-on: - - runs-on - - runner=64cpu-linux-arm64 - - run-id=${{ github.run_id }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install SP1 toolchain - run: | - curl -L https://sp1.succinct.xyz | bash - ~/.sp1/bin/sp1up - ~/.sp1/bin/cargo-prove prove --version - source ~/.bashrc - - name: Compile the fault proof program - run: ~/.sp1/bin/cargo-prove prove build --binary fault-proof - working-directory: programs/fault-proof - - name: Compile the range program - run: ~/.sp1/bin/cargo-prove prove build --binary range - working-directory: programs/range - - name: Compile the aggregation program - run: ~/.sp1/bin/cargo-prove prove build --binary aggregation - working-directory: programs/aggregation diff --git a/.github/workflows/cost-estimator-manual.yml b/.github/workflows/cost-estimator-manual.yml index 8bd8bfba..2df1a715 100644 --- a/.github/workflows/cost-estimator-manual.yml +++ b/.github/workflows/cost-estimator-manual.yml @@ -18,23 +18,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: rust-cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - restore-keys: rust-1.81.0- - key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }} - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - name: Setup CI + uses: ./.github/actions/setup - name: Run cost estimator run: | diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 00000000..5d9cc115 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,96 @@ +name: Docker Build + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main + +jobs: + build: + name: Build Docker Images + runs-on: + - runs-on + - cpu=16 + - ram=64 + - family=m7a+m7i-flex + - image=ubuntu22-full-x64 + - run-id=${{ github.run_id }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta for op-proposer + id: meta-op-proposer + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/op-proposer + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + + - name: Docker meta for succinct-proposer + id: meta-succinct + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/succinct-proposer + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pre-build debug + run: | + echo "Meta tags: ${{ steps.meta-op-proposer.outputs.tags }}" + echo "Push condition: ${{ github.event_name != 'pull_request' }}" + echo "Event name: ${{ github.event_name }}" + + - name: Build and push op-proposer + uses: docker/build-push-action@v6 + with: + context: . + file: proposer/op/Dockerfile.op_proposer + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta-op-proposer.outputs.tags }} + labels: ${{ steps.meta-op-proposer.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Post-build debug + run: | + docker images + echo "Checking authentication:" + docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} 2>&1 || true + + - name: Build and push succinct-proposer + uses: docker/build-push-action@v6 + with: + context: . + file: proposer/succinct/Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta-succinct.outputs.tags }} + labels: ${{ steps.meta-succinct.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker-test.yaml similarity index 85% rename from .github/workflows/docker.yaml rename to .github/workflows/docker-test.yaml index f4372575..9c2b9118 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker-test.yaml @@ -17,9 +17,11 @@ jobs: - ram=64 - family=m7a+m7i-flex - image=ubuntu22-full-x64 + - disk=large - run-id=${{ github.run_id }} steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - name: Set up Docker Compose uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/elf.yml b/.github/workflows/elf.yml new file mode 100644 index 00000000..dd566f05 --- /dev/null +++ b/.github/workflows/elf.yml @@ -0,0 +1,44 @@ +name: ELF + +on: + pull_request: + branches: + - main + push: + branches: + - main + workflow_dispatch: + +jobs: + elf: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Install SP1 toolchain + run: | + curl -L https://sp1.succinct.xyz | bash + ~/.sp1/bin/sp1up + ~/.sp1/bin/cargo-prove prove --version + source ~/.bashrc + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Verify the OP Succinct binaries + run: | + # Build the binaries + cd programs/range + ~/.sp1/bin/cargo-prove prove build --elf-name range-elf --docker --tag v4.0.0-rc.10 --output-directory ../../elf + cd ../aggregation + ~/.sp1/bin/cargo-prove prove build --elf-name aggregation-elf --docker --tag v4.0.0-rc.10 --output-directory ../../elf + cd ../../ + + # Check for any changes in the elf directory + if [ -n "$(git status --porcelain elf/)" ]; then + echo "❌ ELF files changed during build!" + git diff elf/ + exit 1 + else + echo "✅ ELF files remained unchanged" + fi diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8b36498a..9b714ea9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -19,23 +19,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: rust-cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - restore-keys: rust-1.81.0- - key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }} - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - name: Setup CI + uses: ./.github/actions/setup - name: OP Sepolia cost estimator on recent block range run: | diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c5210a9d..3a76edb2 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -33,7 +33,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: nightly components: rustfmt - name: Run rustfmt diff --git a/.gitmodules b/.gitmodules index 6bfb6591..46f2bcc2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "contracts/lib/sp1-contracts"] path = contracts/lib/sp1-contracts url = https://github.com/succinctlabs/sp1-contracts +[submodule "contracts/lib/solady"] + path = contracts/lib/solady + url = https://github.com/vectorized/solady diff --git a/Cargo.lock b/Cargo.lock index 921b7808..bad823da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,16 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] +version = 4 [[package]] name = "addchain" @@ -38,43 +28,21 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - [[package]] name = "aggregation" version = "0.1.0" dependencies = [ "alloy-consensus 0.6.4", - "alloy-primitives 0.8.14", - "alloy-sol-types 0.8.14", + "alloy-primitives", + "alloy-sol-types", "bincode", "op-succinct-client-utils", "serde_cbor", "sha2", - "sp1-lib 3.4.0", + "sp1-lib", "sp1-zkvm", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -143,43 +111,60 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.48" +version = "0.1.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0161082e0edd9013d23083465cc04b20e44b7a15646d36ba7b0cdb7cd6fe18f" +checksum = "1e39f295f876b61a1222d937e1dd31f965e4a1acc3bba98e448dd7e84b1a4566" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "num_enum 0.7.3", "strum", ] [[package]] name = "alloy-consensus" -version = "0.3.6" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" +checksum = "ae09ffd7c29062431dd86061deefe4e3c6f07fa0d674930095f8dcedb0baf02c" dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives 0.8.14", + "alloy-eips 0.6.4", + "alloy-primitives", "alloy-rlp", - "alloy-serde 0.3.6", + "alloy-serde 0.6.4", + "auto_impl", "c-kzg", + "derive_more", + "k256", "serde", ] [[package]] name = "alloy-consensus" -version = "0.6.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae09ffd7c29062431dd86061deefe4e3c6f07fa0d674930095f8dcedb0baf02c" +checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" dependencies = [ - "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-eips 0.8.3", + "alloy-primitives", "alloy-rlp", - "alloy-serde 0.6.4", + "alloy-serde 0.8.3", + "alloy-trie", "auto_impl", "c-kzg", - "derive_more 1.0.0", - "k256", + "derive_more", + "serde", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" +dependencies = [ + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.8.3", "serde", ] @@ -193,11 +178,11 @@ dependencies = [ "alloy-json-abi", "alloy-network 0.6.4", "alloy-network-primitives 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-provider", "alloy-pubsub", "alloy-rpc-types-eth 0.6.4", - "alloy-sol-types 0.8.14", + "alloy-sol-types", "alloy-transport", "futures", "futures-util", @@ -206,31 +191,31 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d14d531c99995de71558e8e2206c27d709559ee8e5a0452b965ea82405a013" +checksum = "d0713007d14d88a6edb8e248cddab783b698dbb954a28b8eee4bab21cfb7e578" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", - "alloy-primitives 0.8.14", - "alloy-sol-types 0.8.14", + "alloy-primitives", + "alloy-sol-types", ] [[package]] name = "alloy-dyn-abi" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80759b3f57b3b20fa7cd8fef6479930fc95461b58ff8adea6e87e618449c8a1d" +checksum = "44e3b98c37b3218924cd1d2a8570666b89662be54e5b182643855f783ea68b33" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-sol-type-parser", - "alloy-sol-types 0.8.14", + "alloy-sol-types", "const-hex", "itoa", "serde", "serde_json", - "winnow 0.6.20", + "winnow 0.6.24", ] [[package]] @@ -239,18 +224,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ - "alloy-primitives 0.8.14", - "alloy-rlp", - "serde", -] - -[[package]] -name = "alloy-eip7702" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea59dc42102bc9a1905dc57901edc6dd48b9f38115df86c7d252acba70d71d04" -dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "serde", ] @@ -261,7 +235,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eeffd2590ce780ddfaa9d0ae340eb2b4e08627650c4676eef537cef0b4bf535d" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "k256", "serde", @@ -273,26 +247,26 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", - "derive_more 1.0.0", + "derive_more", "k256", "serde", ] [[package]] name = "alloy-eips" -version = "0.3.6" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" +checksum = "5b6aa3961694b30ba53d41006131a2fca3bdab22e4c344e46db2c639e7c2dfdd" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.1.1", - "alloy-primitives 0.8.14", + "alloy-eip7702 0.4.2", + "alloy-primitives", "alloy-rlp", - "alloy-serde 0.3.6", + "alloy-serde 0.6.4", "c-kzg", - "derive_more 1.0.0", + "derive_more", "once_cell", "serde", "sha2", @@ -300,17 +274,17 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.6.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b6aa3961694b30ba53d41006131a2fca3bdab22e4c344e46db2c639e7c2dfdd" +checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" dependencies = [ "alloy-eip2930", "alloy-eip7702 0.4.2", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", - "alloy-serde 0.6.4", + "alloy-serde 0.8.3", "c-kzg", - "derive_more 1.0.0", + "derive_more", "once_cell", "serde", "sha2", @@ -318,11 +292,11 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" +checksum = "731ea743b3d843bc657e120fb1d1e9cc94f5dab8107e35a82125a63e6420a102" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-sol-type-parser", "serde", "serde_json", @@ -330,12 +304,12 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.3.6" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c717b5298fad078cd3a418335b266eba91b511383ca9bd497f742d5975d5ab" +checksum = "3694b7e480728c0b3e228384f223937f14c10caef5a4c766021190fc8f283d35" dependencies = [ - "alloy-primitives 0.8.14", - "alloy-sol-types 0.8.14", + "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror 1.0.69", @@ -344,39 +318,18 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.6.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3694b7e480728c0b3e228384f223937f14c10caef5a4c766021190fc8f283d35" +checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" dependencies = [ - "alloy-primitives 0.8.14", - "alloy-sol-types 0.8.14", + "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.11", "tracing", ] -[[package]] -name = "alloy-network" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb3705ce7d8602132bcf5ac7a1dd293a42adc2f183abf5907c30ac535ceca049" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-json-rpc 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.14", - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "alloy-signer 0.3.6", - "alloy-sol-types 0.8.14", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "thiserror 1.0.69", -] - [[package]] name = "alloy-network" version = "0.6.4" @@ -387,11 +340,11 @@ dependencies = [ "alloy-eips 0.6.4", "alloy-json-rpc 0.6.4", "alloy-network-primitives 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-eth 0.6.4", "alloy-serde 0.6.4", "alloy-signer 0.6.4", - "alloy-sol-types 0.8.14", + "alloy-sol-types", "async-trait", "auto_impl", "futures-utils-wasm", @@ -401,15 +354,28 @@ dependencies = [ ] [[package]] -name = "alloy-network-primitives" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" -dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives 0.8.14", - "alloy-serde 0.3.6", +name = "alloy-network" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" +dependencies = [ + "alloy-consensus 0.8.3", + "alloy-consensus-any", + "alloy-eips 0.8.3", + "alloy-json-rpc 0.8.3", + "alloy-network-primitives 0.8.3", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", + "alloy-signer 0.8.3", + "alloy-sol-types", + "async-trait", + "auto_impl", + "futures-utils-wasm", "serde", + "serde_json", + "thiserror 2.0.11", ] [[package]] @@ -420,47 +386,37 @@ checksum = "df9f3e281005943944d15ee8491534a1c7b3cbf7a7de26f8c433b842b93eb5f9" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-serde 0.6.4", "serde", ] [[package]] -name = "alloy-primitives" -version = "0.7.7" +name = "alloy-network-primitives" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb3ead547f4532bc8af961649942f0b9c16ee9226e26caa3f38420651cc0bf4" +checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more 0.99.18", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand", - "ruint", + "alloy-consensus 0.8.3", + "alloy-eips 0.8.3", + "alloy-primitives", + "alloy-serde 0.8.3", "serde", - "tiny-keccak", ] [[package]] name = "alloy-primitives" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" +checksum = "788bb18e8f61d5d9340b52143f27771daf7e1dccbaf2741621d2493f9debf52e" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more 1.0.0", + "derive_more", "foldhash", "hashbrown 0.15.2", - "hex-literal", "indexmap 2.7.0", "itoa", "k256", @@ -487,7 +443,7 @@ dependencies = [ "alloy-json-rpc 0.6.4", "alloy-network 0.6.4", "alloy-network-primitives 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", "alloy-rpc-types-eth 0.6.4", @@ -504,7 +460,7 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest 0.12.9", + "reqwest", "schnellru", "serde", "serde_json", @@ -522,7 +478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90f1f34232f77341076541c405482e4ae12f0ee7153d8f9969fc1691201b2247" dependencies = [ "alloy-json-rpc 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-transport", "bimap", "futures", @@ -530,15 +486,15 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.1", + "tower 0.5.2", "tracing", ] [[package]] name = "alloy-rlp" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" +checksum = "f542548a609dca89fcd72b3b9f355928cf844d4363c5eed9c5273a3dd225e097" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -547,13 +503,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" +checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -563,7 +519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374dbe0dc3abdc2c964f36b3d3edf9cdb3db29d16bda34aa123f03d810bec1dd" dependencies = [ "alloy-json-rpc 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-pubsub", "alloy-transport", "alloy-transport-http", @@ -571,12 +527,12 @@ dependencies = [ "alloy-transport-ws", "futures", "pin-project", - "reqwest 0.12.9", + "reqwest", "serde", "serde_json", "tokio", "tokio-stream", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -588,13 +544,24 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c74832aa474b670309c20fffc2a869fa141edab7c79ff7963fad0a08de60bae1" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-engine", "alloy-rpc-types-eth 0.6.4", "alloy-serde 0.6.4", "serde", ] +[[package]] +name = "alloy-rpc-types-any" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth 0.8.3", + "alloy-serde 0.8.3", +] + [[package]] name = "alloy-rpc-types-beacon" version = "0.6.4" @@ -602,7 +569,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "922fa76678d2f9f07ea1b19309b5cfbf244c6029dcba3515227b515fdd6ed4a7" dependencies = [ "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-engine", "serde", "serde_with", @@ -617,35 +584,14 @@ checksum = "3f56294dce86af23ad6ee8df46cf8b0d292eb5d1ff67dc88a0886051e32b1faf" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-serde 0.6.4", - "derive_more 1.0.0", + "derive_more", "serde", "strum", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives 0.8.14", - "alloy-rlp", - "alloy-serde 0.3.6", - "alloy-sol-types 0.8.14", - "cfg-if", - "derive_more 1.0.0", - "hashbrown 0.14.5", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.6.4" @@ -655,23 +601,32 @@ dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", "alloy-network-primitives 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-serde 0.6.4", - "alloy-sol-types 0.8.14", - "derive_more 1.0.0", + "alloy-sol-types", + "derive_more", "itertools 0.13.0", "serde", "serde_json", ] [[package]] -name = "alloy-serde" -version = "0.3.6" +name = "alloy-rpc-types-eth" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" +checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-consensus 0.8.3", + "alloy-consensus-any", + "alloy-eips 0.8.3", + "alloy-network-primitives 0.8.3", + "alloy-primitives", + "alloy-rlp", + "alloy-serde 0.8.3", + "alloy-sol-types", + "derive_more", + "itertools 0.13.0", "serde", "serde_json", ] @@ -682,23 +637,20 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dfa4a7ccf15b2492bb68088692481fd6b2604ccbee1d0d6c44c21427ae4df83" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "serde", "serde_json", ] [[package]] -name = "alloy-signer" -version = "0.3.6" +name = "alloy-serde" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307324cca94354cd654d6713629f0383ec037e1ff9e3e3d547212471209860c0" +checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" dependencies = [ - "alloy-primitives 0.8.14", - "async-trait", - "auto_impl", - "elliptic-curve", - "k256", - "thiserror 1.0.69", + "alloy-primitives", + "serde", + "serde_json", ] [[package]] @@ -707,7 +659,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e10aec39d60dc27edcac447302c7803d2371946fb737245320a05b78eb2fafd" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", @@ -716,19 +668,17 @@ dependencies = [ ] [[package]] -name = "alloy-signer-local" -version = "0.3.6" +name = "alloy-signer" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fabe917ab1778e760b4701628d1cae8e028ee9d52ac6307de4e1e9286ab6b5f" +checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-network 0.3.6", - "alloy-primitives 0.8.14", - "alloy-signer 0.3.6", + "alloy-primitives", "async-trait", + "auto_impl", + "elliptic-curve", "k256", - "rand", - "thiserror 1.0.69", + "thiserror 2.0.11", ] [[package]] @@ -739,7 +689,7 @@ checksum = "d8396f6dff60700bc1d215ee03d86ff56de268af96e2bf833a14d0bafcab9882" dependencies = [ "alloy-consensus 0.6.4", "alloy-network 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-signer 0.6.4", "async-trait", "k256", @@ -748,133 +698,90 @@ dependencies = [ ] [[package]] -name = "alloy-sol-macro" -version = "0.7.7" +name = "alloy-signer-local" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40397ddcdcc266f59f959770f601ce1280e699a91fc1862f29cef91707cd09" +checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" dependencies = [ - "alloy-sol-macro-expander 0.7.7", - "alloy-sol-macro-input 0.7.7", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.90", + "alloy-consensus 0.8.3", + "alloy-network 0.8.3", + "alloy-primitives", + "alloy-signer 0.8.3", + "async-trait", + "k256", + "rand", + "thiserror 2.0.11", ] [[package]] name = "alloy-sol-macro" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" +checksum = "a07b74d48661ab2e4b50bb5950d74dbff5e61dd8ed03bb822281b706d54ebacb" dependencies = [ - "alloy-sol-macro-expander 0.8.14", - "alloy-sol-macro-input 0.8.14", + "alloy-sol-macro-expander", + "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", -] - -[[package]] -name = "alloy-sol-macro-expander" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "867a5469d61480fea08c7333ffeca52d5b621f5ca2e44f271b117ec1fc9a0525" -dependencies = [ - "alloy-sol-macro-input 0.7.7", - "const-hex", - "heck", - "indexmap 2.7.0", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.90", - "syn-solidity 0.7.7", - "tiny-keccak", + "syn 2.0.96", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" +checksum = "19cc9c7f20b90f9be1a8f71a3d8e283a43745137b0837b1a1cb13159d37cad72" dependencies = [ "alloy-json-abi", - "alloy-sol-macro-input 0.8.14", + "alloy-sol-macro-input", "const-hex", - "heck", + "heck 0.5.0", "indexmap 2.7.0", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", - "syn-solidity 0.8.14", + "syn 2.0.96", + "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e482dc33a32b6fadbc0f599adea520bd3aaa585c141a80b404d0a3e3fa72528" -dependencies = [ - "const-hex", - "dunce", - "heck", - "proc-macro2", - "quote", - "syn 2.0.90", - "syn-solidity 0.7.7", -] - -[[package]] -name = "alloy-sol-macro-input" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" +checksum = "713b7e6dfe1cb2f55c80fb05fd22ed085a1b4e48217611365ed0ae598a74c6ac" dependencies = [ "alloy-json-abi", "const-hex", "dunce", - "heck", + "heck 0.5.0", "proc-macro2", "quote", "serde_json", - "syn 2.0.90", - "syn-solidity 0.8.14", + "syn 2.0.96", + "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" -dependencies = [ - "serde", - "winnow 0.6.20", -] - -[[package]] -name = "alloy-sol-types" -version = "0.7.7" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91ca40fa20793ae9c3841b83e74569d1cc9af29a2f5237314fd3452d51e38c7" +checksum = "1eda2711ab2e1fb517fc6e2ffa9728c9a232e296d16810810e6957b781a1b8bc" dependencies = [ - "alloy-primitives 0.7.7", - "alloy-sol-macro 0.7.7", - "const-hex", "serde", + "winnow 0.6.24", ] [[package]] name = "alloy-sol-types" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" +checksum = "e3b478bc9c0c4737a04cd976accde4df7eba0bdc0d90ad6ff43d58bc93cf79c1" dependencies = [ "alloy-json-abi", - "alloy-primitives 0.8.14", - "alloy-sol-macro 0.8.14", + "alloy-primitives", + "alloy-sol-macro", "const-hex", "serde", ] @@ -893,7 +800,7 @@ dependencies = [ "serde_json", "thiserror 1.0.69", "tokio", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -907,9 +814,9 @@ checksum = "5dc013132e34eeadaa0add7e74164c1503988bfba8bae885b32e0918ba85a8a6" dependencies = [ "alloy-json-rpc 0.6.4", "alloy-transport", - "reqwest 0.12.9", + "reqwest", "serde_json", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", ] @@ -942,7 +849,7 @@ dependencies = [ "alloy-pubsub", "alloy-transport", "futures", - "http 1.2.0", + "http", "rustls", "serde_json", "tokio", @@ -957,10 +864,10 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 1.0.0", + "derive_more", "nybbles", "serde", "smallvec", @@ -1032,19 +939,20 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.6" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", + "once_cell", "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "ark-ff" @@ -1204,18 +1112,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1247,13 +1155,13 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1272,10 +1180,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-util", "itoa", "matchit", @@ -1288,9 +1196,9 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", - "tower 0.5.1", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -1305,13 +1213,13 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -1359,12 +1267,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -1377,12 +1279,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bimap" version = "0.6.3" @@ -1404,7 +1300,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.12.1", @@ -1415,7 +1311,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1424,7 +1320,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.13.0", @@ -1435,7 +1331,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1455,15 +1351,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "bitvec" @@ -1497,19 +1387,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake3" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -1565,16 +1442,6 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.16.0" @@ -1587,40 +1454,18 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive 0.6.12", - "ptr_meta 0.1.4", - "simdutf8", -] - [[package]] name = "bytecheck" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50c8f430744b23b54ad15161fcbc22d82a29b73eacbe425fea23ec822600bc6f" dependencies = [ - "bytecheck_derive 0.8.0", - "ptr_meta 0.3.0", + "bytecheck_derive", + "ptr_meta", "rancor", "simdutf8", ] -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "bytecheck_derive" version = "0.8.0" @@ -1629,27 +1474,27 @@ checksum = "523363cbe1df49b68215efdf500b103ac3b0fb4836aed6d15689a076eadb8fff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1719,17 +1564,36 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "thiserror 1.0.69", ] +[[package]] +name = "cbindgen" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" +dependencies = [ + "clap", + "heck 0.4.1", + "indexmap 2.7.0", + "log", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.96", + "tempfile", + "toml", +] + [[package]] name = "cc" -version = "1.2.2" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" dependencies = [ "jobserver", "libc", @@ -1759,9 +1623,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1772,16 +1636,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clang-sys" version = "1.8.1" @@ -1795,9 +1649,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", "clap_derive", @@ -1805,9 +1659,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstream", "anstyle", @@ -1817,14 +1671,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -1833,58 +1687,6 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror 1.0.69", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror 1.0.69", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array 0.14.7", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror 1.0.69", -] - [[package]] name = "colorchoice" version = "1.0.3" @@ -1897,24 +1699,30 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bb11bd1378bf3731b182997b40cefe00aba6a6cc74042c8318c1b271d3badf7" dependencies = [ - "nix", + "nix 0.27.1", "thiserror 1.0.69", "tokio", ] [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", ] +[[package]] +name = "const-default" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" + [[package]] name = "const-hex" version = "1.14.0" @@ -1940,12 +1748,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.4" @@ -1981,11 +1783,26 @@ dependencies = [ "libc", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -2002,9 +1819,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -2056,38 +1873,13 @@ dependencies = [ ] [[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.3" +name = "ctrlc" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "fiat-crypto", - "rustc_version 0.4.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", + "nix 0.29.0", + "windows-sys 0.59.0", ] [[package]] @@ -2111,7 +1903,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2122,7 +1914,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2137,7 +1929,6 @@ dependencies = [ "lock_api", "once_cell", "parking_lot_core", - "rayon", ] [[package]] @@ -2231,6 +2022,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] @@ -2255,19 +2047,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.1", - "syn 2.0.90", -] - [[package]] name = "derive_more" version = "1.0.0" @@ -2285,7 +2064,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "unicode-xid", ] @@ -2339,7 +2118,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2360,6 +2139,20 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "downloader" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac1e888d6830712d565b2f3a974be3200be9296bc1b03db8251a4cbf18a4a34" +dependencies = [ + "digest 0.10.7", + "futures", + "rand", + "reqwest", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "dunce" version = "1.0.5" @@ -2374,10 +2167,9 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" -version = "0.16.8" -source = "git+https://github.com/sp1-patches/signatures?tag=ecdsa-v0.16.8-patch-v1#aad9626d51e830729969220eee44de082ff97d53" +version = "0.16.9" +source = "git+https://github.com/sp1-patches/signatures?tag=patch-0.16.9-sp1-4.0.0#5a0aefaef40c7a4cf991ab63f43650fea3ea0db0" dependencies = [ - "anyhow", "cfg-if", "der", "digest 0.10.7", @@ -2385,7 +2177,7 @@ dependencies = [ "hex-literal", "rfc6979", "signature", - "sp1-lib 3.4.0", + "sp1-lib", "spki", ] @@ -2413,6 +2205,7 @@ dependencies = [ "ff 0.13.0", "generic-array 0.14.7", "group 0.13.0", + "pem-rfc7468", "pkcs8", "rand_core", "sec1", @@ -2420,11 +2213,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-alloc" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f2de9133f68db0d4627ad69db767726c99ff8585272716708227008d3f1bddd" +dependencies = [ + "const-default", + "critical-section", + "linked_list_allocator", + "rlsf", +] + [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -2435,24 +2240,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand", - "rlp", - "serde", - "sha3", - "zeroize", -] - [[package]] name = "enum-map" version = "2.7.3" @@ -2471,7 +2258,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2482,7 +2269,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2501,270 +2288,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror 1.0.69", - "uuid 0.8.2", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror 1.0.69", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-middleware", - "ethers-providers", - "ethers-signers", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "syn 2.0.90", - "toml", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.90", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array 0.14.7", - "k256", - "num_enum 0.7.3", - "once_cell", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.90", - "tempfile", - "thiserror 1.0.69", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand", - "sha2", - "thiserror 1.0.69", - "tracing", -] - [[package]] name = "eyre" version = "0.6.12" @@ -2777,9 +2300,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fastrlp" @@ -2793,22 +2316,14 @@ dependencies = [ ] [[package]] -name = "fault-proof" -version = "0.1.0" +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" dependencies = [ - "alloy-consensus 0.6.4", - "anyhow", - "cfg-if", - "kona-driver", - "kona-executor", - "kona-proof", - "op-alloy-genesis", - "op-alloy-rpc-types-engine", - "op-succinct-client-utils", - "serde_json", - "sp1-zkvm", - "tracing", - "tracing-subscriber", + "arrayvec", + "auto_impl", + "bytes", ] [[package]] @@ -2851,12 +2366,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "fixed-hash" version = "0.8.0" @@ -2877,9 +2386,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "foreign-types" @@ -2959,16 +2468,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -2977,7 +2476,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -2992,16 +2491,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.31" @@ -3026,15 +2515,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gcd" version = "2.3.0" @@ -3054,9 +2534,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb8bc4c28d15ade99c7e90b219f30da4be5c88e586277e8cbe886beeb868ab2" +checksum = "96512db27971c2c3eece70a1e106fbe6c87760234e31e8f7e5634912fe52794a" dependencies = [ "serde", "typenum", @@ -3087,7 +2567,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "libgit2-sys", "log", @@ -3096,21 +2576,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -3135,25 +2603,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "h2" version = "0.4.7" @@ -3165,7 +2614,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.2.0", + "http", "indexmap 2.7.0", "slab", "tokio", @@ -3207,9 +2656,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" @@ -3223,7 +2669,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", "serde", ] @@ -3241,13 +2687,10 @@ dependencies = [ ] [[package]] -name = "hashers" -version = "1.0.1" +name = "heck" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" @@ -3277,23 +2720,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "0.2.12" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "bytes", - "fnv", - "itoa", + "digest 0.10.7", ] [[package]] @@ -3307,17 +2739,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -3325,7 +2746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http", ] [[package]] @@ -3336,8 +2757,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -3355,40 +2776,16 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -3400,13 +2797,13 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.2.0", - "hyper 1.5.1", + "http", + "hyper", "hyper-util", "rustls", "rustls-pki-types", @@ -3422,26 +2819,13 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.1", + "hyper", "hyper-util", "pin-project-lite", "tokio", "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.31", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "hyper-tls" version = "0.6.0" @@ -3450,7 +2834,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -3467,9 +2851,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.2.0", - "http-body 1.0.1", - "hyper 1.5.1", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -3615,7 +2999,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3654,24 +3038,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.3" @@ -3680,7 +3046,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3724,15 +3090,6 @@ dependencies = [ "web-time", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "instant" version = "0.1.13" @@ -3813,28 +3170,14 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "jubjub" version = "0.9.0" @@ -3889,7 +3232,7 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", "async-trait", @@ -3910,8 +3253,8 @@ dependencies = [ "revm", "serde", "serde_json", - "spin 0.9.8", - "thiserror 2.0.4", + "spin", + "thiserror 2.0.11", "tracing", ] @@ -3922,7 +3265,7 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "cfg-if", "linked_list_allocator", - "thiserror 2.0.4", + "thiserror 2.0.11", ] [[package]] @@ -3935,7 +3278,7 @@ dependencies = [ "kona-common", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -3945,7 +3288,7 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-rpc-types-engine", "async-trait", @@ -3953,7 +3296,7 @@ dependencies = [ "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", - "thiserror 2.0.4", + "thiserror 2.0.11", "tracing", ] @@ -3963,7 +3306,7 @@ version = "0.1.0" source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4f29839011382425#8ec836eae1cfe2ebad4624ae4f29839011382425" dependencies = [ "alloy-consensus 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "async-trait", "kona-derive", @@ -3971,7 +3314,7 @@ dependencies = [ "op-alloy-genesis", "op-alloy-protocol", "op-alloy-rpc-types-engine", - "thiserror 2.0.4", + "thiserror 2.0.11", "tracing", ] @@ -3982,14 +3325,14 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "kona-mpt", "op-alloy-consensus", "op-alloy-genesis", "op-alloy-rpc-types-engine", "revm", - "thiserror 2.0.4", + "thiserror 2.0.11", "tracing", ] @@ -4000,7 +3343,7 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-provider", "alloy-rlp", "alloy-rpc-client", @@ -4022,7 +3365,7 @@ dependencies = [ "op-alloy-genesis", "op-alloy-protocol", "os_pipe", - "reqwest 0.12.9", + "reqwest", "revm", "rocksdb", "serde", @@ -4037,11 +3380,11 @@ name = "kona-mpt" version = "0.1.0" source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4f29839011382425#8ec836eae1cfe2ebad4624ae4f29839011382425" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-trie", "serde", - "thiserror 2.0.4", + "thiserror 2.0.11", ] [[package]] @@ -4049,10 +3392,10 @@ name = "kona-preimage" version = "0.1.0" source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4f29839011382425#8ec836eae1cfe2ebad4624ae4f29839011382425" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "async-trait", - "rkyv 0.8.9", - "thiserror 2.0.4", + "rkyv", + "thiserror 2.0.11", "tracing", ] @@ -4063,7 +3406,7 @@ source = "git+https://github.com/succinctlabs/kona?rev=8ec836eae1cfe2ebad4624ae4 dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "async-trait", "kona-derive", @@ -4079,22 +3422,22 @@ dependencies = [ "op-alloy-rpc-types-engine", "serde", "serde_json", - "spin 0.9.8", - "thiserror 2.0.4", + "spin", + "thiserror 2.0.11", "tracing", ] [[package]] name = "kzg-rs" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850eb19206463a61bede4f7b7e6b21731807137619044b1f3c287ebcfe2b3b0" +checksum = "08151404e9f89dfc6149ccb2d3e03f2c4ec4f253b721770975da1a1644c6b79f" dependencies = [ "ff 0.13.0", "hex", "sha2", "sp1_bls12_381", - "spin 0.9.8", + "spin", ] [[package]] @@ -4103,7 +3446,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.9.8", + "spin", ] [[package]] @@ -4114,9 +3457,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" @@ -4152,7 +3495,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", ] @@ -4172,9 +3515,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.20" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" +checksum = "df9b68e50e6e0b26f672573834882eb57759f6db9b3be2ea3c35c91188bb4eaa" dependencies = [ "cc", "libc", @@ -4193,9 +3536,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "litemap" @@ -4251,9 +3594,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memuse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" +checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964" [[package]] name = "mime" @@ -4269,9 +3612,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", ] @@ -4304,7 +3647,7 @@ checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4330,11 +3673,23 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "libc", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -4532,10 +3887,9 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4566,9 +3920,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -4587,12 +3941,12 @@ checksum = "fce158d886815d419222daa67fcdf949a34f7950653a4498ebeb4963331f70ed" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-serde 0.6.4", - "derive_more 1.0.0", + "derive_more", "serde", - "thiserror 2.0.4", + "thiserror 2.0.11", ] [[package]] @@ -4603,11 +3957,11 @@ checksum = "2734e9a65efb90fe4520303f984c124766b7d2f2e5dd51cbe54d6269c85a3c91" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", - "alloy-sol-types 0.8.14", + "alloy-primitives", + "alloy-sol-types", "serde", "serde_repr", - "thiserror 2.0.4", + "thiserror 2.0.11", ] [[package]] @@ -4618,7 +3972,7 @@ checksum = "87e4aef8ed017004a176ab1de49df419f59c0fb4a6ce3b693a10fe099fe1afe7" dependencies = [ "alloy-consensus 0.6.4", "alloy-network 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-eth 0.6.4", "alloy-signer 0.6.4", "op-alloy-consensus", @@ -4634,7 +3988,7 @@ dependencies = [ "alloc-no-stdlib", "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "alloy-serde 0.6.4", "async-trait", @@ -4643,7 +3997,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-genesis", "serde", - "thiserror 2.0.4", + "thiserror 2.0.11", "tracing", "unsigned-varint", ] @@ -4654,7 +4008,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589e7906a7c8d71f06b130ee1d8a0a07b0b2cd0e0771157a770e6c20a34da953" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "lazy_static", "op-alloy-genesis", "serde", @@ -4670,10 +4024,10 @@ dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", "alloy-network-primitives 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-eth 0.6.4", "alloy-serde 0.6.4", - "derive_more 1.0.0", + "derive_more", "op-alloy-consensus", "serde", "serde_json", @@ -4686,12 +4040,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "864dbd5511ef4ef00b6c2c980739259b25b24048007b7751ca0069b30b1e3fee" dependencies = [ "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rpc-types-engine", - "derive_more 1.0.0", + "derive_more", "op-alloy-consensus", "op-alloy-protocol", - "thiserror 2.0.4", + "thiserror 2.0.11", ] [[package]] @@ -4709,9 +4063,9 @@ version = "0.1.0" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", - "alloy-sol-types 0.8.14", + "alloy-sol-types", "anyhow", "async-trait", "itertools 0.13.0", @@ -4730,12 +4084,12 @@ dependencies = [ "op-alloy-protocol", "op-alloy-rpc-types-engine", "revm", - "rkyv 0.7.45", + "rkyv", "serde", "serde_json", "sha2", - "spin 0.9.8", - "thiserror 2.0.4", + "spin", + "thiserror 2.0.11", "tracing", ] @@ -4743,7 +4097,7 @@ dependencies = [ name = "op-succinct-fees" version = "0.1.0" dependencies = [ - "alloy-primitives 0.8.14", + "alloy-primitives", "anyhow", "clap", "dotenv", @@ -4758,9 +4112,9 @@ dependencies = [ "alloy", "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", - "alloy-sol-types 0.8.14", + "alloy-sol-types", "anyhow", "cargo_metadata", "dotenv", @@ -4774,8 +4128,8 @@ dependencies = [ "op-alloy-protocol", "op-alloy-rpc-types", "op-succinct-client-utils", - "reqwest 0.12.9", - "rkyv 0.7.45", + "reqwest", + "rkyv", "serde", "serde_cbor", "serde_json", @@ -4789,11 +4143,12 @@ name = "op-succinct-proposer" version = "0.1.0" dependencies = [ "alloy", - "alloy-primitives 0.8.14", + "alloy-primitives", "anyhow", "axum", "base64 0.22.1", "bincode", + "csv", "dotenv", "log", "op-succinct-build-utils", @@ -4811,20 +4166,18 @@ dependencies = [ name = "op-succinct-prove" version = "0.1.0" dependencies = [ - "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "anyhow", "cargo_metadata", "clap", "csv", "dotenv", "kona-host", - "num-format", - "op-alloy-genesis", "op-succinct-build-utils", "op-succinct-client-utils", "op-succinct-host-utils", - "reqwest 0.12.9", + "op-succinct-scripts", + "reqwest", "serde_json", "sp1-sdk", "tokio", @@ -4835,25 +4188,21 @@ name = "op-succinct-scripts" version = "0.1.0" dependencies = [ "alloy", - "alloy-primitives 0.8.14", + "alloy-primitives", "anyhow", "bincode", "cargo_metadata", "clap", "csv", - "dashmap", "dotenv", "futures", "kona-host", "log", - "op-alloy-consensus", - "op-alloy-network", - "op-alloy-rpc-types", "op-succinct-build-utils", "op-succinct-client-utils", "op-succinct-host-utils", "rayon", - "reqwest 0.12.9", + "reqwest", "serde", "serde_json", "sp1-sdk", @@ -4870,38 +4219,13 @@ dependencies = [ "tokio", ] -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -4918,7 +4242,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -4975,9 +4299,9 @@ dependencies = [ [[package]] name = "p3-air" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "066f571b2e645505ed5972dd0e1e252ba03352150830c9566769ca711c0f1e9b" +checksum = "02634a874a2286b73f3e0a121e79d6774e92ccbec648c5568f4a7479a4830858" dependencies = [ "p3-field", "p3-matrix", @@ -4985,9 +4309,9 @@ dependencies = [ [[package]] name = "p3-baby-bear" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff00f571044d299310d9659c6e51c98422de3bf94b8577f7f30cf59cf2043e40" +checksum = "080896e9d09e9761982febafe3b3da5cbf320e32f0c89b6e2e01e875129f4c2d" dependencies = [ "num-bigint 0.4.6", "p3-field", @@ -4998,21 +4322,11 @@ dependencies = [ "serde", ] -[[package]] -name = "p3-blake3" -version = "0.1.4-succinct" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4cb69ae54a279bbbd477566d1bdb71aa879b528fd658d0fcfc36f54b00217c" -dependencies = [ - "blake3", - "p3-symmetric", -] - [[package]] name = "p3-bn254-fr" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf19917f986d45e9abb6d177e875824ced6eed096480d574fce16f2c45c721ea" +checksum = "f8c53da73873e24d751ec3bd9d8da034bb5f99c71f24f4903ff37190182bff10" dependencies = [ "ff 0.13.0", "num-bigint 0.4.6", @@ -5025,9 +4339,9 @@ dependencies = [ [[package]] name = "p3-challenger" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be7e4fbce4566a93091107eadfafa0b5374bd1ffd3e0f6b850da3ff72eb183f" +checksum = "0f5c497659a7d9a87882e30ee9a8d0e20c8dcd32cd10d432410e7d6f146ef103" dependencies = [ "p3-field", "p3-maybe-rayon", @@ -5039,13 +4353,12 @@ dependencies = [ [[package]] name = "p3-commit" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a03eb0f99d68a712c41e658e9a7782a0705d4ffcfb6232a43bd3f1ef9591002" +checksum = "54ec340c5cb17739a7b9ee189378bdac8f0e684b9b5ce539476c26e77cd6a27d" dependencies = [ "itertools 0.12.1", "p3-challenger", - "p3-dft", "p3-field", "p3-matrix", "p3-util", @@ -5054,9 +4367,9 @@ dependencies = [ [[package]] name = "p3-dft" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1556de968523fbe5d804ab50600ea306fcceea3500cfd7601e40882480524664" +checksum = "292e97d02d4c38d8b306c2b8c0428bf15f4d32a11a40bcf80018f675bf33267e" dependencies = [ "p3-field", "p3-matrix", @@ -5067,9 +4380,9 @@ dependencies = [ [[package]] name = "p3-field" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec2af6e1ac47a2035af5165e668d64612c4b9ccabd06df37fc1fd381fdf8a71" +checksum = "f91d8e5f9ede1171adafdb0b6a0df1827fbd4eb6a6217bfa36374e5d86248757" dependencies = [ "itertools 0.12.1", "num-bigint 0.4.6", @@ -5081,9 +4394,9 @@ dependencies = [ [[package]] name = "p3-fri" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f351ee9f9d4256455164565cd91e3e6d2487cc2a5355515fa2b6d479269188dd" +checksum = "4ef838ff24d9b3de3d88d0ac984937d2aa2923bf25cb108ba9b2dc357e472197" dependencies = [ "itertools 0.12.1", "p3-challenger", @@ -5100,9 +4413,9 @@ dependencies = [ [[package]] name = "p3-interpolation" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24d0f2907a374ebe4545fcff3120d6376d9630cf0bef30feedcfc5908ea2c37" +checksum = "c806c3afb8d6acf1d3a78f4be1e9e8b026f13c01b0cdd5ae2e068b70a3ba6d80" dependencies = [ "p3-field", "p3-matrix", @@ -5111,9 +4424,9 @@ dependencies = [ [[package]] name = "p3-keccak-air" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e66badd47cedf6570e91a0cabc389b80dfd53ba1a6e9a45a3923fd54b86122ff" +checksum = "b46cef7ee8ae1f7cb560e7b7c137e272f6ba75be98179b3aa18695705231e0fb" dependencies = [ "p3-air", "p3-field", @@ -5125,9 +4438,9 @@ dependencies = [ [[package]] name = "p3-matrix" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa272f3ae77ed8d73478aa7c89e712efb15bda3ff4aff10fadfe11a012cd5389" +checksum = "98bf2c7680b8e906a5e147fe4ceb05a11cc9fa35678aa724333bcb35c72483c1" dependencies = [ "itertools 0.12.1", "p3-field", @@ -5140,18 +4453,18 @@ dependencies = [ [[package]] name = "p3-maybe-rayon" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eecad6292021858f282d643d9d1284ab112a200494d589863a9c4080e578ef0" +checksum = "fd9ac6f1d11ad4d3c13cc496911109d6282315e64f851a666ed80ad4d77c0983" dependencies = [ "rayon", ] [[package]] name = "p3-mds" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "716c4dbe68a02f1541eb09149d07b8663a3a5951b1864a31cd67ff3bb0826e57" +checksum = "706cea48976f54702dc68dffa512684c1304d1a3606cadea423cfe0b1ee25134" dependencies = [ "itertools 0.12.1", "p3-dft", @@ -5164,9 +4477,9 @@ dependencies = [ [[package]] name = "p3-merkle-tree" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7ebab52a03c26025988663a135aed62f5084a2e2ea262176dc8748efb593e5" +checksum = "1f4ced385da80dd6b3fd830eaa452c9fa899f2dc3f6463aceba00620d5f071ec" dependencies = [ "itertools 0.12.1", "p3-commit", @@ -5181,9 +4494,9 @@ dependencies = [ [[package]] name = "p3-poseidon2" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c042efa15beab7a8c4d0ca9b9e4cbda7582be0c08e121e830fec45f082935b" +checksum = "a2ce5f5ec7f1ba3a233a671621029def7bd416e7c51218c9d1167d21602cf312" dependencies = [ "gcd", "p3-field", @@ -5195,9 +4508,9 @@ dependencies = [ [[package]] name = "p3-symmetric" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9896a831f5b688adc13f6fbe1dcf66ecfaa4622a500f81aa745610e777acb72" +checksum = "2f29dc5bb6c99d3de75869d5c086874b64890280eeb7d3e068955f939e219253" dependencies = [ "itertools 0.12.1", "p3-field", @@ -5206,9 +4519,9 @@ dependencies = [ [[package]] name = "p3-uni-stark" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8437ebcd060c8a5479898030b114a93da8a86eb4c2e5f313d9eeaaf40c6e6f61" +checksum = "83ceaeef06b0bc97e5af2d220cd340b0b3a72bdf37e4584b73b3bc357cfc9ed3" dependencies = [ "itertools 0.12.1", "p3-air", @@ -5225,9 +4538,9 @@ dependencies = [ [[package]] name = "p3-util" -version = "0.1.4-succinct" +version = "0.2.0-succinct" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dedb9d27ba47ac314c6fac4ca54e55c3e486c864d51ec5ba55dbe47b75121157" +checksum = "e1b84d324cd4ac09194a9d0e8ab1834e67a0e47dec477c28fcf9d68b2824c1fe" dependencies = [ "serde", ] @@ -5336,31 +4649,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" +name = "pathdiff" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] -name = "pem" -version = "1.1.1" +name = "pem-rfc7468" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" dependencies = [ - "base64 0.13.1", + "base64ct", ] [[package]] @@ -5371,12 +4671,12 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 1.0.69", + "thiserror 2.0.11", "ucd-trie", ] @@ -5392,29 +4692,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -5461,12 +4761,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5486,9 +4786,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -5511,30 +4808,6 @@ dependencies = [ "toml_edit 0.22.22", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-error-attr2" version = "2.0.0" @@ -5554,14 +4827,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -5574,7 +4847,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits", "rand", @@ -5588,9 +4861,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" dependencies = [ "bytes", "prost-derive", @@ -5598,24 +4871,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" dependencies = [ "anyhow", "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.90", -] - -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive 0.1.4", + "syn 2.0.96", ] [[package]] @@ -5624,18 +4888,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" dependencies = [ - "ptr_meta_derive 0.3.0", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "ptr_meta_derive", ] [[package]] @@ -5646,7 +4899,7 @@ checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -5668,7 +4921,7 @@ dependencies = [ "rustc-hash 2.1.0", "rustls", "socket2", - "thiserror 2.0.4", + "thiserror 2.0.11", "tokio", "tracing", ] @@ -5682,12 +4935,12 @@ dependencies = [ "bytes", "getrandom", "rand", - "ring 0.17.8", + "ring", "rustc-hash 2.1.0", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.4", + "thiserror 2.0.11", "tinyvec", "tracing", "web-time", @@ -5695,9 +4948,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ "cfg_aliases", "libc", @@ -5709,9 +4962,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -5728,7 +4981,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" dependencies = [ - "ptr_meta 0.3.0", + "ptr_meta", ] [[package]] @@ -5777,7 +5030,7 @@ version = "0.1.0" dependencies = [ "alloy-consensus 0.6.4", "alloy-eips 0.6.4", - "alloy-primitives 0.8.14", + "alloy-primitives", "alloy-rlp", "anyhow", "cfg-if", @@ -5835,11 +5088,11 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -5897,82 +5150,33 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck 0.6.12", -] - [[package]] name = "rend" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215" dependencies = [ - "bytecheck 0.8.0", + "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration 0.5.1", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "reqwest" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-rustls", - "hyper-tls 0.6.0", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -5984,17 +5188,18 @@ dependencies = [ "pin-project-lite", "quinn", "rustls", - "rustls-pemfile 2.2.0", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", - "system-configuration 0.6.1", + "sync_wrapper", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", "tokio-util", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -6013,8 +5218,8 @@ checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", - "http 1.2.0", - "reqwest 0.12.9", + "http", + "reqwest", "serde", "thiserror 1.0.69", "tower-service", @@ -6074,9 +5279,9 @@ checksum = "532411bbde45a46707c1d434dcdc29866cf261c1b748fb01b303ce3b4310b361" dependencies = [ "alloy-eip2930", "alloy-eip7702 0.2.0", - "alloy-primitives 0.8.14", + "alloy-primitives", "auto_impl", - "bitflags 2.6.0", + "bitflags", "bitvec", "c-kzg", "cfg-if", @@ -6090,27 +5295,12 @@ dependencies = [ [[package]] name = "rfc6979" version = "0.4.0" -source = "git+https://github.com/sp1-patches/signatures?tag=ecdsa-v0.16.8-patch-v1#aad9626d51e830729969220eee44de082ff97d53" +source = "git+https://github.com/sp1-patches/signatures?tag=patch-0.16.9-sp1-4.0.0#5a0aefaef40c7a4cf991ab63f43650fea3ea0db0" dependencies = [ "hmac", "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -6121,8 +5311,8 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] @@ -6135,52 +5325,23 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "rkyv" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" -dependencies = [ - "bitvec", - "bytecheck 0.6.12", - "bytes", - "hashbrown 0.12.3", - "ptr_meta 0.1.4", - "rend 0.4.2", - "rkyv_derive 0.7.45", - "seahash", - "tinyvec", - "uuid 1.11.0", -] - [[package]] name = "rkyv" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b11a153aec4a6ab60795f8ebe2923c597b16b05bb1504377451e705ef1a45323" dependencies = [ - "bytecheck 0.8.0", + "bytecheck", "bytes", "hashbrown 0.15.2", "indexmap 2.7.0", "munge", - "ptr_meta 0.3.0", + "ptr_meta", "rancor", - "rend 0.5.2", - "rkyv_derive 0.8.9", + "rend", + "rkyv_derive", "tinyvec", - "uuid 1.11.0", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "uuid", ] [[package]] @@ -6191,7 +5352,7 @@ checksum = "beb382a4d9f53bd5c0be86b10d8179c3f8a14c30bf774ff77096ed6581e35981" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6201,19 +5362,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] [[package]] -name = "rlp-derive" -version = "0.1.0" +name = "rlsf" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", +checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf" +dependencies = [ + "cfg-if", + "const-default", + "libc", + "svgbobdoc", ] [[package]] @@ -6239,16 +5400,18 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp", + "fastrlp 0.3.1", + "fastrlp 0.4.0", "num-bigint 0.4.6", + "num-integer", "num-traits", "parity-scale-codec", "primitive-types", @@ -6306,31 +5469,31 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.23", + "semver 1.0.24", ] [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "log", "once_cell", - "ring 0.17.8", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -6346,16 +5509,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.0.1", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", + "security-framework 3.2.0", ] [[package]] @@ -6369,9 +5523,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" dependencies = [ "web-time", ] @@ -6382,16 +5536,16 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -6411,24 +5565,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "scale-info" version = "2.11.6" @@ -6436,7 +5572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" dependencies = [ "cfg-if", - "derive_more 1.0.0", + "derive_more", "parity-scale-codec", "scale-info-derive", ] @@ -6450,14 +5586,14 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "scc" -version = "2.2.5" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" +checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640" dependencies = [ "sdd", ] @@ -6473,11 +5609,11 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" dependencies = [ - "ahash 0.8.11", + "ahash", "cfg-if", "hashbrown 0.13.2", ] @@ -6488,29 +5624,11 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - [[package]] name = "sdd" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" - -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9" [[package]] name = "sec1" @@ -6551,7 +5669,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -6560,11 +5678,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -6573,9 +5691,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -6592,9 +5710,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -6608,12 +5726,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - [[package]] name = "send_wrapper" version = "0.6.0" @@ -6622,9 +5734,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -6641,20 +5753,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "indexmap 2.7.0", "itoa", @@ -6681,7 +5793,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6707,9 +5819,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", @@ -6725,14 +5837,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6757,7 +5869,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -6774,7 +5886,7 @@ dependencies = [ [[package]] name = "sha2" version = "0.10.8" -source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha2-v0.10.8-patch-v1#1f224388fdede7cef649bce0d63876d1a9e3f515" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=patch-sha2-0.10.8-sp1-4.0.0#1f224388fdede7cef649bce0d63876d1a9e3f515" dependencies = [ "cfg-if", "cpufeatures", @@ -6784,7 +5896,7 @@ dependencies = [ [[package]] name = "sha3" version = "0.10.8" -source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=sha3-v0.10.8-patch-v1#8f6d303c0861ba7e5adcc36207c0f41fe5edaabc" +source = "git+https://github.com/sp1-patches/RustCrypto-hashes?tag=patch-sha3-0.10.8-sp1-4.0.0#8f6d303c0861ba7e5adcc36207c0f41fe5edaabc" dependencies = [ "digest 0.10.7", "keccak", @@ -6826,9 +5938,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core", @@ -6840,18 +5952,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint 0.4.6", - "num-traits", - "thiserror 1.0.69", - "time", -] - [[package]] name = "size" version = "0.4.1" @@ -6898,9 +5998,9 @@ dependencies = [ [[package]] name = "sp1-build" -version = "3.4.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58e5f49cf1481363abb74b55104e215f3b6e58dc2adb748bde7a6e4ea61b51d" +checksum = "5e2e8eaf2d29f8e7170c1d901e7c0133399c7fe557aedea659f171a86f34a9f9" dependencies = [ "anyhow", "cargo_metadata", @@ -6911,11 +6011,13 @@ dependencies = [ [[package]] name = "sp1-core-executor" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "386bdb534e0cf3643dd9dd67ed06933730913a03dd1ab0e64893cd969c1da57a" dependencies = [ "bincode", "bytemuck", + "clap", "elf", "enum-map", "eyre", @@ -6925,16 +6027,20 @@ dependencies = [ "log", "nohash-hasher", "num", + "p3-baby-bear", "p3-field", "p3-maybe-rayon", + "p3-util", "rand", "rrs-succinct", "serde", + "serde_json", "sp1-curves", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-stark", "strum", "strum_macros", + "subenum", "thiserror 1.0.69", "tiny-keccak", "tracing", @@ -6944,13 +6050,17 @@ dependencies = [ [[package]] name = "sp1-core-machine" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89881a2078d8e32933e9687a0f146e470842f3674f8a813524d80b7dc42eb7e9" dependencies = [ "bincode", + "cbindgen", + "cc", "cfg-if", "elliptic-curve", - "generic-array 1.1.1", + "generic-array 1.1.0", + "glob", "hashbrown 0.14.5", "hex", "itertools 0.13.0", @@ -6958,24 +6068,30 @@ dependencies = [ "log", "num", "num_cpus", + "p256", "p3-air", "p3-baby-bear", - "p3-blake3", "p3-challenger", "p3-field", "p3-keccak-air", "p3-matrix", "p3-maybe-rayon", + "p3-poseidon2", + "p3-symmetric", "p3-uni-stark", "p3-util", + "pathdiff", "rand", + "rayon", + "rayon-scan", "serde", + "serde_json", "size", "snowbridge-amcl", "sp1-core-executor", "sp1-curves", "sp1-derive", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-stark", "static_assertions", "strum", @@ -6989,31 +6105,50 @@ dependencies = [ "web-time", ] +[[package]] +name = "sp1-cuda" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef50ff96d561bb7e8a000ec35317863a517f7c68f9d1231e1483c4e93c174a1" +dependencies = [ + "bincode", + "ctrlc", + "prost", + "serde", + "sp1-core-machine", + "sp1-prover", + "tokio", + "tracing", + "twirp-rs", +] + [[package]] name = "sp1-curves" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b325b91b40643b36738a4abcdfde81ba8b158e04c3e1a2d94a1942df84e03c8" dependencies = [ "cfg-if", - "curve25519-dalek", "dashu", "elliptic-curve", - "generic-array 1.1.1", + "generic-array 1.1.0", "itertools 0.13.0", "k256", "num", + "p256", "p3-field", "serde", "snowbridge-amcl", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-stark", "typenum", ] [[package]] name = "sp1-derive" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d6abd68038a6f688601cdd0cbec17b56f56e5d10e3f34f1a42bee8cc7ca2c" dependencies = [ "quote", "syn 1.0.109", @@ -7021,50 +6156,20 @@ dependencies = [ [[package]] name = "sp1-lib" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea7811abd2d3a991007fcb284f41152840b8388c171288d0c52c6793956609c" -dependencies = [ - "anyhow", - "bincode", - "cfg-if", - "hex", - "serde", - "snowbridge-amcl", -] - -[[package]] -name = "sp1-lib" -version = "3.4.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5729da1b05d56c01457e5ecabdc77f1cc941df23f2921163a2f325aec22428" -dependencies = [ - "bincode", - "serde", -] - -[[package]] -name = "sp1-primitives" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +checksum = "2378a017c2159e1ab89ed73ff797771ab8b00b11ee1d86852c00c2c9fabc76ce" dependencies = [ "bincode", - "hex", - "lazy_static", - "num-bigint 0.4.6", - "p3-baby-bear", - "p3-field", - "p3-poseidon2", - "p3-symmetric", "serde", - "sha2", + "sp1-primitives", ] [[package]] name = "sp1-primitives" -version = "3.4.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d10c2078a5dfc5c3a632da1bc59b57a19dadc9c03968047d8ffb06c0f83b476" +checksum = "dc7c741d8c2907ac96f71445ed8d7abb0fdbea115c6becbcbc7c35305068320c" dependencies = [ "bincode", "hex", @@ -7080,16 +6185,18 @@ dependencies = [ [[package]] name = "sp1-prover" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82833ca900c54cd9f933560b433e56be97edd7322f8ec1654037e4326f3f6b7e" dependencies = [ "anyhow", "bincode", "clap", "dirs", + "downloader", "eyre", + "hex", "itertools 0.13.0", - "lazy_static", "lru", "num-bigint 0.4.6", "p3-baby-bear", @@ -7099,30 +6206,31 @@ dependencies = [ "p3-field", "p3-matrix", "p3-symmetric", + "p3-util", "rayon", - "reqwest 0.11.27", "serde", "serde_json", "serial_test", + "sha2", "sp1-core-executor", "sp1-core-machine", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-recursion-circuit", "sp1-recursion-compiler", "sp1-recursion-core", "sp1-recursion-gnark-ffi", "sp1-stark", - "subtle-encoding", - "tempfile", "thiserror 1.0.69", "tracing", + "tracing-appender", "tracing-subscriber", ] [[package]] name = "sp1-recursion-circuit" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f0e78b19138ed445e02a2c69ae2115df6be3595bb464fc0e2ade550b7b9601a" dependencies = [ "hashbrown 0.14.5", "itertools 0.13.0", @@ -7144,7 +6252,7 @@ dependencies = [ "sp1-core-executor", "sp1-core-machine", "sp1-derive", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-recursion-compiler", "sp1-recursion-core", "sp1-recursion-gnark-ffi", @@ -7154,8 +6262,9 @@ dependencies = [ [[package]] name = "sp1-recursion-compiler" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6cd484565925bc9f10af6358ebe4f8a2193af635299725294a1ee8441854689" dependencies = [ "backtrace", "itertools 0.13.0", @@ -7165,7 +6274,7 @@ dependencies = [ "p3-symmetric", "serde", "sp1-core-machine", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-recursion-core", "sp1-recursion-derive", "sp1-stark", @@ -7175,13 +6284,19 @@ dependencies = [ [[package]] name = "sp1-recursion-core" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781a49a2ade18ebafc090070a3ce62854ee3aed802fe0f36074cd9984e9183ce" dependencies = [ "backtrace", + "cbindgen", + "cc", + "cfg-if", "ff 0.13.0", + "glob", "hashbrown 0.14.5", "itertools 0.13.0", + "num_cpus", "p3-air", "p3-baby-bear", "p3-bn254-fr", @@ -7196,10 +6311,12 @@ dependencies = [ "p3-poseidon2", "p3-symmetric", "p3-util", + "pathdiff", + "rand", "serde", "sp1-core-machine", "sp1-derive", - "sp1-primitives 3.0.0", + "sp1-primitives", "sp1-stark", "static_assertions", "thiserror 1.0.69", @@ -7210,8 +6327,9 @@ dependencies = [ [[package]] name = "sp1-recursion-derive" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8f0f802f8d5b1a3afca56c5b398c16a0382bef8969be8b9a3edc7b8e8b37be" dependencies = [ "quote", "syn 1.0.109", @@ -7219,8 +6337,9 @@ dependencies = [ [[package]] name = "sp1-recursion-gnark-ffi" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff5b4480f59b320bd25beaf3b19c0d3c9b60d140a99964805b18853a611a8eaf" dependencies = [ "anyhow", "bincode", @@ -7244,20 +6363,20 @@ dependencies = [ [[package]] name = "sp1-sdk" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47b98599a826c8d24976791495bc59c7d8be3af97a515cf5f7a7c3b02daa835" dependencies = [ - "alloy-primitives 0.8.14", - "alloy-signer 0.3.6", - "alloy-signer-local 0.3.6", - "alloy-sol-types 0.7.7", + "alloy-primitives", + "alloy-signer 0.8.3", + "alloy-signer-local 0.8.3", + "alloy-sol-types", "anyhow", "async-trait", "backoff", "bincode", "cfg-if", "dirs", - "ethers", "futures", "hashbrown 0.14.5", "hex", @@ -7268,13 +6387,15 @@ dependencies = [ "p3-field", "p3-fri", "prost", - "reqwest 0.12.9", + "reqwest", "reqwest-middleware", "serde", "serde_json", + "sp1-build", "sp1-core-executor", "sp1-core-machine", - "sp1-primitives 3.0.0", + "sp1-cuda", + "sp1-primitives", "sp1-prover", "sp1-stark", "strum", @@ -7290,13 +6411,14 @@ dependencies = [ [[package]] name = "sp1-stark" -version = "3.0.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=447fda5f759908bbc3091979bd933ee9d126873b#447fda5f759908bbc3091979bd933ee9d126873b" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a4779a915a218d668868fd6d11f6f225e6ec0033121345772214901edc8e9fa" dependencies = [ "arrayref", - "getrandom", "hashbrown 0.14.5", "itertools 0.13.0", + "num-bigint 0.4.6", "num-traits", "p3-air", "p3-baby-bear", @@ -7315,21 +6437,22 @@ dependencies = [ "rayon-scan", "serde", "sp1-derive", - "sp1-primitives 3.0.0", + "sp1-primitives", "strum", "strum_macros", "sysinfo 0.30.13", - "thiserror 1.0.69", "tracing", ] [[package]] name = "sp1-zkvm" -version = "3.4.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea02449a9dcaab67219f7b3442ab51b45ae40e7b04f205382295936087fe1d5" +checksum = "78c9380c49efdf34e6454a735922f794bb1d4b11114c302675087f110c207b56" dependencies = [ "cfg-if", + "critical-section", + "embedded-alloc", "getrandom", "lazy_static", "libm", @@ -7337,31 +6460,25 @@ dependencies = [ "p3-field", "rand", "sha2", - "sp1-lib 3.4.0", - "sp1-primitives 3.4.0", + "sp1-lib", + "sp1-primitives", ] [[package]] name = "sp1_bls12_381" -version = "0.8.0" +version = "0.8.0-sp1-4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27c4b8901334dc09099dd82f80a72ddfc76b0046f4b342584c808f1931bed5a" +checksum = "260e07035fec67f2018dbb70359bed671582160bbcb2419deb812e583c8c975a" dependencies = [ "cfg-if", "ff 0.13.0", "group 0.13.0", "pairing 0.23.0", "rand_core", - "sp1-lib 1.2.0", + "sp1-lib", "subtle", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -7423,17 +6540,29 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.96", +] + +[[package]] +name = "subenum" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5d5dfb8556dd04017db5e318bbeac8ab2b0c67b76bf197bfb79e9b29f18ecf" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "substrate-bn" version = "0.6.0" -source = "git+https://github.com/sp1-patches/bn?tag=substrate_bn-v0.6.0-patch-v2#8ef05d3969312eca34fa9f1f566a469022badda6" +source = "git+https://github.com/sp1-patches/bn?tag=patch-0.6.0-sp1-4.0.0#1bd84110963662fae88baa5ad07c9ab92b6acdbb" dependencies = [ "bytemuck", "byteorder", @@ -7443,7 +6572,7 @@ dependencies = [ "num-bigint 0.4.6", "rand", "rustc-hex", - "sp1-lib 3.4.0", + "sp1-lib", ] [[package]] @@ -7453,12 +6582,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "subtle-encoding" -version = "0.5.1" +name = "svgbobdoc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +checksum = "f2c04b93fc15d79b39c63218f15e3fdffaa4c227830686e3b7c5f41244eb3e50" dependencies = [ - "zeroize", + "base64 0.13.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-width 0.1.14", ] [[package]] @@ -7474,9 +6607,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -7485,34 +6618,16 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c837dc8852cb7074e46b444afb81783140dab12c58867b49fb3898fbafedf7ea" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.90", -] - -[[package]] -name = "syn-solidity" -version = "0.8.14" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" +checksum = "31e89d8bf2768d277f40573c83a02a099e96d96dd3104e13ea676194e61ac4b0" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -7530,7 +6645,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7562,36 +6677,15 @@ dependencies = [ "windows 0.57.0", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys 0.5.0", -] - [[package]] name = "system-configuration" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "system-configuration-sys", ] [[package]] @@ -7612,12 +6706,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -7634,11 +6729,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.4" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl 2.0.11", ] [[package]] @@ -7649,18 +6744,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] name = "thiserror-impl" -version = "2.0.4" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7718,7 +6813,7 @@ dependencies = [ [[package]] name = "tiny-keccak" version = "2.0.2" -source = "git+https://github.com/sp1-patches/tiny-keccak?tag=tiny_keccak-v2.0.2-patch-v1#bf0b28f63510a90c7b6c21ac6ff461c93ecd2331" +source = "git+https://github.com/sp1-patches/tiny-keccak?tag=patch-2.0.2-sp1-4.0.0#d2ffd330259c8f290b07d99cc1ef1f74774382c2" dependencies = [ "cfg-if", "crunchy", @@ -7736,9 +6831,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -7751,9 +6846,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -7769,13 +6864,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -7800,9 +6895,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -7881,7 +6976,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.20", + "winnow 0.6.24", ] [[package]] @@ -7895,18 +6990,18 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.7", - "http 1.2.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", - "rustls-pemfile 2.2.0", + "rustls-pemfile", "socket2", "tokio", "tokio-rustls", @@ -7939,14 +7034,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -7959,10 +7054,10 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.6.0", + "bitflags", "bytes", - "http 1.2.0", - "http-body 1.0.1", + "http", + "http-body", "http-body-util", "pin-project-lite", "tower-layer", @@ -7993,6 +7088,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror 1.0.69", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.28" @@ -8001,7 +7108,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -8027,16 +7134,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -8081,7 +7178,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.2.0", + "http", "httparse", "log", "rand", @@ -8101,16 +7198,16 @@ dependencies = [ "async-trait", "axum", "futures", - "http 1.2.0", + "http", "http-body-util", - "hyper 1.5.1", + "hyper", "prost", - "reqwest 0.12.9", + "reqwest", "serde", "serde_json", "thiserror 1.0.69", "tokio", - "tower 0.5.1", + "tower 0.5.2", "url", ] @@ -8174,12 +7271,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -8223,19 +7314,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "uuid" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" [[package]] name = "valuable" @@ -8286,16 +7367,6 @@ dependencies = [ "libc", ] -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -8313,35 +7384,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -8352,9 +7423,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -8362,22 +7433,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" @@ -8408,9 +7482,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -8457,15 +7531,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -8521,7 +7586,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -8532,7 +7597,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -8733,23 +7798,13 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "write16" version = "1.0.0" @@ -8774,7 +7829,7 @@ dependencies = [ "log", "pharos", "rustc_version 0.4.1", - "send_wrapper 0.6.0", + "send_wrapper", "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", @@ -8810,7 +7865,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -8832,7 +7887,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -8852,7 +7907,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", "synstructure", ] @@ -8873,7 +7928,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] @@ -8895,7 +7950,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.96", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f267449a..6477148e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ reqwest = { version = "0.12", features = ["json"] } csv = "1.3.0" serde = { version = "1.0.198", features = ["derive"] } serde_json = { version = "1.0.117", default-features = false } -rkyv = "0.7.44" +rkyv = { version = "0.8", features = ["bytecheck"] } hex = "0.4.3" bincode = "1.3.3" base64 = "0.22.1" @@ -88,14 +88,10 @@ op-alloy-rpc-types-engine = { version = "0.6.8", default-features = false } op-alloy-network = { version = "0.6.8", default-features = false } # sp1 -sp1-lib = { version = "3.0.0", features = ["verify"] } -sp1-zkvm = { version = "3.0.0", features = ["verify"] } -# Note: This rev includes the SP1 mock groth16 bytes fix, skipping deferred verification, executor opts and network-v2 changes. -# ratan/v3.0.0-w-network-v2 branch includes the network-v2 changes from `19ae3e1`. -sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "447fda5f759908bbc3091979bd933ee9d126873b", features = [ - "network-v2", -] } -sp1-build = { version = "3.0.0" } +sp1-lib = { version = "4.0.0", features = ["verify"] } +sp1-sdk = { version = "4.0.0" } +sp1-zkvm = { version = "4.0.0", features = ["verify", "embedded"] } +sp1-build = { version = "4.0.0" } [profile.release-client-lto] inherits = "release" @@ -104,8 +100,10 @@ codegen-units = 1 lto = "fat" [patch.crates-io] -tiny-keccak = { git = "https://github.com/sp1-patches/tiny-keccak", tag = "tiny_keccak-v2.0.2-patch-v1" } -sha2 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "sha2-v0.10.8-patch-v1" } -ecdsa = { git = "https://github.com/sp1-patches/signatures", tag = "ecdsa-v0.16.8-patch-v1" } -substrate-bn = { git = "https://github.com/sp1-patches/bn", tag = "substrate_bn-v0.6.0-patch-v2" } -sha3 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "sha3-v0.10.8-patch-v1" } +tiny-keccak = { git = "https://github.com/sp1-patches/tiny-keccak", tag = "patch-2.0.2-sp1-4.0.0" } +sha2 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.8-sp1-4.0.0" } +ecdsa = { git = "https://github.com/sp1-patches/signatures", tag = "patch-0.16.9-sp1-4.0.0" } +substrate-bn = { git = "https://github.com/sp1-patches/bn", tag = "patch-0.6.0-sp1-4.0.0" } +sha3 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "patch-sha3-0.10.8-sp1-4.0.0" } + +# Note: kzg-rs must be on version 0.2.4, https://github.com/bluealloy/revm/pull/2002. \ No newline at end of file diff --git a/README.md b/README.md index e283abd2..d874e708 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ OP Succinct turns any OP stack rollup into a full type-1 zkEVM Rollup in 1 hour ## Getting Started -Today, you can already use OP Succinct to upgrade any existing OP Stack rollup to a type-1 zkEVM rollup. To get started, make sure you have [Rust](https://rustup.rs/), [Foundry](https://book.getfoundry.sh/), and [Docker](https://docs.docker.com/engine/install/) installed. Then, follow the steps in the [book](https://succinctlabs.github.io/op-succinct/) to deploy the `OPSuccinctL2OutputOracle` contract and start the `op-succinct-proposer` service. +Today, you can already use OP Succinct to upgrade any existing OP Stack rollup to a type-1 zkEVM rollup. To get started, make sure you have [Rust](https://rustup.rs/), [Foundry](https://book.getfoundry.sh/), and [Docker](https://docs.docker.com/engine/install/) installed. Then, follow the steps in the [book](https://succinctlabs.github.io/op-succinct/) to deploy the `OPSuccinctL2OutputOracle` contract and start the OP Succinct service. ## Repository Overview @@ -19,7 +19,7 @@ The repository is organized into the following directories: - `book`: The documentation for OP Succinct users and developers. - `contracts`: The solidity contracts for posting state roots to L1. - `programs`: The programs for proving the execution and derivation of the L2 state transitions and proof aggregation. -- `proposer`: The implementation of the `op-succinct-proposer` service. +- `proposer`: The implementation of the `op-succinct/op-proposer` and `op-succinct/succinct-proposer` services. - `scripts`: The scripts for proving and generating witnesses. ## Acknowledgments diff --git a/audits/Spearbit.pdf b/audits/Spearbit.pdf new file mode 100644 index 00000000..4fa9ae15 Binary files /dev/null and b/audits/Spearbit.pdf differ diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 9a21f57d..02e44cba 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -13,12 +13,16 @@ - [L2 Node Setup](./advanced/node-setup.md) - [Block Data CLI Tool](./advanced/block-data.md) - [Proposer](./advanced/proposer.md) + - [Toggle Optimistic Mode](./advanced/toggle-optimistic.md) - [Kurtosis](./advanced/kurtosis.md) - [Upgrade to a new `op-succinct` version](./advanced/upgrade.md) -- [`OPSuccinctL2OutputOracle`](./contracts/intro.md) +- [Contracts](./contracts/intro.md) - [Configuration](./contracts/configuration.md) - [Deploy](./contracts/deploy.md) - [Upgrade Contract](./contracts/upgrade.md) - [Update Contract Parameters](./contracts/update-parameters.md) - [Modifications to Original `L2OutputOracle`](./contracts/modifications.md) +- [Experimental](./experimental/intro.md) + - [OptimismPortalV2](./experimental/optimism-portal-v2.md) - [FAQ](./faq.md) +- [Troubleshooting](./troubleshooting.md) diff --git a/book/advanced/proposer.md b/book/advanced/proposer.md index ea3dcbd9..b3e53e7c 100644 --- a/book/advanced/proposer.md +++ b/book/advanced/proposer.md @@ -1,37 +1,54 @@ # Proposer The `op-succinct` service consists of two containers: -- `op-succinct-server`: Receives proof requests from the `op-succinct-proposer`, generates the witness for the proof, and submits the proof to the Succinct Prover Network. Handles the communication with the [Succinct's Prover Network](https://docs.succinct.xyz/generating-proofs/prover-network) to fetch the proof status and completed proof data. -- `op-succinct-proposer`: Monitors L1 state to determine when to request a proof. Sends proof requests to the `op-succinct-server`. Once proofs have been generated for a sufficiently large range, aggregates range proofs into an aggregation proof. Submits the aggregation proof to the `OPSuccinctL2OutputOracle` contract which includes the L2 state outputs. +- [`op-succinct/succinct-proposer`](https://ghcr.io/succinctlabs/op-succinct/succinct-proposer): Receives proof requests from the `op-succinct/op-proposer`, generates the witness for the proof, and submits the proof to the Succinct Prover Network. Handles the communication with the [Succinct's Prover Network](https://docs.succinct.xyz/docs/generating-proofs/prover-network) to fetch the proof status and completed proof data. +- [`op-succinct/op-proposer`](https://ghcr.io/succinctlabs/op-succinct/op-proposer): Monitors L1 state to determine when to request a proof. Sends proof requests to the `op-succinct/succinct-proposer`. Once proofs have been generated for a sufficiently large range, aggregates range proofs into an aggregation proof. Submits the aggregation proof to the `OPSuccinctL2OutputOracle` contract which includes the L2 state outputs. We've packaged the `op-succinct` service in a docker compose file to make it easier to run. -## Prerequisites +# Prerequisites -### RPC Requirements +## RPC Requirements Confirm that your RPC's have all of the required endpoints. More details can be found in the [prerequisites](../quick-start/prerequisites.md#requirements) section. -### Hardware Requirements +## Hardware Requirements We recommend the following hardware configuration for the `op-succinct` service containers: Using the docker compose file: -- `op-succinct`: 16 vCPUs, 16GB RAM +- Full `op-succinct` service: 16 vCPUs, 64GB RAM. +- Mock `op-succinct` service: 32 vCPUs, 128GB RAM. Increased memory because the machine is executing the proofs locally. Running as separate containers: -- `op-succinct-server`: 16 vCPUs, 16GB RAM -- `op-succinct-proposer`: 1 vCPU, 4GB RAM +- [`op-succinct/succinct-proposer`](https://ghcr.io/succinctlabs/op-succinct/succinct-proposer): + - Full `op-succinct` service: 16 vCPUs, 64GB RAM. + - Mock `op-succinct` service: 32 vCPUs, 128GB RAM. Increased memory because the machine is executing the proofs locally. +- [`op-succinct/op-proposer`](https://ghcr.io/succinctlabs/op-succinct/op-proposer): 1 vCPU, 4GB RAM For advanced configurations, depending on the number of concurrent requests you expect, you may need to increase the number of vCPUs and memory allocated to the `op-succinct-server` container. -## Environment Setup +# Environment Setup -### Required Environment Variables +If you are running the `op-succinct` service as a Docker Compose service, you should include *all* of the required environment variables in the `.env` file for both the `op-succinct/succinct-proposer` and `op-succinct/op-proposer` services. -Before starting the proposer, the following environment variables should be in your `.env` file. You should have already set up your environment when you deployed the L2 Output Oracle. If you have not done so, follow the steps in the [Contract Configuration](../contracts/configuration.md) section. +Before starting the proposer, ensure you have deployed the L2 Output Oracle and have the address of the proxy contract ready. Follow the steps in the [Contract Configuration](../contracts/configuration.md) section. + +## Required Environment Variables + +### `op-succinct/succinct-proposer` + +| Parameter | Description | +|-----------|-------------| +| `L1_RPC` | L1 Archive Node. | +| `L1_BEACON_RPC` | L1 Consensus (Beacon) Node. | +| `L2_RPC` | L2 Execution Node (`op-geth`). | +| `L2_NODE_RPC` | L2 Rollup Node (`op-node`). | +| `NETWORK_PRIVATE_KEY` | Key for the Succinct Prover Network. Get access [here](https://docs.succinct.xyz/docs/generating-proofs/prover-network). | + +### `op-succinct/op-proposer` | Parameter | Description | |-----------|-------------| @@ -39,53 +56,60 @@ Before starting the proposer, the following environment variables should be in y | `L1_BEACON_RPC` | L1 Consensus (Beacon) Node. | | `L2_RPC` | L2 Execution Node (`op-geth`). | | `L2_NODE_RPC` | L2 Rollup Node (`op-node`). | -| `PROVER_NETWORK_RPC` | Default: `rpc.succinct.xyz`. | -| `SP1_PRIVATE_KEY` | Key for the Succinct Prover Network. Get access [here](https://docs.succinct.xyz/generating-proofs/prover-network). | -| `SP1_PROVER` | Default: `network`. Set to `network` to use the Succinct Prover Network. | -| `PRIVATE_KEY` | Private key for the account that will be deploying the contract and posting output roots to L1. | | `L2OO_ADDRESS` | Address of the `OPSuccinctL2OutputOracle` contract. | +| `PRIVATE_KEY` | Private key for the account that will be posting output roots to L1. | + +## Advanced Environment Variables + +### `op-succinct/succinct-proposer` -### Advanced Environment Variables +| Parameter | Description | +|-----------|-------------| +| `NETWORK_RPC_URL` | Default: `https://rpc.production.succinct.xyz`. RPC URL for the Succinct Prover Network. | +| `RANGE_PROOF_STRATEGY` | Default: `reserved`. Set to `hosted` to use hosted proof strategy. | +| `AGG_PROOF_STRATEGY` | Default: `reserved`. Set to `hosted` to use hosted proof strategy. | -The following environment variables are optional. +### `op-succinct/op-proposer` | Parameter | Description | |-----------|-------------| | `MAX_CONCURRENT_PROOF_REQUESTS` | Default: `10`. The maximum number of concurrent proof requests to send to the `op-succinct-server`. | +| `MAX_CONCURRENT_WITNESS_GEN` | Default: `5`. The maximum number of concurrent witness generation processes to run on the `op-succinct-server`. | +| `WITNESS_GEN_TIMEOUT` | Default: `1200`. The maximum time in seconds to spend generating a witness for `op-succinct-server`. | | `MAX_BLOCK_RANGE_PER_SPAN_PROOF` | Default: `300`. The maximum number of blocks to include in each span proof. For chains with high throughput, you need to decrease this value. | | `OP_SUCCINCT_MOCK` | Default: `false`. Set to `true` to run in mock proof mode. The `OPSuccinctL2OutputOracle` contract must be configured to use an `SP1MockVerifier`. | -| `OP_SUCCINCT_SERVER_URL` | Default: `http://op-succinct-server:3000`. The URL of the `op-succinct-server` service which the `op-succinct-proposer` will send proof requests to. | +| `OP_SUCCINCT_SERVER_URL` | Default: `http://op-succinct-server:3000`. The URL of the `op-succinct-server` service which the `op-succinct/op-proposer` will send proof requests to. | | `METRICS_ENABLED` | Default: `true`. Set to `false` to disable metrics collection. | | `METRICS_PORT` | Default: `7300`. The port to run the metrics server on. | | `DB_PATH` | Default: `/usr/local/bin/dbdata`. The path to the database directory within the container. | -| `POLL_INTERVAL` | Default: `20s`. The interval at which the `op-succinct-proposer` service runs. | +| `POLL_INTERVAL` | Default: `20s`. The interval at which the `op-succinct/op-proposer` service runs. | | `USE_CACHED_DB` | Default: `false`. Set to `true` to use cached proofs from previous runs when restarting the service, avoiding regeneration of unused proofs. | -## Build the Proposer Service +# Build the Proposer Service -Build the docker images for the `op-succinct-proposer` service. +Build the docker images for the OP Succinct services. ```bash docker compose build ``` -## Run the Proposer +# Run the Proposer -This command launches the `op-succinct-proposer` service in the background. It launches two containers: one container that manages proof generation and another container that is a small fork of the original `op-proposer` service. - -After a few minutes, you should see the `op-succinct-proposer` service start to generate range proofs. Once enough range proofs have been generated, they will be verified in an aggregate proof and submitted to the L1. +Now, launch both services in the background. ```bash docker compose up ``` -To see the logs of the `op-succinct-proposer` service, run: +To see the logs of the OP Succinct services, run: ```bash docker compose logs -f ``` -and to stop the `op-succinct-proposer` service, run: +After a few minutes, you should see the OP Succinct services start to generate range proofs. Once enough range proofs have been generated, they will be verified in an aggregate proof and submitted to the L1. + +To stop the OP Succinct services, run: ```bash docker compose stop diff --git a/book/advanced/toggle-optimistic.md b/book/advanced/toggle-optimistic.md new file mode 100644 index 00000000..3dbccf79 --- /dev/null +++ b/book/advanced/toggle-optimistic.md @@ -0,0 +1,39 @@ +# Toggle Optimistic Mode + +Optimistic mode is a feature that allows the L2OutputOracle to accept outputs without verification (mirroring the original `L2OutputOracle` contract). This is useful for testing and development purposes, and as a fallback for when `OPSuccinctL2OutputOracle` is unable to verify outputs. + +When optimistic mode is enabled, the `OPSuccinctL2OutputOracle`'s `proposeL2Output` function will match the interface of the original L2OutputOracle contract, with the modification that the proposer address must be in the `approvedProposers` mapping, or permissionless proposing must be enabled. + +## Enable Optimistic Mode + +> **Warning**: If you had permissionless proving enabled in non-optimistic (OP Succinct) mode, ensure that `address(0)` is set to false in the `approvedProposers` mapping before enabling optimistic mode. If `address(0)` remains approved, any account will be able to submit outputs without verification in optimistic mode. + +To enable optimistic mode, call the `enableOptimisticMode` function on the `OPSuccinctL2OutputOracle` contract. + +```solidity +function enableOptimisticMode(uint256 _finalizationPeriodSeconds) external onlyOwner whenNotOptimistic { + finalizationPeriodSeconds = _finalizationPeriodSeconds; + optimisticMode = true; + emit OptimisticModeToggled(true, _finalizationPeriodSeconds); +} +``` + +Ensure that the `finalizationPeriodSeconds` is set to a value that is appropriate for your use case. The standard setting is 1 week (604800 seconds). + +The `finalizationPeriodSeconds` should never be 0. + +## Disable Optimistic Mode + +By default, optimistic mode is disabled. To switch back to validity mode, call the `disableOptimisticMode` function on the `OPSuccinctL2OutputOracle` contract. + +```solidity +function disableOptimisticMode(uint256 _finalizationPeriodSeconds) external onlyOwner whenOptimistic { + finalizationPeriodSeconds = _finalizationPeriodSeconds; + optimisticMode = false; + emit OptimisticModeToggled(false, _finalizationPeriodSeconds); +} +``` + +Set the `finalizationPeriodSeconds` to a value that is appropriate for your use case. An example configuration is 1 hour (3600 seconds). + +The `finalizationPeriodSeconds` should never be 0. diff --git a/book/advanced/verify-binaries.md b/book/advanced/verify-binaries.md index a6275686..43a66d3a 100644 --- a/book/advanced/verify-binaries.md +++ b/book/advanced/verify-binaries.md @@ -10,7 +10,7 @@ Recall there are two programs used in OP Succinct: ## Prerequisites -To reproduce the OP Succinct program binaries, you first need to install the [cargo prove](https://docs.succinct.xyz/getting-started/install.html#option-1-prebuilt-binaries-recommended) toolchain. +To reproduce the OP Succinct program binaries, you first need to install the [cargo prove](https://docs.succinct.xyz/docs/getting-started/install.html#option-1-prebuilt-binaries-recommended) toolchain. Ensure that you have the latest version of the toolchain by running: @@ -37,11 +37,11 @@ Then build the binaries: ```bash cd programs/range # Build the range-elf -cargo prove build --elf-name range-elf --docker +cargo prove build --elf-name range-elf --docker --tag v4.0.0-rc.10 cd ../aggregation # Build the aggregation-elf -cargo prove build --elf-name aggregation-elf --docker +cargo prove build --elf-name aggregation-elf --docker --tag v4.0.0-rc.10 ``` Now, verify the binaries by confirming the output of `vkey` matches the vkeys on the contract. The `vkey` program outputs the verification keys diff --git a/book/architecture.md b/book/architecture.md index 20331245..5c0a0e11 100644 --- a/book/architecture.md +++ b/book/architecture.md @@ -1,25 +1,72 @@ # Architecture -## Prerequisites +## System Overview -Every OP Stack rollup is composed of four main components. +OP Succinct transforms any OP Stack chain into a fully validity-proven rollup with a lightweight upgrade that maintains compatibility with existing OP Stack components. -- `op-geth`: Takes transactions from users and uses them to generate blocks and execute blocks. -- `op-batcher`: Batches transactions from users and submits them to the L1. -- `op-node`: Reads batch data from L1 and uses it to drive `op-geth` in non-sequencer mode to perform state transitions. -- `op-proposer`: Posts an output root to L1 at regular intervals, which captures the L2 state so withdrawals can be processed. +This document explains the standard OP Stack components and the lightweight modifications OP Succinct adds to enable proving blocks with zero-knowledge proofs using [SP1](https://docs.succinct.xyz/docs/introduction). -You can read more about the components in the [OP Stack Specification](https://specs.optimism.io/). +## Standard OP Stack Components -## OP Succinct +Every OP Stack rollup consists of four main components: -OP Succinct is a lightweight upgrade to the OP Stack that allows the chain to progress only with ZK-proven blocks, while keeping the other components (`op-geth`, `op-batcher`, and `op-node`) unchanged. Deploying OP Succinct requires deploying one contract, `OPSuccinctL2OutputOracle`, and spinning up a lightweight modification to the `op-proposer` that requests proofs to be submitted to the L1 contract. +- `op-geth`: The execution engine that: + - Processes user transactions + - Generates and executes blocks + - Maintains the L2 state +- `op-batcher`: The transaction bundler that: + - Collects user transactions + - Batches them efficiently + - Submits batches to L1 for data availability +- `op-node`: The derivation engine that: + - Reads batch data from L1 + - Generates payload attributes + - Passes payload attributes to `op-geth` to perform state transitions +- `op-proposer`: The state commitment component that: + - Posts output roots to L1 at regular intervals + - Capturing the L2 state and enabling withdrawal processing -Here is a high-level overview of the new components that are introduced in OP Succinct: +For more details on these components, refer to the [OP Stack Specification](https://specs.optimism.io/). -- **Range Program.** A program that derives and executes batches of blocks. The program is written in Rust and designed to be executed inside the zkVM. -- **Aggregation Program.** Aggregates proofs of range programs to reduce on-chain verification costs. This program is also written in Rust and designed to be executed inside the zkVM. -- **OP Succinct L2 Output Oracle.** A solidity smart contract that contains an array of L2 state outputs, where each output is a commit to the state of the L2 chain. This [contract](https://github.com/ethereum-optimism/optimism/blob/3e68cf018d8b9b474e918def32a56d1dbf028d83/packages/contracts-bedrock/src/L1/L2OutputOracle.sol) already exists in Optimism's original system but is modified to verify proofs as the authentication mechanism. -- **OP Succinct Proposer.** Observes the posted batches on L1 and controls the proving of the range and aggregation programs. +## OP Succinct Extensions + +OP Succinct enables OP Stack blocks to be proven with SP1 through a lightweight upgrade to op-proposer and the on-chain contract that tracks valid L2 state roots. No changes are needed to `op-geth`, `op-batcher`, or `op-node`. + +### Core Components + +1. **[Range Program](/programs/range/src/main.rs)** + - Derives and executes batches of blocks + - Generates proofs of correct execution + +2. **[Aggregation Program](/programs/aggregation/src/main.rs)** + - Aggregates multiple range program proofs + - Reduces on-chain verification costs + +3. **OP Succinct L2 Output Oracle** + - Modified version of the original [L2OutputOracle contract](https://github.com/ethereum-optimism/optimism/blob/3e68cf018d8b9b474e918def32a56d1dbf028d83/packages/contracts-bedrock/src/L1/L2OutputOracle.sol) + - Stores array of L2 state outputs + - Modified to verify ZK proofs to accept output proposals + +4. **OP Succinct Proposer** + - Orchestrates the proving pipeline + - Monitors L1 for posted batches + - Manages proof generation and submission using the range and aggregation programs + +### Data Flow ![OP Succinct Architecture](./assets/op-succinct-proposer-architecture.jpg) + +1. User transactions are processed by standard OP Stack components. +2. The range program generates proofs for batches of transactions. +3. The aggregation program combines these proofs for on-chain verification efficiency. +4. The OP Succinct Proposer submits L2 state outputs to L1 with ZK proofs. +5. The L2 Output Oracle verifies the ZK proofs and accepts valid output proposals. + +## Deployment Requirements + +To upgrade an existing OP Stack rollup to a fully type-1 ZK rollup using OP Succinct: + +1. Deploy the `OPSuccinctL2OutputOracle` contract. +2. Configure and start the OP Succinct Proposer instead of the standard `op-proposer`. + +This minimal change set ensures a smooth transition while leveraging the security benefits of ZK proofs. diff --git a/book/contracts/configuration.md b/book/contracts/configuration.md index 3cfdadfe..86a27a8d 100644 --- a/book/contracts/configuration.md +++ b/book/contracts/configuration.md @@ -27,4 +27,9 @@ You can configure additional parameters when deploying or upgrading the `OPSucci | `FINALIZATION_PERIOD_SECS` | Default: `3600` (1 hour). The time period (in seconds) after which a proposed output becomes finalized and withdrawals can be processed. | | `PROPOSER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. An Ethereum address authorized to submit proofs. Set to `address(0)` to allow permissionless submissions. **Note: Use `addProposer` and `removeProposer` functions to update the list of approved proposers.** | | `CHALLENGER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. Ethereum address authorized to dispute proofs. Set to `address(0)` for no challenging. | -| `OWNER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. Ethereum address authorized to update the `aggregationVkey`, `rangeVkeyCommitment`, `verifier`, and `rollupConfigHash` parameters. Can also transfer ownership of the contract and update the approved proposers. In a production setting, set to the governance smart contract or multi-sig of the chain. | +| `OWNER` | Default: The address of the account associated with `PRIVATE_KEY`. If `PRIVATE_KEY` is not set, `address(0)`. Ethereum address authorized to update the `aggregationVkey`, `rangeVkeyCommitment`, `verifier`, and `rollupConfigHash` parameters. Can also transfer ownership of the contract and |update the approved proposers. In a production setting, set to the governance smart contract or multi-sig of the chain. | +| `DEPLOY_PK` | Default: The address of the account associated with `PRIVATE_KEY`. The private key of the account that will be deploying the contract. | +| `ADMIN_PK` | Default: The address of the account associated with `PRIVATE_KEY`. The private key of the account that will be deploying the contract. | +| `PROXY_ADMIN` | Default: `address(0)`. The address of the L1 `ProxyAdmin` contract used to manage the `OPSuccinctL2OutputOracle` proxy. More information can be found [here](https://docs.optimism.io/chain/security/privileged-roles#l1-proxy-admin). | +| `OP_SUCCINCT_L2_OUTPUT_ORACLE_IMPL` | Default: `address(0)`. The address of an already-deployed `OPSuccinctL2OutputOracle` implementation contract. If this is not set, a new `OPSuccinctL2OutputOracle` implementation contract will be deployed. | + diff --git a/book/experimental/intro.md b/book/experimental/intro.md new file mode 100644 index 00000000..3f5e9950 --- /dev/null +++ b/book/experimental/intro.md @@ -0,0 +1,3 @@ +# Experimental + +This section contains experimental topics for OP Succinct. diff --git a/book/experimental/optimism-portal-v2.md b/book/experimental/optimism-portal-v2.md new file mode 100644 index 00000000..38b31265 --- /dev/null +++ b/book/experimental/optimism-portal-v2.md @@ -0,0 +1,46 @@ +# OptimismPortalV2 + +If you want to use `OptimismPortalV2` or conform to Optimism's `IDisputeGame`, you can follow this section that describe how to deploy the 2 contracts: + +* `OPSuccinctDisputeGame` a thin wrapper around `OPSuccinctL2OutputOracle` that implements `IDisputeGame`. +* `OPSuccinctDisputeGameFactory` the proposer entry point when creating new dispute game. + +And instructions about how to configure the proposer to use them. + +After having done the step 2) either in mock or full mode, with `L2OO_ADDRESS` set with the address of the `OPSuccinctL2OutputOracle` contract in your `.env` file, +run the following to deploy the contracts: + +```shell +just deploy-dispute-game-factory +``` + +If successful, you should see the following output: + +``` +[⠊] Compiling... +[⠊] Compiling 1 files with Solc 0.8.15 +[⠒] Solc 0.8.15 finished in 1.93s +Compiler run successful! +Script ran successfully. + +== Return == +0: address 0x6B3342821680031732Bc7d4E88A6528478aF9E38 + +## Setting up 1 EVM. + +========================== + +Chain 3151908 + +Estimated gas price: 1.000000014 gwei + +Estimated total gas used for script: 1614671 + +Estimated amount required: 0.001614671022605394 ETH + +========================== +``` + +In these deployment logs, `0x6B3342821680031732Bc7d4E88A6528478aF9E38` is the address of the proxy for the `OPSuccinctDisputeGameFactory` contract. + +In order to have the poposer to use it, you have to add a new variable `DGF_ADDRESS` to your `.env` file with the value above. \ No newline at end of file diff --git a/book/introduction.md b/book/introduction.md index 6a166360..0f091d8d 100644 --- a/book/introduction.md +++ b/book/introduction.md @@ -1,13 +1,33 @@ # OP Succinct -*Documentation for OP Succinct users and developers.* +*Documentation for OP Stack rollup operators and developers looking to upgrade to a Type-1 ZK rollup.* -OP Succinct transforms any OP Stack rollup into a [fully type-1 ZK rollup](https://vitalik.eth.limo/general/2022/08/04/zkevm.html) using SP1. OP Succinct provides: +## Overview + +OP Succinct transforms any OP Stack rollup into a [fully type-1 ZK rollup](https://vitalik.eth.limo/general/2022/08/04/zkevm.html) using SP1. This means your rollup can benefit from the security of zero-knowledge proofs while maintaining compatibility with the OP Stack ecosystem. + +### Key Benefits - **1 hour finality** secured by ZKPs, a dramatic improvement over the 7-day withdrawal window of standard OP Stack rollups. - **Unlimited customization** for rollup modifications in pure Rust and easy maintainability. - **Cost-effective proving** with an average cost of proving only fractions of cent per transaction (with an expected 5-10x improvement by EOY), thanks to SP1's blazing fast performance. +## Getting Started + +1. Check the [Prerequisites](./quick-start/prerequisites.md) to ensure your environment is ready. +2. Run the [Cost Estimator](./quick-start/cost-estimator.md) to understand the resource requirements for proving. +3. Try [OP Succinct in Mock Mode](./quick-start/mock.md) for development. +4. Deploy [OP Succinct in Full Mode](./quick-start/full.md) for production. + +## Support and Community + All of this has been possible thanks to close collaboration with the core team at [OP Labs](https://www.oplabs.co/). -**Reach out [today](https://docs.google.com/forms/d/e/1FAIpQLSd2Yil8TrU54cIuohH1WvDvbxTusyqh5rsDmMAtGC85-Arshg/viewform?ref=https://succinctlabs.github.io/op-succinct/) if you want a Type-1 zkEVM rollup powered by SP1 (either a new rollup or a conversion from an optimistic rollup).** +**Ready to upgrade your rollup? [Contact us](https://docs.google.com/forms/d/e/1FAIpQLSd2Yil8TrU54cIuohH1WvDvbxTusyqh5rsDmMAtGC85-Arshg/viewform?ref=https://succinctlabs.github.io/op-succinct/) to get started with a Type-1 zkEVM rollup powered by SP1.** + +## Documentation Structure + +- **Quick Start**: Get up and running quickly with basic setup and configuration. +- **Advanced**: Detailed guides for production deployment and maintenance. +- **Contracts**: `OPSuccinctL2OutputOracle` contract documentation and deployment guides. +- **FAQ & Troubleshooting**: Common issues and their solutions. diff --git a/book/quick-start/full.md b/book/quick-start/full.md index 662096cf..d6be2e0b 100644 --- a/book/quick-start/full.md +++ b/book/quick-start/full.md @@ -4,7 +4,7 @@ Running OP Succinct in full mode will generate proofs of valid OP Stack L2 outpu ## Prerequisites -You will need a whitelisted key on the Succinct Prover Network. Follow the instructions [here](https://docs.succinct.xyz/generating-proofs/prover-network) to get your key whitelisted. +You will need a whitelisted key on the Succinct Prover Network. Follow the instructions [here](https://docs.succinct.xyz/docs/generating-proofs/prover-network) to get your key whitelisted. To get access to the Succinct Prover Network for OP Succinct, fill out this [form](https://docs.google.com/forms/d/e/1FAIpQLSd2Yil8TrU54cIuohH1WvDvbxTusyqh5rsDmMAtGC85-Arshg/viewform?ref=https://succinctlabs.github.io/op-succinct/). The Succinct team will reach out to you with an RPC endpoint you can use. @@ -25,7 +25,7 @@ In the root directory, create a file called `.env` and set the following environ There are additional optional parameters that you can set in the `.env` file. See the [Advanced Parameters](../contracts/configuration.md#optional-advanced-parameters) section for more information. -### 2) Deploy the `OPSuccinctL2OutputOracle` contract. +### 2) Deploy the `OPSuccinctL2OutputOracle` contract This contract is a modification of the `L2OutputOracle` contract which verifies a proof along with the proposed state root. @@ -77,8 +77,8 @@ To start the `op-succinct` service, add the following parameters to the `.env` f | Parameter | Description | |-----------|-------------| | `L2OO_ADDRESS` | The address of the `OPSuccinctL2OutputOracle` contract from the previous step. | -| `SP1_PRIVATE_KEY` | The private key for the account that will be submitting proofs to the L1. | -| `PROVER_NETWORK_RPC` | The RPC endpoint for the Succinct Prover Network. The default endpoint (`https://rpc.succinct.xyz`) is not suitable for use in OP Succinct. Reach out to the Succinct team to get access with OP Succinct. | +| `NETWORK_PRIVATE_KEY` | The private key for the account that will be submitting proofs to the L1. | +| `NETWORK_RPC_URL` | The RPC endpoint for the Succinct Prover Network. The default endpoint (`https://rpc.succinct.xyz`) is not suitable for use in OP Succinct. Reach out to the Succinct team to get access with OP Succinct. | Now, you should have the following in your `.env` file: @@ -91,8 +91,8 @@ Now, you should have the following in your `.env` file: | `PRIVATE_KEY` | Private key for the account that will be deploying the contract and relaying proofs on-chain. | | `ETHERSCAN_API_KEY` | Etherscan API key for verifying the deployed contracts. | | `L2OO_ADDRESS` | The address of the `OPSuccinctL2OutputOracle` contract from the previous step. | -| `SP1_PRIVATE_KEY` | The private key for the account that will be submitting proofs to the L1. | -| `PROVER_NETWORK_RPC` | Reach out to the Succinct team to get access [here](https://docs.google.com/forms/d/e/1FAIpQLSd2Yil8TrU54cIuohH1WvDvbxTusyqh5rsDmMAtGC85-Arshg/viewform?ref=https://succinctlabs.github.io/op-succinct/). The default endpoint (`https://rpc.succinct.xyz`) is not suitable for use in OP Succinct. | +| `NETWORK_PRIVATE_KEY` | The private key for the account that will be submitting proofs to the L1. | +| `NETWORK_RPC_URL` | Reach out to the Succinct team to get access [here](https://docs.google.com/forms/d/e/1FAIpQLSd2Yil8TrU54cIuohH1WvDvbxTusyqh5rsDmMAtGC85-Arshg/viewform?ref=https://succinctlabs.github.io/op-succinct/). The default endpoint (`https://rpc.succinct.xyz`) is not suitable for use in OP Succinct. | ### 4) Start the `op-succinct` service. @@ -104,11 +104,11 @@ We provide a Docker Compose file for running the `op-succinct` service. docker compose build ``` -#### Run the Proposer +#### Run OP Succinct -This command launches the [op-succinct service](../advanced/proposer.md) in the background. It launches two containers: one container that manages proof generation and another container that is a small fork of the original op-proposer service. +This command launches [OP Succinct](../advanced/proposer.md) in the background. It launches two containers: one container that manages proof generation and another container that is a small fork of the original op-proposer service. -After a few minutes, you should see the op-succinct-proposer service start to request proofs from the Succinct Prover Network. Once enough proofs have been generated, an aggregate proof will be requested and submitted to the L1. +After a few minutes, you should see the OP Succinct service start to request proofs from the Succinct Prover Network. Once enough proofs have been generated, an aggregate proof will be requested and submitted to the L1. ```shell docker compose up diff --git a/book/quick-start/mock.md b/book/quick-start/mock.md index f53127a3..9f088116 100644 --- a/book/quick-start/mock.md +++ b/book/quick-start/mock.md @@ -65,7 +65,7 @@ If you have multiple environments, you can pass the environment file to the `dep just deploy-mock-verifier ``` -### 3) Deploy the `OPSuccinctL2OutputOracle` contract. +### 3) Deploy the `OPSuccinctL2OutputOracle` contract This contract is a modification of the `L2OutputOracle` contract which verifies a proof along with the proposed state root. @@ -152,7 +152,7 @@ docker compose build This command launches the [op-succinct service](../advanced/proposer.md) in the background. It launches two containers: one container that manages proof generation and another container that is a small fork of the original op-proposer service. -After a few minutes, you should see the op-succinct-proposer service start to generate mock range proofs. Once enough range proofs have been generated, a mock aggregate proof will be created and submitted to the L1. +After a few minutes, you should see the OP Succinct service start to generate mock range proofs. Once enough range proofs have been generated, a mock aggregate proof will be created and submitted to the L1. ```shell docker compose up diff --git a/book/quick-start/upgrade-l2-output-oracle.md b/book/quick-start/upgrade-l2-output-oracle.md index 89ee7c19..c170f936 100644 --- a/book/quick-start/upgrade-l2-output-oracle.md +++ b/book/quick-start/upgrade-l2-output-oracle.md @@ -2,6 +2,6 @@ The last step is to update your OP Stack configuration to use the new `OPSuccinctL2OutputOracle` contract managed by the `op-succinct` service. -> ⚠️ **Caution**: When upgrading to the `OPSuccinctL2OutputOracle` contract, maintain the existing `finalizationPeriod` for a duration equal to at least one `finalizationPeriod`. Failure to do so will result in immediate finalization of all pending output roots upon upgrade, which is unsafe. Only after this waiting period has elapsed should you set the `finalizationPeriod` to 0. +> ⚠️ **Caution**: When upgrading to the `OPSuccinctL2OutputOracle` contract, maintain the existing `finalizationPeriod` for a duration equal to at least one `finalizationPeriod`. Failure to do so will result in immediate finalization of all pending output roots upon upgrade, which is unsafe. Only after this waiting period has elapsed should you set the `finalizationPeriod` to your final desired value (e.g. 1 hour). To upgrade an existing OP Stack deployment to use the `OPSuccinctL2OutputOracle` contract, follow the instructions in the [Upgrading `OPSuccinctL2OutputOracle`](../contracts/upgrade.md#upgrading-opsuccinctl2outputoracle) section. diff --git a/book/troubleshooting.md b/book/troubleshooting.md new file mode 100644 index 00000000..131e2ecc --- /dev/null +++ b/book/troubleshooting.md @@ -0,0 +1,48 @@ +# Troubleshooting + +## Common Issues + +### Missing Trie Node Error + +**Error Message:** +``` +Error: server returned an error response: error code -32000: missing trie node (path) state is not available, not found +``` + +**Cause:** +This error occurs when your L1 archive node has not fully synced all historical state data. It's common when: +- The archive node was recently synced +- You're attempting to prove blocks where the complete state data is not yet archived in the node + +**Solution:** +1. Wait for your L1 archive node to fully sync more historical state data (typically takes about an hour, depending on your batcher interval) +2. Try proving blocks that are definitely included in your node's archived data: + - With more recent blocks + - Or wait longer for older blocks to be fully synced + +### L2 Block Validation Failure + +**Error Message:** +``` +Failed to validate L2 block # with output root +``` + +**Cause:** +This error occurs when the L1 head block selected is too close to the batch posting block, causing the derivation process to fail. The L2 node may have an inconsistent view of the safe head state, requiring additional L1 blocks to properly derive and validate the L2 blocks. + +**Solution:** +1. Increase the L1 head offset buffer in the derivation process. The code currently adds a buffer of 20 blocks after the batch posting block, but you can increase this to for example 100 blocks: + +```rust +let l1_head_number = l1_head_number + 100; +``` + +2. If you're still encountering this error, you can try: + - Waiting for more L1 blocks to be produced and retry + - Using a different L2 node with a more consistent safe head state + - For development/testing, you can increase the buffer further (e.g., to 150 blocks) + +**Technical Details:** +The error occurs in the derivation pipeline when attempting to validate L2 blocks. The L1 head must be sufficiently ahead of the batch posting block to ensure all required data is available and the safe head state is consistent. The buffer of 20 blocks is added empirically to handle most cases where RPCs may have an incorrect view of the safe head state and have minimum overhead for the derivation process. + +Reference: [Fetcher Implementation](https://github.com/succinctlabs/op-succinct/blob/5dfc43928c75cef0ebf881d10bd8b3dcbe273419/utils/host/src/fetcher.rs#L773) diff --git a/configs/10/rollup.json b/configs/10/rollup.json index 21cf8362..cff2345d 100644 --- a/configs/10/rollup.json +++ b/configs/10/rollup.json @@ -41,6 +41,7 @@ "ecotone_time": 1710374401, "fjord_time": 1720627201, "granite_time": 1726070401, + "holocene_time": 1736445601, "batch_inbox_address": "0xff00000000000000000000000000000000000010", "deposit_contract_address": "0xbeb5fc579115071764c7423a4f12edde41f106ed", "l1_system_config_address": "0x229047fed2591dbec1ef1118d64f7af3db9eb290", diff --git a/configs/2035/rollup.json b/configs/2035/rollup.json new file mode 100644 index 00000000..850c810e --- /dev/null +++ b/configs/2035/rollup.json @@ -0,0 +1,49 @@ +{ + "genesis": { + "l1": { + "number": 21418000, + "hash": "0x17384505bc6561b73e3160c66ff565badca4eaf958699533dcd77939361de78f" + }, + "l2": { + "number": 0, + "hash": "0xe74e84027b25c4d3980210159066b8c314f0a7ab4d309029732bbecd06a45b7c" + }, + "l2_time": 1734387239, + "system_config": { + "batcherAddr": "0x9fb23129982c993743eb9bb156af8cc8fa2ac761", + "overhead": "0xbc", + "scalar": "0xa6fe0", + "gasLimit": 30000000, + "baseFeeScalar": null, + "blobBaseFeeScalar": null, + "eip1559Denominator": null, + "eip1559Elasticity": null + } + }, + "block_time": 10, + "max_sequencer_drift": 600, + "seq_window_size": 3600, + "channel_timeout": 300, + "granite_channel_timeout": 50, + "l1_chain_id": 1, + "l2_chain_id": 2035, + "base_fee_params": { + "max_change_denominator": "0x32", + "elasticity_multiplier": "0x6" + }, + "canyon_base_fee_params": { + "max_change_denominator": "0xfa", + "elasticity_multiplier": "0x6" + }, + "regolith_time": 0, + "canyon_time": 0, + "delta_time": 0, + "ecotone_time": 0, + "fjord_time": 0, + "granite_time": 1736272801, + "holocene_time": 1736445601, + "batch_inbox_address": "0x5a2a0698355d06cd5c4e3872d2bc6b9f6a89d39b", + "deposit_contract_address": "0x96b124841eff4ab1b3c1f654d60402a1405ff51a", + "l1_system_config_address": "0xebf5859b7646ca9cf8a981613569bf28394f2571", + "protocol_versions_address": "0x0000000000000000000000000000000000000000" +} \ No newline at end of file diff --git a/configs/480/rollup.json b/configs/480/rollup.json index 9dfc939d..5de61a25 100644 --- a/configs/480/rollup.json +++ b/configs/480/rollup.json @@ -44,5 +44,5 @@ "batch_inbox_address": "0xff00000000000000000000000000000000000480", "deposit_contract_address": "0xd5ec14a83b7d95be1e2ac12523e2dee12cbeea6c", "l1_system_config_address": "0x6ab0777fd0e609ce58f939a7f70fe41f5aa6300a", - "protocol_versions_address": "0x0000000000000000000000000000000000000000" + "protocol_versions_address": "0x8062abc286f5e7d9428a0ccb9abd71e50d93b935" } \ No newline at end of file diff --git a/contracts/foundry.toml b/contracts/foundry.toml index 338e9f51..faae877d 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -7,6 +7,7 @@ remappings = [ "@openzeppelin/=lib/openzeppelin-contracts/", "@optimism/=lib/optimism/packages/contracts-bedrock/", "@forge-std/=lib/forge-std/src/", + "@solady/=lib/solady/src", # Note: Use zobront/sp1-contracts as the current version for SP1 contracts is not compatible with the hard # version for 0.8.15 on some Optimism contracts. "@sp1-contracts/=lib/sp1-contracts/contracts/", @@ -15,9 +16,13 @@ remappings = [ "src/libraries/=lib/optimism/packages/contracts-bedrock/src/libraries/", "src/L1/=lib/optimism/packages/contracts-bedrock/src/L1/", "src/L2/=lib/optimism/packages/contracts-bedrock/src/L2/", + "src/dispute/=lib/optimism/packages/contracts-bedrock/src/dispute/" ] # Enable read-write access to opsuccinctl2ooconfig.json -fs_permissions = [{ access = "read-write", path = "./opsuccinctl2ooconfig.json" }] +fs_permissions = [ + { access = "read-write", path = "./opsuccinctl2ooconfig.json" }, + { access = "read-write", path = "./opsuccinctl2ooconfig-test.json" } +] # See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/contracts/lib/solady b/contracts/lib/solady new file mode 160000 index 00000000..513f5816 --- /dev/null +++ b/contracts/lib/solady @@ -0,0 +1 @@ +Subproject commit 513f581675374706dbe947284d6b12d19ce35a2a diff --git a/contracts/opsuccinctl2ooconfig-test.json b/contracts/opsuccinctl2ooconfig-test.json new file mode 100644 index 00000000..2543016d --- /dev/null +++ b/contracts/opsuccinctl2ooconfig-test.json @@ -0,0 +1,17 @@ +{ + "challenger": "0x0000000000000000000000000000000000000000", + "finalizationPeriod": 3600, + "l2BlockTime": 2, + "opSuccinctL2OutputOracleImpl": "0x0000000000000000000000000000000000000000", + "owner": "0xDEd0000E32f8F40414d3ab3a830f735a3553E18e", + "proposer": "0x0000000000000000000000000000000000000000", + "rollupConfigHash": "0x0d7101e2acc7eae1fb42cfce5c604d14da561726e4e01b509315e5a9f97a9816", + "startingBlockNumber": 5726082, + "startingOutputRoot": "0xafcc854e9d3af302a5c749703bb4593fff9471f2ea1b55ec0ade1e1d3c4a0d6e", + "startingTimestamp": 1733804652, + "submissionInterval": 1200, + "verifier": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B", + "aggregationVkey": "0x00d4e72bc998d0528b0722a53bedd9c6f0143c9157af194ad4bb2502e37a496f", + "rangeVkeyCommitment": "0x33e3678015df481724af3aac49d000923caeec277027610b1490f857769f9459", + "proxyAdmin": "0x0000000000000000000000000000000000000000" +} \ No newline at end of file diff --git a/contracts/opsuccinctl2ooconfig.json b/contracts/opsuccinctl2ooconfig.json index 723b8ec4..7053a675 100644 --- a/contracts/opsuccinctl2ooconfig.json +++ b/contracts/opsuccinctl2ooconfig.json @@ -1,15 +1,17 @@ { - "challenger": "0x0000000000000000000000000000000000000000", + "challenger": "0x788c45CafaB3ea427b9079889BE43D7d3cd7500C", "finalizationPeriod": 3600, "l2BlockTime": 2, - "owner": "0xDEd0000E32f8F40414d3ab3a830f735a3553E18e", - "proposer": "0xDEd0000E32f8F40414d3ab3a830f735a3553E18e", - "rollupConfigHash": "0x0d7101e2acc7eae1fb42cfce5c604d14da561726e4e01b509315e5a9f97a9816", - "startingBlockNumber": 5726082, - "startingOutputRoot": "0x88cf50185686c85146bdfd3aa17c9624b13a7c3ec912f68026c54171735a0be3", - "startingTimestamp": 1733804652, - "submissionInterval": 1200, + "opSuccinctL2OutputOracleImpl": "0xe2314c6d41f0b73d8998e3bd3174c3b149c394d5", + "owner": "0x788c45CafaB3ea427b9079889BE43D7d3cd7500C", + "proposer": "0x788c45CafaB3ea427b9079889BE43D7d3cd7500C", + "rollupConfigHash": "0x78e77d3560e6cfb84e49b62ce66ccce1a8c347b1f3e7c6353a590dcb373a6a4e", + "startingBlockNumber": 8909351, + "startingOutputRoot": "0x6c8fc616e3d706041663887f26d1f7cf1ae4ee2930f32dce37b14920cb1ebfda", + "startingTimestamp": 1737154341, + "submissionInterval": 3600, "verifier": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B", - "aggregationVkey": "0x00ea4171dbd0027768055bee7f6d64e17e9cec99b29aad5d18e5d804b967775b", - "rangeVkeyCommitment": "0x51decb4a49105f2a1403423f560bc55d6d02e5eb57f21d0c5bd6a661555a8e53" + "aggregationVkey": "0x00613438cec0bce6dba4091a5e2d831dd9531605f0b85fe2762c664b35288c1a", + "rangeVkeyCommitment": "0x5f1667fd22a4ac5c016edf3f583e20c6250d9eb776dfaac902a25a14426b7dc9", + "proxyAdmin": "0x0000000000000000000000000000000000000000" } \ No newline at end of file diff --git a/contracts/script/OPSuccinctDGFDeployer.s.sol b/contracts/script/OPSuccinctDGFDeployer.s.sol new file mode 100644 index 00000000..00b21f88 --- /dev/null +++ b/contracts/script/OPSuccinctDGFDeployer.s.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {Script} from "forge-std/Script.sol"; +import {OPSuccinctL2OutputOracle} from "../src/OPSuccinctL2OutputOracle.sol"; +import {OPSuccinctDisputeGame} from "../src/OPSuccinctDisputeGame.sol"; +import {OPSuccinctDisputeGameFactory} from "../src/OPSuccinctDisputeGameFactory.sol"; +import {Utils} from "../test/helpers/Utils.sol"; +import {Proxy} from "@optimism/src/universal/Proxy.sol"; +import {console} from "forge-std/console.sol"; + +contract OPSuccinctDFGDeployer is Script, Utils { + function run() public returns (address) { + vm.startBroadcast(); + + OPSuccinctL2OutputOracle l2OutputOracleProxy = OPSuccinctL2OutputOracle(vm.envAddress("L2OO_ADDRESS")); + + l2OutputOracleProxy.addProposer(address(0)); + + // Initialize the dispute game based on the existing L2OO_ADDRESS. + OPSuccinctDisputeGame game = new OPSuccinctDisputeGame(address(l2OutputOracleProxy)); + OPSuccinctDisputeGameFactory gameFactory = new OPSuccinctDisputeGameFactory(msg.sender, address(game)); + + vm.stopBroadcast(); + + return address(gameFactory); + } +} diff --git a/contracts/script/OPSuccinctDeployer.s.sol b/contracts/script/OPSuccinctDeployer.s.sol index 90a174a8..145d94f8 100644 --- a/contracts/script/OPSuccinctDeployer.s.sol +++ b/contracts/script/OPSuccinctDeployer.s.sol @@ -9,15 +9,37 @@ import {console} from "forge-std/console.sol"; contract OPSuccinctDeployer is Script, Utils { function run() public returns (address) { - vm.startBroadcast(); + uint256 deployPk = vm.envOr("DEPLOY_PK", uint256(0)); + uint256 adminPk = vm.envOr("ADMIN_PK", uint256(0)); + // If deployPk is not set, use the default key. + if (deployPk != uint256(0)) { + vm.startBroadcast(deployPk); + } else { + vm.startBroadcast(); + } Config memory config = readJson("opsuccinctl2ooconfig.json"); - // This initializes the proxy - OPSuccinctL2OutputOracle oracleImpl = new OPSuccinctL2OutputOracle(); - Proxy proxy = new Proxy(msg.sender); + // Set the implementation address if it is not already set. + if (config.opSuccinctL2OutputOracleImpl == address(0)) { + console.log("Deploying new OPSuccinctL2OutputOracle impl"); + config.opSuccinctL2OutputOracleImpl = address(new OPSuccinctL2OutputOracle()); + } - upgradeAndInitialize(address(oracleImpl), config, address(proxy), true); + // If the Admin PK is set, use it as the owner of the proxy. + address proxyOwner = adminPk != uint256(0) ? vm.addr(adminPk) : msg.sender; + + Proxy proxy = new Proxy(proxyOwner); + + vm.stopBroadcast(); + + if (adminPk != uint256(0)) { + vm.startBroadcast(adminPk); + } else { + vm.startBroadcast(); + } + + upgradeAndInitialize(config, address(proxy), true); vm.stopBroadcast(); diff --git a/contracts/script/OPSuccinctParameterUpdater.s.sol b/contracts/script/OPSuccinctParameterUpdater.s.sol index 378e3c67..211d0469 100644 --- a/contracts/script/OPSuccinctParameterUpdater.s.sol +++ b/contracts/script/OPSuccinctParameterUpdater.s.sol @@ -68,6 +68,17 @@ contract OPSuccinctParameterUpdater is Script, Utils { } } + if (cfg.verifier != oracleImpl.verifier()) { + if (executeUpgradeCall) { + oracleImpl.updateVerifier(cfg.verifier); + } else { + bytes memory verifierCalldata = + abi.encodeWithSelector(OPSuccinctL2OutputOracle.updateVerifier.selector, cfg.verifier); + console.log("The calldata for upgrading the verifier is:"); + console.logBytes(verifierCalldata); + } + } + vm.stopBroadcast(); } } diff --git a/contracts/script/OPSuccinctUpgrader.s.sol b/contracts/script/OPSuccinctUpgrader.s.sol index 25bb0c47..c09e6ba1 100644 --- a/contracts/script/OPSuccinctUpgrader.s.sol +++ b/contracts/script/OPSuccinctUpgrader.s.sol @@ -9,16 +9,40 @@ import {console} from "forge-std/console.sol"; contract OPSuccinctUpgrader is Script, Utils { function run() public { - vm.startBroadcast(); - Config memory cfg = readJson("opsuccinctl2ooconfig.json"); address l2OutputOracleProxy = vm.envAddress("L2OO_ADDRESS"); bool executeUpgradeCall = vm.envOr("EXECUTE_UPGRADE_CALL", true); - address OPSuccinctL2OutputOracleImpl = address(new OPSuccinctL2OutputOracle()); + // Use implementation address from config + address OPSuccinctL2OutputOracleImpl = cfg.opSuccinctL2OutputOracleImpl; + address proxyAdmin = cfg.proxyAdmin; + + // optionally use a different key for deployment + uint256 deployPk = vm.envOr("DEPLOY_PK", uint256(0)); + uint256 adminPk = vm.envOr("ADMIN_PK", uint256(0)); + + // If deployPk is not set, use the default key. + if (deployPk != uint256(0)) { + vm.startBroadcast(deployPk); + } else { + vm.startBroadcast(); + } + + if (OPSuccinctL2OutputOracleImpl == address(0)) { + console.log("Deploying new OPSuccinctL2OutputOracle impl"); + OPSuccinctL2OutputOracleImpl = address(new OPSuccinctL2OutputOracle()); + } + + vm.stopBroadcast(); + + if (adminPk != uint256(0)) { + vm.startBroadcast(adminPk); + } else { + vm.startBroadcast(); + } - upgradeAndInitialize(OPSuccinctL2OutputOracleImpl, cfg, l2OutputOracleProxy, executeUpgradeCall); + upgradeAndInitialize(cfg, l2OutputOracleProxy, executeUpgradeCall); vm.stopBroadcast(); } diff --git a/contracts/src/OPSuccinctDisputeGame.sol b/contracts/src/OPSuccinctDisputeGame.sol new file mode 100644 index 00000000..d70052f0 --- /dev/null +++ b/contracts/src/OPSuccinctDisputeGame.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {OPSuccinctL2OutputOracle} from "./OPSuccinctL2OutputOracle.sol"; +import {CWIA} from "@solady/utils/legacy/CWIA.sol"; +import {LibBytes} from "@solady/utils/LibBytes.sol"; +import {ISemver} from "@optimism/src/universal/ISemver.sol"; +import {IDisputeGame} from "@optimism/src/dispute/interfaces/IDisputeGame.sol"; +import {Claim, GameStatus, GameType, GameTypes, Hash, Timestamp} from "@optimism/src/dispute/lib/Types.sol"; +import {GameNotInProgress, OutOfOrderResolution} from "@optimism/src/dispute/lib/Errors.sol"; + +contract OPSuccinctDisputeGame is ISemver, CWIA, IDisputeGame { + using LibBytes for bytes; + + /// @notice The address of the L2 output oracle proxy contract. + address internal immutable l2OutputOracle; + + /// @notice The timestamp of the game's global creation. + Timestamp public createdAt; + + /// @notice The timestamp of the game's global resolution. + Timestamp public resolvedAt; + + /// @notice Returns the current status of the game. + GameStatus public status; + + /// @notice Semantic version. + /// @custom:semver v1.0.0-beta + string public constant version = "v1.0.0-beta"; + + constructor(address _l2OutputOracle) { + l2OutputOracle = _l2OutputOracle; + } + + //////////////////////////////////////////////////////////// + // IDisputeGame impl // + //////////////////////////////////////////////////////////// + + function initialize() external payable { + createdAt = Timestamp.wrap(uint64(block.timestamp)); + status = GameStatus.IN_PROGRESS; + + (uint256 l2BlockNumber, uint256 l1BlockNumber, bytes memory proof) = + abi.decode(extraData(), (uint256, uint256, bytes)); + + OPSuccinctL2OutputOracle(l2OutputOracle).proposeL2Output(rootClaim().raw(), l2BlockNumber, l1BlockNumber, proof); + + this.resolve(); + } + + /// @notice Getter for the game type. + /// @dev The reference impl should be entirely different depending on the type (fault, validity) + /// i.e. The game type should indicate the security model. + /// @return gameType_ The type of proof system being used. + function gameType() public pure returns (GameType) { + // TODO: Once a new version of the Optimism contracts containing the PR below is released, + // update this to return the correct game type: GameTypes.OP_SUCCINCT + // https://github.com/ethereum-optimism/optimism/pull/13780 + return GameType.wrap(6); + } + + /// @notice Getter for the creator of the dispute game. + /// @dev `clones-with-immutable-args` argument #1 + /// @return The creator of the dispute game. + function gameCreator() public pure returns (address) { + return _getArgAddress(0x00); + } + + /// @notice Getter for the root claim. + /// @dev `clones-with-immutable-args` argument #2 + /// @return The root claim of the DisputeGame. + function rootClaim() public pure returns (Claim) { + return Claim.wrap(_getArgBytes32(0x14)); + } + + /// @notice Getter for the parent hash of the L1 block when the dispute game was created. + /// @dev `clones-with-immutable-args` argument #3 + /// @return The parent hash of the L1 block when the dispute game was created. + function l1Head() public pure returns (Hash) { + return Hash.wrap(_getArgBytes32(0x34)); + } + + /// @notice Getter for the extra data. + /// @dev `clones-with-immutable-args` argument #4 + /// @return Any extra data supplied to the dispute game contract by the creator. + function extraData() public pure returns (bytes memory) { + // The extra data starts at the second word within the cwia calldata + return _getArgBytes().slice(0x54); + } + + /// @notice If all necessary information has been gathered, this function should mark the game + /// status as either `CHALLENGER_WINS` or `DEFENDER_WINS` and return the status of + /// the resolved game. It is at this stage that the bonds should be awarded to the + /// necessary parties. + /// @dev May only be called if the `status` is `IN_PROGRESS`. + /// @return status_ The status of the game after resolution. + function resolve() external returns (GameStatus status_) { + // INVARIANT: Resolution cannot occur unless the game is currently in progress. + if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress(); + + resolvedAt = Timestamp.wrap(uint64(block.timestamp)); + status_ = GameStatus.DEFENDER_WINS; + + emit Resolved(status = status_); + } + + /// @notice A compliant implementation of this interface should return the components of the + /// game UUID's preimage provided in the cwia payload. The preimage of the UUID is + /// constructed as `keccak256(gameType . rootClaim . extraData)` where `.` denotes + /// concatenation. + /// @return gameType_ The type of proof system being used. + /// @return rootClaim_ The root claim of the DisputeGame. + /// @return extraData_ Any extra data supplied to the dispute game contract by the creator. + function gameData() external pure returns (GameType gameType_, Claim rootClaim_, bytes memory extraData_) { + gameType_ = gameType(); + rootClaim_ = rootClaim(); + extraData_ = extraData(); + } +} diff --git a/contracts/src/OPSuccinctDisputeGameFactory.sol b/contracts/src/OPSuccinctDisputeGameFactory.sol new file mode 100644 index 00000000..6a0e8884 --- /dev/null +++ b/contracts/src/OPSuccinctDisputeGameFactory.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {IDisputeGame} from "@optimism/src/dispute/interfaces/IDisputeGame.sol"; +import {LibCWIA} from "@solady/utils/legacy/LibCWIA.sol"; +import {ISemver} from "@optimism/src/universal/ISemver.sol"; + +contract OPSuccinctDisputeGameFactory is ISemver { + using LibCWIA for address; + + /// @notice The owner of the contract, who has admin permissions. + address public owner; + + /// @notice The address of the OP Succinct DisputeGame implementation contract. + address public gameImpl; + + /// @notice Semantic version. + /// @custom:semver v1.0.0-beta + string public constant version = "v1.0.0-beta"; + + //////////////////////////////////////////////////////////// + // Modifiers // + //////////////////////////////////////////////////////////// + + modifier onlyOwner() { + require(msg.sender == owner, "OPSuccinctDisputeGameFactory: caller is not the owner"); + _; + } + + //////////////////////////////////////////////////////////// + // Functions // + //////////////////////////////////////////////////////////// + + /// @notice Constructs the OPSuccinctDisputeGameFactory contract. + constructor(address _owner, address _gameImpl) { + owner = _owner; + gameImpl = _gameImpl; + } + + /// @notice Creates a new DisputeGame proxy contract. + function create(bytes32 _rootClaim, uint256 _l2BlockNumber, uint256 _l1BlockNumber, bytes memory _proof) + external + payable + { + IDisputeGame game = IDisputeGame( + gameImpl.clone( + abi.encodePacked(msg.sender, _rootClaim, bytes32(0), abi.encode(_l2BlockNumber, _l1BlockNumber, _proof)) + ) + ); + + game.initialize{value: msg.value}(); + } + + /// Updates the owner address. + /// @param _owner The new owner address. + function transferOwnership(address _owner) external onlyOwner { + owner = _owner; + } + + /// @notice Sets the implementation address. + /// @param _implementation New implementation address. + function setImplementation(address _implementation) external onlyOwner { + gameImpl = _implementation; + } +} diff --git a/contracts/src/OPSuccinctL2OutputOracle.sol b/contracts/src/OPSuccinctL2OutputOracle.sol index 88463763..c0cf2e03 100644 --- a/contracts/src/OPSuccinctL2OutputOracle.sol +++ b/contracts/src/OPSuccinctL2OutputOracle.sol @@ -93,6 +93,9 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { /// @notice A trusted mapping of block numbers to block hashes. mapping(uint256 => bytes32) public historicBlockHashes; + /// @notice Activate optimistic mode. When true, the contract will accept outputs without verification. + bool public optimisticMode; + //////////////////////////////////////////////////////////// // Events // //////////////////////////////////////////////////////////// @@ -146,6 +149,11 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { /// @param newSubmissionInterval The new submission interval. event SubmissionIntervalUpdated(uint256 oldSubmissionInterval, uint256 newSubmissionInterval); + /// @notice Emitted when the optimistic mode is toggled. + /// @param enabled Indicates whether optimistic mode is enabled or disabled. + /// @param finalizationPeriodSeconds The new finalization period in seconds. + event OptimisticModeToggled(bool indexed enabled, uint256 finalizationPeriodSeconds); + //////////////////////////////////////////////////////////// // Errors // //////////////////////////////////////////////////////////// @@ -158,8 +166,8 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { error L1BlockHashNotCheckpointed(); /// @notice Semantic version. - /// @custom:semver beta-v1.0.0 - string public constant version = "beta-v1.0.0"; + /// @custom:semver v1.0.0 + string public constant version = "v1.0.0"; /// @notice The version of the initializer on the contract. Used for managing upgrades. uint8 public constant initializerVersion = 1; @@ -173,6 +181,16 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { _; } + modifier whenOptimistic() { + require(optimisticMode, "L2OutputOracle: optimistic mode is not enabled"); + _; + } + + modifier whenNotOptimistic() { + require(!optimisticMode, "L2OutputOracle: optimistic mode is enabled"); + _; + } + //////////////////////////////////////////////////////////// // Functions // //////////////////////////////////////////////////////////// @@ -303,6 +321,7 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, uint256 _l1BlockNumber, bytes memory _proof) external payable + whenNotOptimistic { // The proposer must be explicitly approved, or the zero address must be approved (permissionless proposing). require( @@ -349,6 +368,63 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { ); } + /// @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. + /// The timestamp must be equal to the current value returned by `nextTimestamp()` in + /// order to be accepted. This function may only be called by the Proposer. + /// @param _outputRoot The L2 output of the checkpoint block. + /// @param _l2BlockNumber The L2 block number that resulted in _outputRoot. + /// @param _l1BlockHash A block hash which must be included in the current chain. + /// @param _l1BlockNumber The block number with the specified block hash. + /// @dev This function is sourced from the original L2OutputOracle contract. The only modification is that the proposer address must be in the approvedProposers mapping, or permissionless proposing is enabled. + function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber) + external + payable + whenOptimistic + { + // The proposer must be explicitly approved, or the zero address must be approved (permissionless proposing). + require( + approvedProposers[msg.sender] || approvedProposers[address(0)], + "L2OutputOracle: only approved proposers can propose new outputs" + ); + + require( + _l2BlockNumber == nextBlockNumber(), + "L2OutputOracle: block number must be equal to next expected block number" + ); + + require( + computeL2Timestamp(_l2BlockNumber) < block.timestamp, + "L2OutputOracle: cannot propose L2 output in the future" + ); + + require(_outputRoot != bytes32(0), "L2OutputOracle: L2 output proposal cannot be the zero hash"); + + if (_l1BlockHash != bytes32(0)) { + // This check allows the proposer to propose an output based on a given L1 block, + // without fear that it will be reorged out. + // It will also revert if the blockheight provided is more than 256 blocks behind the + // chain tip (as the hash will return as zero). This does open the door to a griefing + // attack in which the proposer's submission is censored until the block is no longer + // retrievable, if the proposer is experiencing this attack it can simply leave out the + // blockhash value, and delay submission until it is confident that the L1 block is + // finalized. + require( + blockhash(_l1BlockNumber) == _l1BlockHash, + "L2OutputOracle: block hash does not match the hash at the expected height" + ); + } + + emit OutputProposed(_outputRoot, nextOutputIndex(), _l2BlockNumber, block.timestamp); + + l2Outputs.push( + Types.OutputProposal({ + outputRoot: _outputRoot, + timestamp: uint128(block.timestamp), + l2BlockNumber: uint128(_l2BlockNumber) + }) + ); + } + /// @notice Checkpoints a block hash at a given block number. /// @param _blockNumber Block number to checkpoint the hash at. /// @dev If the block hash is not available, this will revert. @@ -495,4 +571,20 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver { approvedProposers[_proposer] = false; emit ProposerUpdated(_proposer, false); } + + /// @notice Enables optimistic mode. + /// @param _finalizationPeriodSeconds The new finalization window. + function enableOptimisticMode(uint256 _finalizationPeriodSeconds) external onlyOwner whenNotOptimistic { + finalizationPeriodSeconds = _finalizationPeriodSeconds; + optimisticMode = true; + emit OptimisticModeToggled(true, _finalizationPeriodSeconds); + } + + /// @notice Disables optimistic mode. + /// @param _finalizationPeriodSeconds The new finalization window. + function disableOptimisticMode(uint256 _finalizationPeriodSeconds) external onlyOwner whenOptimistic { + finalizationPeriodSeconds = _finalizationPeriodSeconds; + optimisticMode = false; + emit OptimisticModeToggled(false, _finalizationPeriodSeconds); + } } diff --git a/contracts/test/OPSuccinctDisputeGame.t.sol b/contracts/test/OPSuccinctDisputeGame.t.sol new file mode 100644 index 00000000..24a46141 --- /dev/null +++ b/contracts/test/OPSuccinctDisputeGame.t.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {Test, console} from "forge-std/Test.sol"; +import {Utils} from "./helpers/Utils.sol"; +import {OPSuccinctL2OutputOracle} from "../src/OPSuccinctL2OutputOracle.sol"; +import {OPSuccinctDisputeGame} from "../src/OPSuccinctDisputeGame.sol"; +import {IDisputeGame} from "@optimism/src/dispute/interfaces/IDisputeGame.sol"; +import {LibCWIA} from "@solady/utils/legacy/LibCWIA.sol"; + +contract OPSuccinctL2OutputOracleTest is Test, Utils { + using LibCWIA for address; + + // Example proof data for the BoB testnet. Tx: https://sepolia.etherscan.io/tx/0x35df99dce5db3d7644a005bd582af2d66533b56fdb01970f248d96e8053fc0ba + uint256 checkpointedL1BlockNum = 7438547; + bytes32 claimedOutputRoot = 0x974323e1f533bf40923f6a5f9d8752d42743bb5b784d9a6d1ce223a5cc368ae6; + uint256 claimedL2BlockNum = 6940641; + bytes proof = + hex"09069090289d338bbce470b324757ae21b8846ba36d88feb8fc9e32aa477d193153db2bc1ffead4fb681196de556343a1cd61954d5e6863327d35e0f2e0b9781278b58231af27bb83226d60c1573639e400130ed49318f28dddb9768c8a71f20de8bc07d0355ef76ec0661b0d720d36943e7d8660b6e603733afb549ffba8773cec52097011525d1239e39b8da29bec5fb18d6f4bdfd84890fedd6c0cf67342a6843bb2a28e9ceae9069e52312b7b79d4a39b7d5527bbcfefd66de3887cea63f76b672081dd49279796f07bfdb04e9c5284dd0565ac923bc2c5c01be28a22c314402280001a7aa13b9a8a1c92850ae89fcede9142542fbc13298ecab89ad8fbfbdabbee3"; + + function setUp() public { + // Note: L1_RPC should be a valid Sepolia RPC. + vm.createSelectFork(vm.envString("L1_RPC"), checkpointedL1BlockNum + 1); + } + + // Test the DisputeGame contract. + function testOPSuccinctDisputeGame() public { + vm.startBroadcast(); + + Config memory cfg = readJson("opsuccinctl2ooconfig-test.json"); + + cfg.owner = msg.sender; + + address l2ooProxy = deployWithConfig(cfg); + + OPSuccinctL2OutputOracle l2oo = OPSuccinctL2OutputOracle(l2ooProxy); + OPSuccinctDisputeGame game = new OPSuccinctDisputeGame(l2ooProxy); + + l2oo.addProposer(address(0)); + l2oo.checkpointBlockHash(checkpointedL1BlockNum); + + IDisputeGame proxy = IDisputeGame( + address(game).clone( + abi.encodePacked( + msg.sender, + claimedOutputRoot, + bytes32(0), // TODO: This should be parentHash + abi.encode(claimedL2BlockNum, checkpointedL1BlockNum, proof) + ) + ) + ); + + vm.stopBroadcast(); + + proxy.initialize{value: 10}(); + } +} diff --git a/contracts/test/OPSuccinctDisputeGameFactory.t.sol b/contracts/test/OPSuccinctDisputeGameFactory.t.sol new file mode 100644 index 00000000..ab675a16 --- /dev/null +++ b/contracts/test/OPSuccinctDisputeGameFactory.t.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {Test, console} from "forge-std/Test.sol"; +import {Utils} from "./helpers/Utils.sol"; +import {OPSuccinctL2OutputOracle} from "../src/OPSuccinctL2OutputOracle.sol"; +import {OPSuccinctDisputeGame} from "../src/OPSuccinctDisputeGame.sol"; +import {OPSuccinctDisputeGameFactory} from "../src/OPSuccinctDisputeGameFactory.sol"; +import {IDisputeGame} from "@optimism/src/dispute/interfaces/IDisputeGame.sol"; +import {LibCWIA} from "@solady/utils/legacy/LibCWIA.sol"; + +contract OPSuccinctL2OutputOracleFactoryTest is Test, Utils { + using LibCWIA for address; + + // Example proof data for the BoB testnet. Tx: https://sepolia.etherscan.io/tx/0x35df99dce5db3d7644a005bd582af2d66533b56fdb01970f248d96e8053fc0ba + uint256 checkpointedL1BlockNum = 7438547; + bytes32 claimedOutputRoot = 0x974323e1f533bf40923f6a5f9d8752d42743bb5b784d9a6d1ce223a5cc368ae6; + uint256 claimedL2BlockNum = 6940641; + bytes proof = + hex"09069090289d338bbce470b324757ae21b8846ba36d88feb8fc9e32aa477d193153db2bc1ffead4fb681196de556343a1cd61954d5e6863327d35e0f2e0b9781278b58231af27bb83226d60c1573639e400130ed49318f28dddb9768c8a71f20de8bc07d0355ef76ec0661b0d720d36943e7d8660b6e603733afb549ffba8773cec52097011525d1239e39b8da29bec5fb18d6f4bdfd84890fedd6c0cf67342a6843bb2a28e9ceae9069e52312b7b79d4a39b7d5527bbcfefd66de3887cea63f76b672081dd49279796f07bfdb04e9c5284dd0565ac923bc2c5c01be28a22c314402280001a7aa13b9a8a1c92850ae89fcede9142542fbc13298ecab89ad8fbfbdabbee3"; + + function setUp() public { + // Note: L1_RPC should be a valid Sepolia RPC. + vm.createSelectFork(vm.envString("L1_RPC"), checkpointedL1BlockNum + 1); + } + + // Test the DisputeGame contract. + function testOPSuccinctDisputeGameFactory() public { + vm.startBroadcast(); + + Config memory cfg = readJson("opsuccinctl2ooconfig-test.json"); + + cfg.owner = msg.sender; + + address l2ooProxy = deployWithConfig(cfg); + + OPSuccinctL2OutputOracle l2oo = OPSuccinctL2OutputOracle(l2ooProxy); + OPSuccinctDisputeGame game = new OPSuccinctDisputeGame(l2ooProxy); + OPSuccinctDisputeGameFactory gameFactory = new OPSuccinctDisputeGameFactory(msg.sender, address(game)); + + l2oo.addProposer(address(0)); + l2oo.checkpointBlockHash(checkpointedL1BlockNum); + + vm.stopBroadcast(); + + gameFactory.create(claimedOutputRoot, claimedL2BlockNum, checkpointedL1BlockNum, proof); + } +} diff --git a/contracts/test/Upgrade.t.sol b/contracts/test/Upgrade.t.sol index 7fa9df3d..efa7dfba 100644 --- a/contracts/test/Upgrade.t.sol +++ b/contracts/test/Upgrade.t.sol @@ -28,7 +28,9 @@ contract UpgradeTest is Test, Utils { submissionInterval: 2, verifier: address(0x397A5f7f3dBd538f23DE225B51f532c34448dA9B), aggregationVkey: bytes32(0x00ea4171dbd0027768055bee7f6d64e17e9cec99b29aad5d18e5d804b967775b), - rangeVkeyCommitment: bytes32(0x1a4ebe5c47d55436319c425951eb1a7e04f560945e29eb454215d30b30987bbb) + rangeVkeyCommitment: bytes32(0x1a4ebe5c47d55436319c425951eb1a7e04f560945e29eb454215d30b30987bbb), + proxyAdmin: address(0x0000000000000000000000000000000000000000), + opSuccinctL2OutputOracleImpl: address(0x0000000000000000000000000000000000000000) }); // This is never called, so we just need to add some code to the address so the check passes. diff --git a/contracts/test/helpers/JSONDecoder.sol b/contracts/test/helpers/JSONDecoder.sol index 2766343d..372820a2 100644 --- a/contracts/test/helpers/JSONDecoder.sol +++ b/contracts/test/helpers/JSONDecoder.sol @@ -7,8 +7,10 @@ contract JSONDecoder { address challenger; uint256 finalizationPeriod; uint256 l2BlockTime; + address opSuccinctL2OutputOracleImpl; address owner; address proposer; + address proxyAdmin; bytes32 rangeVkeyCommitment; bytes32 rollupConfigHash; uint256 startingBlockNumber; diff --git a/contracts/test/helpers/Utils.sol b/contracts/test/helpers/Utils.sol index f5bf4761..54a237da 100644 --- a/contracts/test/helpers/Utils.sol +++ b/contracts/test/helpers/Utils.sol @@ -5,21 +5,23 @@ import {Test, console} from "forge-std/Test.sol"; import {JSONDecoder} from "./JSONDecoder.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {Proxy} from "@optimism/src/universal/Proxy.sol"; +import {ProxyAdmin} from "@optimism/src/universal/ProxyAdmin.sol"; import {OPSuccinctL2OutputOracle} from "src/OPSuccinctL2OutputOracle.sol"; contract Utils is Test, JSONDecoder { function deployWithConfig(Config memory cfg) public returns (address) { - address OPSuccinctL2OutputOracleImpl = address(new OPSuccinctL2OutputOracle()); + if (cfg.opSuccinctL2OutputOracleImpl == address(0)) { + cfg.opSuccinctL2OutputOracleImpl = address(new OPSuccinctL2OutputOracle()); + } + Proxy l2OutputOracleProxy = new Proxy(msg.sender); - upgradeAndInitialize(OPSuccinctL2OutputOracleImpl, cfg, address(l2OutputOracleProxy), true); + upgradeAndInitialize(cfg, address(l2OutputOracleProxy), true); return address(l2OutputOracleProxy); } // If `executeUpgradeCall` is false, the upgrade call will not be executed. - function upgradeAndInitialize(address impl, Config memory cfg, address l2OutputOracleProxy, bool executeUpgradeCall) - public - { + function upgradeAndInitialize(Config memory cfg, address l2OutputOracleProxy, bool executeUpgradeCall) public { // Require that the verifier gateway is deployed require( address(cfg.verifier).code.length > 0, "OPSuccinctL2OutputOracleUpgrader: verifier gateway not deployed" @@ -45,12 +47,29 @@ contract Utils is Test, JSONDecoder { abi.encodeWithSelector(OPSuccinctL2OutputOracle.initialize.selector, initParams); if (executeUpgradeCall) { - Proxy existingProxy = Proxy(payable(l2OutputOracleProxy)); - existingProxy.upgradeToAndCall(impl, initializationParams); + if (cfg.proxyAdmin == address(0)) { + Proxy existingProxy = Proxy(payable(l2OutputOracleProxy)); + existingProxy.upgradeToAndCall(cfg.opSuccinctL2OutputOracleImpl, initializationParams); + } else { + // This is used if the ProxyAdmin contract is deployed. + ProxyAdmin(payable(cfg.proxyAdmin)).upgradeAndCall( + payable(l2OutputOracleProxy), cfg.opSuccinctL2OutputOracleImpl, initializationParams + ); + } } else { // Raw calldata for an upgrade call by a multisig. - bytes memory multisigCalldata = - abi.encodeWithSelector(Proxy.upgradeToAndCall.selector, impl, initializationParams); + bytes memory multisigCalldata = ""; + + if (cfg.proxyAdmin == address(0)) { + multisigCalldata = abi.encodeWithSelector( + Proxy.upgradeToAndCall.selector, cfg.opSuccinctL2OutputOracleImpl, initializationParams + ); + } else { + multisigCalldata = abi.encodeWithSelector( + ProxyAdmin.upgradeAndCall.selector, cfg.opSuccinctL2OutputOracleImpl, initializationParams + ); + } + console.log("The calldata for upgrading the contract with the new initialization parameters is:"); console.logBytes(multisigCalldata); } diff --git a/elf/aggregation-elf b/elf/aggregation-elf index d3514763..af463541 100755 Binary files a/elf/aggregation-elf and b/elf/aggregation-elf differ diff --git a/elf/fault-proof-elf b/elf/fault-proof-elf deleted file mode 100755 index 9c25600d..00000000 Binary files a/elf/fault-proof-elf and /dev/null differ diff --git a/elf/range-elf b/elf/range-elf index e3fb0b7c..e3261b72 100755 Binary files a/elf/range-elf and b/elf/range-elf differ diff --git a/justfile b/justfile index 1ec26eda..489db6dc 100644 --- a/justfile +++ b/justfile @@ -29,60 +29,14 @@ run-multi start end use-cache="false" prove="false": cargo run --bin multi --release -- --start {{start}} --end {{end}} $CACHE_FLAG $PROVE_FLAG # Runs the cost estimator for a given block range. -cost-estimator start end: +# If no range is provided, runs for the last 5 finalized blocks. +cost-estimator *args='': #!/usr/bin/env bash - cargo run --bin cost-estimator --release -- --start {{start}} --end {{end}} - -# Runs the client program in native execution mode. Modified version of Kona Native Client execution: -# https://github.com/ethereum-optimism/kona/blob/ae71b9df103c941c06b0dc5400223c4f13fe5717/bin/client/justfile#L65-L108 -run-client-native l2_block_num l1_rpc='${L1_RPC}' l1_beacon_rpc='${L1_BEACON_RPC}' l2_rpc='${L2_RPC}' verbosity="-vvvv": - #!/usr/bin/env bash - L1_NODE_ADDRESS="{{l1_rpc}}" - L1_BEACON_ADDRESS="{{l1_beacon_rpc}}" - L2_NODE_ADDRESS="{{l2_rpc}}" - echo "L1 Node Address: $L1_NODE_ADDRESS" - echo "L1 Beacon Address: $L1_BEACON_ADDRESS" - echo "L2 Node Address: $L2_NODE_ADDRESS" - HOST_BIN_PATH="./kona-host" - CLIENT_BIN_PATH="$(pwd)/target/release-client-lto/fault-proof" - L2_BLOCK_NUMBER="{{l2_block_num}}" - L2_BLOCK_SAFE_HEAD=$((L2_BLOCK_NUMBER - 1)) - L2_OUTPUT_STATE_ROOT=$(cast block --rpc-url $L2_NODE_ADDRESS --field stateRoot $L2_BLOCK_SAFE_HEAD) - L2_HEAD=$(cast block --rpc-url $L2_NODE_ADDRESS --field hash $L2_BLOCK_SAFE_HEAD) - L2_OUTPUT_STORAGE_HASH=$(cast proof --rpc-url $L2_NODE_ADDRESS --block $L2_BLOCK_SAFE_HEAD 0x4200000000000000000000000000000000000016 | jq -r '.storageHash') - L2_OUTPUT_ENCODED=$(cast abi-encode "x(uint256,bytes32,bytes32,bytes32)" 0 $L2_OUTPUT_STATE_ROOT $L2_OUTPUT_STORAGE_HASH $L2_HEAD) - L2_OUTPUT_ROOT=$(cast keccak $L2_OUTPUT_ENCODED) - echo "L2 Safe Head: $L2_BLOCK_SAFE_HEAD" - echo "Safe Head Output Root: $L2_OUTPUT_ROOT" - L2_CLAIM_STATE_ROOT=$(cast block --rpc-url $L2_NODE_ADDRESS --field stateRoot $L2_BLOCK_NUMBER) - L2_CLAIM_HASH=$(cast block --rpc-url $L2_NODE_ADDRESS --field hash $L2_BLOCK_NUMBER) - L2_CLAIM_STORAGE_HASH=$(cast proof --rpc-url $L2_NODE_ADDRESS --block $L2_BLOCK_NUMBER 0x4200000000000000000000000000000000000016 | jq -r '.storageHash') - L2_CLAIM_ENCODED=$(cast abi-encode "x(uint256,bytes32,bytes32,bytes32)" 0 $L2_CLAIM_STATE_ROOT $L2_CLAIM_STORAGE_HASH $L2_CLAIM_HASH) - L2_CLAIM=$(cast keccak $L2_CLAIM_ENCODED) - echo "L2 Block Number: $L2_BLOCK_NUMBER" - echo "L2 Claim Root: $L2_CLAIM" - L2_BLOCK_TIMESTAMP=$(cast block --rpc-url $L2_NODE_ADDRESS $L2_BLOCK_NUMBER -j | jq -r .timestamp) - L1_HEAD=$(cast block --rpc-url $L1_NODE_ADDRESS $(cast find-block --rpc-url $L1_NODE_ADDRESS $(($(cast 2d $L2_BLOCK_TIMESTAMP) + 300))) -j | jq -r .hash) - echo "L1 Head: $L1_HEAD" - L2_CHAIN_ID=10 - DATA_DIRECTORY="./data/$L2_BLOCK_NUMBER" - echo "Saving Data to $DATA_DIRECTORY" - echo "Building client program..." - cargo build --bin fault-proof --profile release-client-lto - echo "Running host program with native client program..." - cargo run --bin op-succinct-witnessgen --release -- \ - --l1-head $L1_HEAD \ - --l2-head $L2_HEAD \ - --l2-claim $L2_CLAIM \ - --l2-output-root $L2_OUTPUT_ROOT \ - --l2-block-number $L2_BLOCK_NUMBER \ - --l2-chain-id $L2_CHAIN_ID \ - --l1-node-address $L1_NODE_ADDRESS \ - --l1-beacon-address $L1_BEACON_ADDRESS \ - --l2-node-address $L2_NODE_ADDRESS \ - --exec $CLIENT_BIN_PATH \ - --data-dir $DATA_DIRECTORY \ - {{verbosity}} + if [ -z "{{args}}" ]; then + cargo run --bin cost-estimator --release + else + cargo run --bin cost-estimator --release -- {{args}} + fi # Output the data required for the ZKVM execution. echo "$L1_HEAD $L2_OUTPUT_ROOT $L2_CLAIM $L2_BLOCK_NUMBER $L2_CHAIN_ID" @@ -123,19 +77,20 @@ deploy-mock-verifier env_file=".env": echo "PRIVATE_KEY not set in {{env_file}}" exit 1 fi - - VERIFY_FLAGS="" - if [ ! -z "$ETHERSCAN_API_KEY" ]; then - VERIFY_FLAGS="--verify --verifier etherscan --etherscan-api-key $ETHERSCAN_API_KEY" - fi cd contracts + + VERIFY="" + if [ $ETHERSCAN_API_KEY != "" ]; then + VERIFY="--verify --verifier etherscan --etherscan-api-key $ETHERSCAN_API_KEY" + fi forge script script/DeployMockVerifier.s.sol:DeployMockVerifier \ --rpc-url $L1_RPC \ --private-key $PRIVATE_KEY \ --broadcast \ - $VERIFY_FLAGS + $VERIFY + # Deploy the OPSuccinct L2 Output Oracle deploy-oracle env_file=".env": #!/usr/bin/env bash @@ -152,16 +107,22 @@ deploy-oracle env_file=".env": # forge install forge install + + VERIFY="" + if [ $ETHERSCAN_API_KEY != "" ]; then + VERIFY="--verify --verifier etherscan --etherscan-api-key $ETHERSCAN_API_KEY" + fi + + ENV_VARS="" + if [ -n "${ADMIN_PK:-}" ]; then ENV_VARS="$ENV_VARS ADMIN_PK=$ADMIN_PK"; fi + if [ -n "${DEPLOY_PK:-}" ]; then ENV_VARS="$ENV_VARS DEPLOY_PK=$DEPLOY_PK"; fi # Run the forge deployment script - forge script script/OPSuccinctDeployer.s.sol:OPSuccinctDeployer \ + $ENV_VARS forge script script/OPSuccinctDeployer.s.sol:OPSuccinctDeployer \ --rpc-url $L1_RPC \ --private-key $PRIVATE_KEY \ --broadcast \ - --verify \ - --verifier etherscan \ - --etherscan-api-key $ETHERSCAN_API_KEY - + $VERIFY # Upgrade the OPSuccinct L2 Output Oracle upgrade-oracle env_file=".env": @@ -181,13 +142,19 @@ upgrade-oracle env_file=".env": forge install # Run the forge upgrade script + + ENV_VARS="L2OO_ADDRESS=$L2OO_ADDRESS" + if [ -n "${EXECUTE_UPGRADE_CALL:-}" ]; then ENV_VARS="$ENV_VARS EXECUTE_UPGRADE_CALL=$EXECUTE_UPGRADE_CALL"; fi + if [ -n "${ADMIN_PK:-}" ]; then ENV_VARS="$ENV_VARS ADMIN_PK=$ADMIN_PK"; fi + if [ -n "${DEPLOY_PK:-}" ]; then ENV_VARS="$ENV_VARS DEPLOY_PK=$DEPLOY_PK"; fi + if [ "${EXECUTE_UPGRADE_CALL:-true}" = "false" ]; then - L2OO_ADDRESS=$L2OO_ADDRESS forge script script/OPSuccinctUpgrader.s.sol:OPSuccinctUpgrader \ + $ENV_VARS forge script script/OPSuccinctUpgrader.s.sol:OPSuccinctUpgrader \ --rpc-url $L1_RPC \ --private-key $PRIVATE_KEY \ --etherscan-api-key $ETHERSCAN_API_KEY else - L2OO_ADDRESS=$L2OO_ADDRESS forge script script/OPSuccinctUpgrader.s.sol:OPSuccinctUpgrader \ + $ENV_VARS forge script script/OPSuccinctUpgrader.s.sol:OPSuccinctUpgrader \ --rpc-url $L1_RPC \ --private-key $PRIVATE_KEY \ --verify \ @@ -214,13 +181,46 @@ update-parameters env_file=".env": forge install # Run the forge upgrade script + ENV_VARS="L2OO_ADDRESS=$L2OO_ADDRESS" + if [ -n "${EXECUTE_UPGRADE_CALL:-}" ]; then ENV_VARS="$ENV_VARS EXECUTE_UPGRADE_CALL=$EXECUTE_UPGRADE_CALL"; fi + if [ -n "${ADMIN_PK:-}" ]; then ENV_VARS="$ENV_VARS ADMIN_PK=$ADMIN_PK"; fi + if [ -n "${DEPLOY_PK:-}" ]; then ENV_VARS="$ENV_VARS DEPLOY_PK=$DEPLOY_PK"; fi + + if [ "${EXECUTE_UPGRADE_CALL:-true}" = "false" ]; then - L2OO_ADDRESS=$L2OO_ADDRESS forge script script/OPSuccinctParameterUpdater.s.sol:OPSuccinctParameterUpdater \ + $ENV_VARS forge script script/OPSuccinctParameterUpdater.s.sol:OPSuccinctParameterUpdater \ --rpc-url $L1_RPC \ - --private-key $PRIVATE_KEY + --private-key $PRIVATE_KEY \ + --broadcast else - L2OO_ADDRESS=$L2OO_ADDRESS forge script script/OPSuccinctParameterUpdater.s.sol:OPSuccinctParameterUpdater \ + $ENV_VARS forge script script/OPSuccinctParameterUpdater.s.sol:OPSuccinctParameterUpdater \ --rpc-url $L1_RPC \ --private-key $PRIVATE_KEY \ --broadcast - fi \ No newline at end of file + fi + +deploy-dispute-game-factory env_file=".env": + #!/usr/bin/env bash + set -euo pipefail + + # Load environment variables + source {{env_file}} + + # cd into contracts directory + cd contracts + + # forge install + forge install + + VERIFY="" + if [ $ETHERSCAN_API_KEY != "" ]; then + VERIFY="--verify --verifier etherscan --etherscan-api-key $ETHERSCAN_API_KEY" + fi + + # Run the forge deployment script + L2OO_ADDRESS=$L2OO_ADDRESS forge script script/OPSuccinctDGFDeployer.s.sol:OPSuccinctDFGDeployer \ + --rpc-url $L1_RPC \ + --private-key $PRIVATE_KEY \ + --broadcast \ + $VERIFY + fi diff --git a/op-network.yaml b/op-network.yaml index 98726267..fbf6e31c 100644 --- a/op-network.yaml +++ b/op-network.yaml @@ -20,10 +20,6 @@ optimism_package: # A list of optional extra params that will be passed to the batcher container for modifying its behaviour extra_params: ["--batch-type=1"] - op_contract_deployer_params: - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.0.6 - l1_artifacts_locator: tag://op-contracts/v1.6.0 - l2_artifacts_locator: tag://op-contracts/v1.7.0-beta.1+l2-contracts global_log_level: "info" global_node_selectors: {} global_tolerations: [] diff --git a/programs/aggregation/src/main.rs b/programs/aggregation/src/main.rs index 761dfcba..0a625bb5 100644 --- a/programs/aggregation/src/main.rs +++ b/programs/aggregation/src/main.rs @@ -44,9 +44,7 @@ pub fn main() { let serialized_boot_info = bincode::serialize(&boot_info).unwrap(); let pv_digest = Sha256::digest(serialized_boot_info); - if cfg!(target_os = "zkvm") { - sp1_lib::verify::verify_sp1_proof(&agg_inputs.multi_block_vkey, &pv_digest.into()); - } + sp1_lib::verify::verify_sp1_proof(&agg_inputs.multi_block_vkey, &pv_digest.into()); }); // Create a map of each l1 head in the [`BootInfoStruct`]'s to booleans diff --git a/programs/fault-proof/Cargo.toml b/programs/fault-proof/Cargo.toml deleted file mode 100644 index c0f44f59..00000000 --- a/programs/fault-proof/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "fault-proof" -version = "0.1.0" -edition.workspace = true -authors.workspace = true -license.workspace = true -repository.workspace = true -homepage.workspace = true - -[dependencies] -cfg-if.workspace = true -serde_json.workspace = true -tracing.workspace = true -anyhow.workspace = true - -# workspace (ethereum) -alloy-consensus.workspace = true - -# sp1 -sp1-zkvm = { workspace = true } - -# kona -kona-executor.workspace = true -kona-driver.workspace = true -kona-proof.workspace = true - -# op-succinct -op-succinct-client-utils.workspace = true - -# op-alloy -op-alloy-genesis.workspace = true -op-alloy-rpc-types-engine.workspace = true - -# `tracing-subscriber` feature dependencies -tracing-subscriber = { workspace = true, optional = true } - -[features] -tracing-subscriber = ["dep:tracing-subscriber"] diff --git a/programs/fault-proof/src/main.rs b/programs/fault-proof/src/main.rs deleted file mode 100644 index fcb9bf41..00000000 --- a/programs/fault-proof/src/main.rs +++ /dev/null @@ -1,149 +0,0 @@ -//! A program to verify a OP Stack chain's block STF in the zkVM. -//! -//! This binary contains the client program for executing the Optimism rollup state transition -//! across a single block, which can be used in an on chain dispute game. Depending on the -//! compilation pipeline, it will compile to be run either in native mode or in zkVM mode. In native -//! mode, the data for verifying the execute of the Optimism rollup's state transition is fetched -//! from RPC, while in zkVM mode, the data is supplied by the host binary to the verifiable program. - -#![cfg_attr(target_os = "zkvm", no_main)] - -extern crate alloc; - -use alloc::sync::Arc; - -use cfg_if::cfg_if; -use kona_driver::Driver; -use kona_proof::{ - executor::KonaExecutorConstructor, - l1::{OracleBlobProvider, OracleL1ChainProvider, OraclePipeline}, - l2::OracleL2ChainProvider, - sync::new_pipeline_cursor, - BootInfo, -}; -use op_succinct_client_utils::precompiles::zkvm_handle_register; - -cfg_if! { - if #[cfg(target_os = "zkvm")] { - sp1_zkvm::entrypoint!(main); - use op_succinct_client_utils::{InMemoryOracle, boot::BootInfoStruct, BootInfoWithBytesConfig}; - use op_alloy_genesis::RollupConfig; - use alloc::vec::Vec; - use serde_json; - } else { - use kona_proof::CachingOracle; - use op_succinct_client_utils::pipes::{ORACLE_READER, HINT_WRITER}; - } -} - -fn main() { - #[cfg(feature = "tracing-subscriber")] - { - use anyhow::anyhow; - use tracing::Level; - - let subscriber = tracing_subscriber::fmt() - .with_max_level(Level::INFO) - .finish(); - tracing::subscriber::set_global_default(subscriber) - .map_err(|e| anyhow!(e)) - .unwrap(); - } - - op_succinct_client_utils::block_on(async move { - //////////////////////////////////////////////////////////////// - // PROLOGUE // - //////////////////////////////////////////////////////////////// - - cfg_if! { - // If we are compiling for the zkVM, read inputs from SP1 to generate boot info - // and in memory oracle. - if #[cfg(target_os = "zkvm")] { - println!("cycle-tracker-start: boot-load"); - let boot_info_with_bytes_config = sp1_zkvm::io::read::(); - - // BootInfoStruct is identical to BootInfoWithBytesConfig, except it replaces - // the rollup_config_bytes with a hash of those bytes (rollupConfigHash). Securely - // hashes the rollup config bytes. - let boot_info_struct = BootInfoStruct::from(boot_info_with_bytes_config.clone()); - sp1_zkvm::io::commit::(&boot_info_struct); - - let rollup_config: RollupConfig = serde_json::from_slice(&boot_info_with_bytes_config.rollup_config_bytes).expect("failed to parse rollup config"); - let boot: Arc = Arc::new(BootInfo { - l1_head: boot_info_with_bytes_config.l1_head, - agreed_l2_output_root: boot_info_with_bytes_config.l2_output_root, - claimed_l2_output_root: boot_info_with_bytes_config.l2_claim, - claimed_l2_block_number: boot_info_with_bytes_config.l2_claim_block, - chain_id: boot_info_with_bytes_config.chain_id, - rollup_config, - }); - println!("cycle-tracker-end: boot-load"); - - println!("cycle-tracker-start: oracle-load"); - let in_memory_oracle_bytes: Vec = sp1_zkvm::io::read_vec(); - let oracle = Arc::new(InMemoryOracle::from_raw_bytes(in_memory_oracle_bytes)); - println!("cycle-tracker-end: oracle-load"); - - println!("cycle-tracker-start: oracle-verify"); - oracle.verify().expect("key value verification failed"); - println!("cycle-tracker-end: oracle-verify"); - } - // If we are compiling for online mode, create a caching oracle that speaks to the - // fetcher via hints, and gather boot info from this oracle. - else { - let oracle = Arc::new(CachingOracle::new(1024, ORACLE_READER, HINT_WRITER)); - let boot = Arc::new(BootInfo::load(oracle.as_ref()).await.unwrap()); - } - } - - let l1_provider = OracleL1ChainProvider::new(boot.clone(), oracle.clone()); - let l2_provider = OracleL2ChainProvider::new(boot.clone(), oracle.clone()); - let beacon = OracleBlobProvider::new(oracle.clone()); - - //////////////////////////////////////////////////////////////// - // DERIVATION & EXECUTION // - //////////////////////////////////////////////////////////////// - - let cursor = new_pipeline_cursor( - oracle.clone(), - &boot, - &mut l1_provider.clone(), - &mut l2_provider.clone(), - ) - .await - .unwrap(); - - let cfg = Arc::new(boot.rollup_config.clone()); - let pipeline = OraclePipeline::new( - cfg.clone(), - cursor.clone(), - oracle.clone(), - beacon, - l1_provider.clone(), - l2_provider.clone(), - ); - let executor = KonaExecutorConstructor::new( - &cfg, - l2_provider.clone(), - l2_provider, - zkvm_handle_register, - ); - let mut driver = Driver::new(cursor, executor, pipeline); - - println!("cycle-tracker-start: advance-to-target"); - let (number, output_root) = driver - .advance_to_target(&boot.rollup_config, boot.claimed_l2_block_number) - .await - .unwrap(); - println!("cycle-tracker-end: advance-to-target"); - - //////////////////////////////////////////////////////////////// - // EPILOGUE // - //////////////////////////////////////////////////////////////// - - assert_eq!(number, boot.claimed_l2_block_number); - assert_eq!(output_root, boot.claimed_l2_output_root); - - println!("Validated derivation and STF. Output Root: {}", output_root); - }); -} diff --git a/programs/range/src/main.rs b/programs/range/src/main.rs index 637bf5b4..c5e79065 100644 --- a/programs/range/src/main.rs +++ b/programs/range/src/main.rs @@ -203,6 +203,16 @@ fn main() { number = number, output_root = output_root ); + + // Manually forget large objects to avoid allocator overhead + std::mem::forget(pipeline); + std::mem::forget(executor); + std::mem::forget(l2_provider); + std::mem::forget(l1_provider); + std::mem::forget(oracle); + std::mem::forget(cfg); + std::mem::forget(cursor); + std::mem::forget(boot); }); } @@ -260,7 +270,12 @@ where println!("cycle-tracker-report-start: block-execution"); let mut block_executor = executor.new_executor(cursor.l2_safe_head_header().clone()); - let header = match block_executor.execute_payload(attributes.clone()) { + println!("cycle-tracker-report-end: block-execution"); + + println!("cycle-tracker-report-start: block-execution"); + let res = block_executor.execute_payload(attributes.clone()); + println!("cycle-tracker-report-end: block-execution"); + let header = match res { Ok(header) => header, Err(e) => { error!(target: "client", "Failed to execute L2 block: {}", e); @@ -283,8 +298,11 @@ where }); // Retry the execution. + println!("cycle-tracker-report-start: block-execution"); block_executor = executor.new_executor(cursor.l2_safe_head_header().clone()); - match block_executor.execute_payload(attributes.clone()) { + let res = block_executor.execute_payload(attributes.clone()); + println!("cycle-tracker-report-end: block-execution"); + match res { Ok(header) => header, Err(e) => { error!( @@ -300,7 +318,6 @@ where } } }; - println!("cycle-tracker-report-end: block-execution"); // Construct the block. let block = OpBlock { diff --git a/proposer/db-utils/query_proofs.py b/proposer/db-utils/query_proofs.py index 653356d5..6fcba2dd 100644 --- a/proposer/db-utils/query_proofs.py +++ b/proposer/db-utils/query_proofs.py @@ -4,6 +4,7 @@ from dotenv import load_dotenv import time import sys +import datetime # Types of proofs class ProofType(Enum): @@ -92,18 +93,12 @@ def query_agg_proofs(db_path) -> [ProofRequest]: # Load environment variables from .env file load_dotenv() - # Get L2OO_ADDRESS from environment variables - L2OO_ADDRESS = os.getenv('L2OO_ADDRESS') - if L2OO_ADDRESS is None: - raise ValueError("L2OO_ADDRESS not found in .env file") - # Get chain ID from command line args if len(sys.argv) != 2: print("Usage: python query_proofs.py ") sys.exit(1) chain_id = sys.argv[1] - print(f"L2OO_ADDRESS: {L2OO_ADDRESS}") db_path = f"../../db/{chain_id}/proofs.db" print(f"DB Path: {db_path}") @@ -113,8 +108,18 @@ def query_agg_proofs(db_path) -> [ProofRequest]: print("-" * 50) span_proofs = query_span_proofs(db_path) for proof in span_proofs: - if proof.status is not ProofStatus.UNREQ: - print(f"Request ID: {proof.id}, Type: {proof.type}, Start Block: {proof.start_block}, End Block: {proof.end_block}, Status: {proof.status}, Prover Request ID: {proof.prover_request_id}, Request Added Time: {proof.request_added_time}, Proof Request Time: {proof.proof_request_time}") + if proof.status == ProofStatus.FAILED: + print(f"Request ID: {proof.id}, Date: {datetime.datetime.fromtimestamp(proof.request_added_time).strftime('%Y-%m-%d %H:%M:%S')}, Start Block: {proof.start_block}, End Block: {proof.end_block}") + + # Print unique failed blocks + failed_blocks = set() + for proof in span_proofs: + if proof.status == ProofStatus.FAILED: + failed_blocks.add((proof.start_block, proof.end_block)) + + print("\nUnique Failed Block Ranges:") + for start, end in sorted(failed_blocks): + print(f"Start Block: {start}, End Block: {end}") print("-" * 50) # Query for aggregation proofs diff --git a/proposer/op/Dockerfile.op_proposer b/proposer/op/Dockerfile.op_proposer index 871f3201..8909838a 100644 --- a/proposer/op/Dockerfile.op_proposer +++ b/proposer/op/Dockerfile.op_proposer @@ -26,6 +26,9 @@ FROM ubuntu:22.04 RUN --mount=type=cache,target=/var/cache/apt \ apt-get update && apt-get install -y \ ca-certificates \ + sqlite3 \ + jq \ + netcat-traditional \ && rm -rf /var/lib/apt/lists/* # Copy the built op-proposer binary from the previous stage diff --git a/proposer/op/Makefile b/proposer/op/Makefile index 4f784ba6..35e157b3 100644 --- a/proposer/op/Makefile +++ b/proposer/op/Makefile @@ -9,5 +9,8 @@ bindings: @cd ../../contracts/ && forge inspect src/OPSuccinctL2OutputOracle.sol:OPSuccinctL2OutputOracle abi > ../proposer/op/generated_bindings/OPSuccinctL2OutputOracle.abi @cd ../../contracts/ && forge inspect src/OPSuccinctL2OutputOracle.sol:OPSuccinctL2OutputOracle bytecode > ../proposer/op/generated_bindings/OPSuccinctL2OutputOracle.bin @abigen --abi generated_bindings/OPSuccinctL2OutputOracle.abi --bin generated_bindings/OPSuccinctL2OutputOracle.bin --pkg bindings --type OPSuccinctL2OutputOracle --out ./bindings/opsuccinctl2outputoracle.go + @cd ../../contracts/ && forge inspect src/OPSuccinctDisputeGameFactory.sol:OPSuccinctDisputeGameFactory abi > ../proposer/op/generated_bindings/OPSuccinctDisputeGameFactory.abi + @cd ../../contracts/ && forge inspect src/OPSuccinctDisputeGameFactory.sol:OPSuccinctDisputeGameFactory bytecode > ../proposer/op/generated_bindings/OPSuccinctDisputeGameFactory.bin + @abigen --abi generated_bindings/OPSuccinctDisputeGameFactory.abi --bin generated_bindings/OPSuccinctDisputeGameFactory.bin --pkg bindings --type OPSuccinctDisputeGameFactory --out ./bindings/opsuccinctdisputegamefactory.go @rm -rf generated_bindings @echo "Bindings generated successfully." diff --git a/proposer/op/bindings/opsuccinctdisputegamefactory.go b/proposer/op/bindings/opsuccinctdisputegamefactory.go new file mode 100644 index 00000000..88268cfc --- /dev/null +++ b/proposer/op/bindings/opsuccinctdisputegamefactory.go @@ -0,0 +1,255 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// OPSuccinctDisputeGameFactoryMetaData contains all meta data concerning the OPSuccinctDisputeGameFactory contract. +var OPSuccinctDisputeGameFactoryMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_impl\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"create\",\"inputs\":[{\"name\":\"_rootClaim\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"impl\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"}]", + Bin: "0x6080604052348015600e575f5ffd5b50604051610452380380610452833981016040819052602b91604e565b5f80546001600160a01b0319166001600160a01b03929092169190911790556079565b5f60208284031215605d575f5ffd5b81516001600160a01b03811681146072575f5ffd5b9392505050565b6103cc806100865f395ff3fe608060405260043610610028575f3560e01c80636dd7af7f1461002c5780638abf607714610041575b5f5ffd5b61003f61003a366004610244565b61007b565b005b34801561004c575f5ffd5b505f5461005f906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b5f6100da33865f5f1b87878760405160200161009993929190610313565b60408051601f19818403018152908290526100b994939291602001610356565b60408051601f198184030181529190525f546001600160a01b031690610133565b9050806001600160a01b0316638129fc1c346040518263ffffffff1660e01b81526004015f604051808303818588803b158015610115575f5ffd5b505af1158015610127573d5f5f3e3d5ffd5b50505050505050505050565b5f61013f5f8484610146565b9392505050565b5f60608203516040830351602084035184518060208701018051600283016c5af43d3d93803e606057fd5bf3895289600d8a035278593da1005b363d3d373d3d3d3d610000806062363936013d738160481b1760218a03527f9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff603a8a035272fd6100003d81600a3d39f336602c57343d527f6062820160781b1761ff9e82106059018a03528060f01b8352606c8101604c8a038cf0975050866102105763301164255f526004601cfd5b90528552601f19850152603f19840152605f199092019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f5f60808587031215610257575f5ffd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115610282575f5ffd5b8501601f81018713610292575f5ffd5b803567ffffffffffffffff8111156102ac576102ac610230565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156102db576102db610230565b6040528181528282016020018910156102f2575f5ffd5b816020840160208301375f6020838301015280935050505092959194509250565b838152826020820152606060408201525f82518060608401528060208501608085015e5f608082850101526080601f19601f830116840101915050949350505050565b6bffffffffffffffffffffffff198560601b1681528360148201528260348201525f82518060208501605485015e5f92016054019182525094935050505056fea2646970667358221220ce3719875c7a48c923f77a9f2a7d16403b8314678d8113d140c47bbec7e073eb64736f6c634300081c0033", +} + +// OPSuccinctDisputeGameFactoryABI is the input ABI used to generate the binding from. +// Deprecated: Use OPSuccinctDisputeGameFactoryMetaData.ABI instead. +var OPSuccinctDisputeGameFactoryABI = OPSuccinctDisputeGameFactoryMetaData.ABI + +// OPSuccinctDisputeGameFactoryBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use OPSuccinctDisputeGameFactoryMetaData.Bin instead. +var OPSuccinctDisputeGameFactoryBin = OPSuccinctDisputeGameFactoryMetaData.Bin + +// DeployOPSuccinctDisputeGameFactory deploys a new Ethereum contract, binding an instance of OPSuccinctDisputeGameFactory to it. +func DeployOPSuccinctDisputeGameFactory(auth *bind.TransactOpts, backend bind.ContractBackend, _impl common.Address) (common.Address, *types.Transaction, *OPSuccinctDisputeGameFactory, error) { + parsed, err := OPSuccinctDisputeGameFactoryMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OPSuccinctDisputeGameFactoryBin), backend, _impl) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &OPSuccinctDisputeGameFactory{OPSuccinctDisputeGameFactoryCaller: OPSuccinctDisputeGameFactoryCaller{contract: contract}, OPSuccinctDisputeGameFactoryTransactor: OPSuccinctDisputeGameFactoryTransactor{contract: contract}, OPSuccinctDisputeGameFactoryFilterer: OPSuccinctDisputeGameFactoryFilterer{contract: contract}}, nil +} + +// OPSuccinctDisputeGameFactory is an auto generated Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactory struct { + OPSuccinctDisputeGameFactoryCaller // Read-only binding to the contract + OPSuccinctDisputeGameFactoryTransactor // Write-only binding to the contract + OPSuccinctDisputeGameFactoryFilterer // Log filterer for contract events +} + +// OPSuccinctDisputeGameFactoryCaller is an auto generated read-only Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactoryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OPSuccinctDisputeGameFactoryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactoryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OPSuccinctDisputeGameFactoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OPSuccinctDisputeGameFactoryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OPSuccinctDisputeGameFactorySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OPSuccinctDisputeGameFactorySession struct { + Contract *OPSuccinctDisputeGameFactory // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OPSuccinctDisputeGameFactoryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OPSuccinctDisputeGameFactoryCallerSession struct { + Contract *OPSuccinctDisputeGameFactoryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OPSuccinctDisputeGameFactoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OPSuccinctDisputeGameFactoryTransactorSession struct { + Contract *OPSuccinctDisputeGameFactoryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OPSuccinctDisputeGameFactoryRaw is an auto generated low-level Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactoryRaw struct { + Contract *OPSuccinctDisputeGameFactory // Generic contract binding to access the raw methods on +} + +// OPSuccinctDisputeGameFactoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactoryCallerRaw struct { + Contract *OPSuccinctDisputeGameFactoryCaller // Generic read-only contract binding to access the raw methods on +} + +// OPSuccinctDisputeGameFactoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OPSuccinctDisputeGameFactoryTransactorRaw struct { + Contract *OPSuccinctDisputeGameFactoryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOPSuccinctDisputeGameFactory creates a new instance of OPSuccinctDisputeGameFactory, bound to a specific deployed contract. +func NewOPSuccinctDisputeGameFactory(address common.Address, backend bind.ContractBackend) (*OPSuccinctDisputeGameFactory, error) { + contract, err := bindOPSuccinctDisputeGameFactory(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OPSuccinctDisputeGameFactory{OPSuccinctDisputeGameFactoryCaller: OPSuccinctDisputeGameFactoryCaller{contract: contract}, OPSuccinctDisputeGameFactoryTransactor: OPSuccinctDisputeGameFactoryTransactor{contract: contract}, OPSuccinctDisputeGameFactoryFilterer: OPSuccinctDisputeGameFactoryFilterer{contract: contract}}, nil +} + +// NewOPSuccinctDisputeGameFactoryCaller creates a new read-only instance of OPSuccinctDisputeGameFactory, bound to a specific deployed contract. +func NewOPSuccinctDisputeGameFactoryCaller(address common.Address, caller bind.ContractCaller) (*OPSuccinctDisputeGameFactoryCaller, error) { + contract, err := bindOPSuccinctDisputeGameFactory(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OPSuccinctDisputeGameFactoryCaller{contract: contract}, nil +} + +// NewOPSuccinctDisputeGameFactoryTransactor creates a new write-only instance of OPSuccinctDisputeGameFactory, bound to a specific deployed contract. +func NewOPSuccinctDisputeGameFactoryTransactor(address common.Address, transactor bind.ContractTransactor) (*OPSuccinctDisputeGameFactoryTransactor, error) { + contract, err := bindOPSuccinctDisputeGameFactory(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OPSuccinctDisputeGameFactoryTransactor{contract: contract}, nil +} + +// NewOPSuccinctDisputeGameFactoryFilterer creates a new log filterer instance of OPSuccinctDisputeGameFactory, bound to a specific deployed contract. +func NewOPSuccinctDisputeGameFactoryFilterer(address common.Address, filterer bind.ContractFilterer) (*OPSuccinctDisputeGameFactoryFilterer, error) { + contract, err := bindOPSuccinctDisputeGameFactory(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OPSuccinctDisputeGameFactoryFilterer{contract: contract}, nil +} + +// bindOPSuccinctDisputeGameFactory binds a generic wrapper to an already deployed contract. +func bindOPSuccinctDisputeGameFactory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := OPSuccinctDisputeGameFactoryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OPSuccinctDisputeGameFactory.Contract.OPSuccinctDisputeGameFactoryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.OPSuccinctDisputeGameFactoryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.OPSuccinctDisputeGameFactoryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OPSuccinctDisputeGameFactory.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.contract.Transact(opts, method, params...) +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryCaller) Impl(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OPSuccinctDisputeGameFactory.contract.Call(opts, &out, "impl") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactorySession) Impl() (common.Address, error) { + return _OPSuccinctDisputeGameFactory.Contract.Impl(&_OPSuccinctDisputeGameFactory.CallOpts) +} + +// Impl is a free data retrieval call binding the contract method 0x8abf6077. +// +// Solidity: function impl() view returns(address) +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryCallerSession) Impl() (common.Address, error) { + return _OPSuccinctDisputeGameFactory.Contract.Impl(&_OPSuccinctDisputeGameFactory.CallOpts) +} + +// Create is a paid mutator transaction binding the contract method 0x6dd7af7f. +// +// Solidity: function create(bytes32 _rootClaim, uint256 _l2BlockNumber, uint256 _l1BlockNumber, bytes _proof) payable returns() +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryTransactor) Create(opts *bind.TransactOpts, _rootClaim [32]byte, _l2BlockNumber *big.Int, _l1BlockNumber *big.Int, _proof []byte) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.contract.Transact(opts, "create", _rootClaim, _l2BlockNumber, _l1BlockNumber, _proof) +} + +// Create is a paid mutator transaction binding the contract method 0x6dd7af7f. +// +// Solidity: function create(bytes32 _rootClaim, uint256 _l2BlockNumber, uint256 _l1BlockNumber, bytes _proof) payable returns() +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactorySession) Create(_rootClaim [32]byte, _l2BlockNumber *big.Int, _l1BlockNumber *big.Int, _proof []byte) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.Create(&_OPSuccinctDisputeGameFactory.TransactOpts, _rootClaim, _l2BlockNumber, _l1BlockNumber, _proof) +} + +// Create is a paid mutator transaction binding the contract method 0x6dd7af7f. +// +// Solidity: function create(bytes32 _rootClaim, uint256 _l2BlockNumber, uint256 _l1BlockNumber, bytes _proof) payable returns() +func (_OPSuccinctDisputeGameFactory *OPSuccinctDisputeGameFactoryTransactorSession) Create(_rootClaim [32]byte, _l2BlockNumber *big.Int, _l1BlockNumber *big.Int, _proof []byte) (*types.Transaction, error) { + return _OPSuccinctDisputeGameFactory.Contract.Create(&_OPSuccinctDisputeGameFactory.TransactOpts, _rootClaim, _l2BlockNumber, _l1BlockNumber, _proof) +} diff --git a/proposer/op/bindings/opsuccinctl2outputoracle.go b/proposer/op/bindings/opsuccinctl2outputoracle.go index d4b6709a..e09bdddb 100644 --- a/proposer/op/bindings/opsuccinctl2outputoracle.go +++ b/proposer/op/bindings/opsuccinctl2outputoracle.go @@ -55,8 +55,8 @@ type TypesOutputProposal struct { // OPSuccinctL2OutputOracleMetaData contains all meta data concerning the OPSuccinctL2OutputOracle contract. var OPSuccinctL2OutputOracleMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"aggregationVkey\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approvedProposers\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBlockHash\",\"inputs\":[{\"name\":\"_blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizationPeriodSeconds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"historicBlockHashes\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initParams\",\"type\":\"tuple\",\"internalType\":\"structOPSuccinctL2OutputOracle.InitParams\",\"components\":[{\"name\":\"challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingOutputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifier\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"l2BlockTime\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proposer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"rangeVkeyCommitment\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rollupConfigHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAggregationVkey\",\"inputs\":[{\"name\":\"_aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRangeVkeyCommitment\",\"inputs\":[{\"name\":\"_rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRollupConfigHash\",\"inputs\":[{\"name\":\"_rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSubmissionInterval\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateVerifier\",\"inputs\":[{\"name\":\"_verifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AggregationVkeyUpdated\",\"inputs\":[{\"name\":\"oldAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposerUpdated\",\"inputs\":[{\"name\":\"proposer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"added\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RangeVkeyCommitmentUpdated\",\"inputs\":[{\"name\":\"oldRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RollupConfigHashUpdated\",\"inputs\":[{\"name\":\"oldRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SubmissionIntervalUpdated\",\"inputs\":[{\"name\":\"oldSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"VerifierUpdated\",\"inputs\":[{\"name\":\"oldVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1BlockHashNotAvailable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1BlockHashNotCheckpointed\",\"inputs\":[]}]", - Bin: "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611c57806100ed6000396000f3fe60806040526004361061023a5760003560e01c806393991af31161012e578063c4cb03ec116100ab578063db1470f51161006f578063db1470f5146106be578063dcec3348146106de578063e1a41bcf146106f3578063f2fde38b14610709578063f4daa2911461072957600080fd5b8063c4cb03ec14610608578063ce5db8d614610628578063cf8e5cf01461063e578063d1de856c1461065e578063d46512761461067e57600080fd5b8063a8e4fb90116100f2578063a8e4fb9014610574578063b03cd41814610594578063bc91ce33146105b4578063bffa7f0f146105d4578063c32e4e3e146105f257600080fd5b806393991af3146104ab57806397fc007c146104c15780639ad84880146104e1578063a196b525146104f4578063a25ae5571461052157600080fd5b806354fd4d50116101bc57806370872aa51161018057806370872aa51461041f5780637f00642014610435578063887862721461045557806389c44cbb1461046b5780638da5cb5b1461048b57600080fd5b806354fd4d501461037d57806369f16eec146103c15780636abcf563146103d65780636b4d98dd146103eb5780636d9a1c8b1461040957600080fd5b80632b7ac3f3116102035780632b7ac3f3146102db578063336c9e81146103135780634599c78814610333578063529933df14610348578063534db0e21461035d57600080fd5b80622134cc1461023f57806309d632d3146102635780631bdd450c146102855780631e856800146102a55780632b31841e146102c5575b600080fd5b34801561024b57600080fd5b506005545b6040519081526020015b60405180910390f35b34801561026f57600080fd5b5061028361027e366004611888565b61073e565b005b34801561029157600080fd5b506102836102a03660046118aa565b6107c7565b3480156102b157600080fd5b506102836102c03660046118aa565b610825565b3480156102d157600080fd5b50610250600a5481565b3480156102e757600080fd5b50600b546102fb906001600160a01b031681565b6040516001600160a01b03909116815260200161025a565b34801561031f57600080fd5b5061028361032e3660046118aa565b610857565b34801561033f57600080fd5b506102506108c2565b34801561035457600080fd5b50600454610250565b34801561036957600080fd5b506006546102fb906001600160a01b031681565b34801561038957600080fd5b506103b46040518060400160405280600b81526020016a0626574612d76302e342e360ac1b81525081565b60405161025a9190611910565b3480156103cd57600080fd5b5061025061091f565b3480156103e257600080fd5b50600354610250565b3480156103f757600080fd5b506006546001600160a01b03166102fb565b34801561041557600080fd5b50610250600c5481565b34801561042b57600080fd5b5061025060015481565b34801561044157600080fd5b506102506104503660046118aa565b610931565b34801561046157600080fd5b5061025060025481565b34801561047757600080fd5b506102836104863660046118aa565b610acf565b34801561049757600080fd5b50600d546102fb906001600160a01b031681565b3480156104b757600080fd5b5061025060055481565b3480156104cd57600080fd5b506102836104dc366004611888565b610cd4565b6102836104ef366004611994565b610d5a565b34801561050057600080fd5b5061025061050f3660046118aa565b600f6020526000908152604090205481565b34801561052d57600080fd5b5061054161053c3660046118aa565b6111cc565b60408051825181526020808401516001600160801b0390811691830191909152928201519092169082015260600161025a565b34801561058057600080fd5b506007546102fb906001600160a01b031681565b3480156105a057600080fd5b506102836105af366004611888565b61124a565b3480156105c057600080fd5b506102836105cf3660046118aa565b6112cb565b3480156105e057600080fd5b506007546001600160a01b03166102fb565b3480156105fe57600080fd5b5061025060095481565b34801561061457600080fd5b506102836106233660046118aa565b611329565b34801561063457600080fd5b5061025060085481565b34801561064a57600080fd5b506105416106593660046118aa565b611387565b34801561066a57600080fd5b506102506106793660046118aa565b6113bf565b34801561068a57600080fd5b506106ae610699366004611888565b600e6020526000908152604090205460ff1681565b604051901515815260200161025a565b3480156106ca57600080fd5b506102836106d9366004611a46565b6113ef565b3480156106ea57600080fd5b506102506117cf565b3480156106ff57600080fd5b5061025060045481565b34801561071557600080fd5b50610283610724366004611888565b6117e6565b34801561073557600080fd5b50600854610250565b600d546001600160a01b031633146107715760405162461bcd60e51b815260040161076890611b09565b60405180910390fd5b6001600160a01b0381166000818152600e60209081526040808320805460ff19169055519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91015b60405180910390a250565b600d546001600160a01b031633146107f15760405162461bcd60e51b815260040161076890611b09565b600c546040518291907f5d9ebe9f09b0810b3546b30781ba9a51092b37dd6abada4b830ce54a41ac6a4b90600090a3600c55565b804080610845576040516321301a1960e21b815260040160405180910390fd5b6000918252600f602052604090912055565b600d546001600160a01b031633146108815760405162461bcd60e51b815260040161076890611b09565b60045460408051918252602082018390527fc1bf9abfb57ea01ed9ecb4f45e9cefa7ba44b2e6778c3ce7281409999f1af1b2910160405180910390a1600455565b6003546000901561091657600380546108dd90600190611b66565b815481106108ed576108ed611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b0316919050565b6001545b905090565b60035460009061091a90600190611b66565b600061093b6108c2565b8211156109c15760405162461bcd60e51b815260206004820152604860248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f7420666f72206120626c6f636b207468617420686173206e6f74206265656e206064820152671c1c9bdc1bdcd95960c21b608482015260a401610768565b600354610a455760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f74206173206e6f206f7574707574732068617665206265656e2070726f706f736064820152651959081e595d60d21b608482015260a401610768565b6003546000905b80821015610ac85760006002610a628385611b93565b610a6c9190611bab565b90508460038281548110610a8257610a82611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b03161015610abe57610ab7816001611b93565b9250610ac2565b8091505b50610a4c565b5092915050565b6006546001600160a01b03163314610b4f5760405162461bcd60e51b815260206004820152603e60248201527f4c324f75747075744f7261636c653a206f6e6c7920746865206368616c6c656e60448201527f67657220616464726573732063616e2064656c657465206f75747075747300006064820152608401610768565b6003548110610bd25760405162461bcd60e51b815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c6174657374206f757470757420696e6064820152620c8caf60eb1b608482015260a401610768565b60085460038281548110610be857610be8611b7d565b6000918252602090912060016002909202010154610c0f906001600160801b031642611b66565b10610c915760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f74707574732074686174206861766520616c7265616479206265656e2066696e606482015265185b1a5e995960d21b608482015260a401610768565b6000610c9c60035490565b90508160035581817f4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b660405160405180910390a35050565b600d546001600160a01b03163314610cfe5760405162461bcd60e51b815260040161076890611b09565b600b546040516001600160a01b038084169216907f0243549a92b2412f7a3caf7a2e56d65b8821b91345363faa5f57195384065fcc90600090a3600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff1680610da2575060008052600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c5460ff165b610e145760405162461bcd60e51b815260206004820152603f60248201527f4c324f75747075744f7261636c653a206f6e6c7920617070726f76656420707260448201527f6f706f736572732063616e2070726f706f7365206e6577206f757470757473006064820152608401610768565b610e1c6117cf565b831015610eb75760405162461bcd60e51b815260206004820152605860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f206e6560648201527f787420657870656374656420626c6f636b206e756d6265720000000000000000608482015260a401610768565b42610ec1846113bf565b10610f2d5760405162461bcd60e51b815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527532206f757470757420696e207468652066757475726560501b6064820152608401610768565b83610fa05760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f20686173680000000000006064820152608401610768565b6000828152600f602052604090205480610fcd57604051630455475360e31b815260040160405180910390fd5b60006040518060c001604052808381526020016003610fea61091f565b81548110610ffa57610ffa611b7d565b60009182526020918290206002909102015482528181018990526040808301899052600c54606080850191909152600a54608094850152600b5460095483518751818701529487015185850152928601518483015290850151838501529284015160a08084019190915284015160c08301529293506001600160a01b03909116916341493c609160e001604051602081830303815290604052866040518463ffffffff1660e01b81526004016110b293929190611bcd565b60006040518083038186803b1580156110ca57600080fd5b505afa1580156110de573d6000803e3d6000fd5b50505050846110ec60035490565b877fa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e24260405161111e91815260200190565b60405180910390a45050604080516060810182529485526001600160801b034281166020870190815294811691860191825260038054600181018255600091909152955160029096027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810196909655935190518416600160801b029316929092177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909301929092555050565b6040805160608101825260008082526020820181905291810191909152600382815481106111fc576111fc611b7d565b600091825260209182902060408051606081018252600290930290910180548352600101546001600160801b0380821694840194909452600160801b90049092169181019190915292915050565b600d546001600160a01b031633146112745760405162461bcd60e51b815260040161076890611b09565b6001600160a01b0381166000818152600e6020908152604091829020805460ff1916600190811790915591519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91016107bc565b600d546001600160a01b031633146112f55760405162461bcd60e51b815260040161076890611b09565b600a546040518291907fbf8cab6317796bfa97fea82b6d27c9542a08fa0821813cf2a57e7cff7fdc815690600090a3600a55565b600d546001600160a01b031633146113535760405162461bcd60e51b815260040161076890611b09565b6009546040518291907f390b73b2b067afcef04d30b573e4590c6e565519e370927dd777ca0ce8a55db090600090a3600955565b604080516060810182526000808252602082018190529181019190915260036113af83610931565b815481106111fc576111fc611b7d565b6000600554600154836113d29190611b66565b6113dc9190611c02565b6002546113e99190611b93565b92915050565b600054610100900460ff161580801561140f5750600054600160ff909116105b806114295750303b158015611429575060005460ff166001145b61148c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610768565b6000805460ff1916600117905580156114af576000805461ff0019166101001790555b60008261016001511161152a5760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a207375626d697373696f6e20696e74657260448201527f76616c206d7573742062652067726561746572207468616e20300000000000006064820152608401610768565b600082608001511161159b5760405162461bcd60e51b815260206004820152603460248201527f4c324f75747075744f7261636c653a204c3220626c6f636b2074696d65206d75604482015273073742062652067726561746572207468616e20360641b6064820152608401610768565b4282610140015111156116245760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a401610768565b61016082015160045560808201516005556003546000036116fb57604080516060810182526101008401518152610140840180516001600160801b03908116602084019081526101208701805183169585019586526003805460018181018355600092909252955160029687027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810191909155925196518416600160801b0296909316959095177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101559251909255905190555b8151600680546001600160a01b039283166001600160a01b031991821617909155606084015160085560208085015183166000908152600e909152604090819020805460ff1916600117905560a085015160095560c0850151600a55610180850151600b805491851691841691909117905560e0850151600c55840151600d805491909316911617905580156117cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006004546117dc6108c2565b61091a9190611b93565b600d546001600160a01b031633146118105760405162461bcd60e51b815260040161076890611b09565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461188357600080fd5b919050565b60006020828403121561189a57600080fd5b6118a38261186c565b9392505050565b6000602082840312156118bc57600080fd5b5035919050565b6000815180845260005b818110156118e9576020818501810151868301820152016118cd565b818111156118fb576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006118a360208301846118c3565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff8111828210171561195d5761195d611923565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561198c5761198c611923565b604052919050565b600080600080608085870312156119aa57600080fd5b84359350602080860135935060408601359250606086013567ffffffffffffffff808211156119d857600080fd5b818801915088601f8301126119ec57600080fd5b8135818111156119fe576119fe611923565b611a10601f8201601f19168501611963565b91508082528984828501011115611a2657600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006101a08284031215611a5957600080fd5b611a61611939565b611a6a8361186c565b8152611a786020840161186c565b6020820152611a896040840161186c565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160808401358183015250610180611afe81850161186c565b908201529392505050565b60208082526027908201527f4c324f75747075744f7261636c653a2063616c6c6572206973206e6f74207468604082015266329037bbb732b960c91b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b7857611b78611b50565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115611ba657611ba6611b50565b500190565b600082611bc857634e487b7160e01b600052601260045260246000fd5b500490565b838152606060208201526000611be660608301856118c3565b8281036040840152611bf881856118c3565b9695505050505050565b6000816000190483118215151615611c1c57611c1c611b50565b50029056fea264697066735822122017b7a0f745d54c124937ede48b12c01b01c1385bea76e9816bd47dbb830539d464736f6c634300080f0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"aggregationVkey\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approvedProposers\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBlockHash\",\"inputs\":[{\"name\":\"_blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizationPeriodSeconds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"historicBlockHashes\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initParams\",\"type\":\"tuple\",\"internalType\":\"structOPSuccinctL2OutputOracle.InitParams\",\"components\":[{\"name\":\"challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingOutputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifier\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializerVersion\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l2BlockTime\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proposer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"rangeVkeyCommitment\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rollupConfigHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAggregationVkey\",\"inputs\":[{\"name\":\"_aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRangeVkeyCommitment\",\"inputs\":[{\"name\":\"_rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRollupConfigHash\",\"inputs\":[{\"name\":\"_rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSubmissionInterval\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateVerifier\",\"inputs\":[{\"name\":\"_verifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AggregationVkeyUpdated\",\"inputs\":[{\"name\":\"oldAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposerUpdated\",\"inputs\":[{\"name\":\"proposer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"added\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RangeVkeyCommitmentUpdated\",\"inputs\":[{\"name\":\"oldRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RollupConfigHashUpdated\",\"inputs\":[{\"name\":\"oldRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SubmissionIntervalUpdated\",\"inputs\":[{\"name\":\"oldSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"VerifierUpdated\",\"inputs\":[{\"name\":\"oldVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1BlockHashNotAvailable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1BlockHashNotCheckpointed\",\"inputs\":[]}]", + Bin: "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611c57806100ed6000396000f3fe6080604052600436106102455760003560e01c80638da5cb5b11610139578063c32e4e3e116100b6578063d46512761161007a578063d4651276146106b0578063db1470f5146106f0578063dcec334814610710578063e1a41bcf14610725578063f2fde38b1461073b578063f4daa2911461075b57600080fd5b8063c32e4e3e14610624578063c4cb03ec1461063a578063ce5db8d61461065a578063cf8e5cf014610670578063d1de856c1461069057600080fd5b8063a25ae557116100fd578063a25ae55714610553578063a8e4fb90146105a6578063b03cd418146105c6578063bc91ce33146105e6578063bffa7f0f1461060657600080fd5b80638da5cb5b146104bd57806393991af3146104dd57806397fc007c146104f35780639ad8488014610513578063a196b5251461052657600080fd5b806354fd4d50116101c757806370872aa51161018b57806370872aa51461042a5780637f006420146104405780637f01ea6814610460578063887862721461048757806389c44cbb1461049d57600080fd5b806354fd4d501461038857806369f16eec146103cc5780636abcf563146103e15780636b4d98dd146103f65780636d9a1c8b1461041457600080fd5b80632b7ac3f31161020e5780632b7ac3f3146102e6578063336c9e811461031e5780634599c7881461033e578063529933df14610353578063534db0e21461036857600080fd5b80622134cc1461024a57806309d632d31461026e5780631bdd450c146102905780631e856800146102b05780632b31841e146102d0575b600080fd5b34801561025657600080fd5b506005545b6040519081526020015b60405180910390f35b34801561027a57600080fd5b5061028e610289366004611888565b610770565b005b34801561029c57600080fd5b5061028e6102ab3660046118aa565b6107f9565b3480156102bc57600080fd5b5061028e6102cb3660046118aa565b610857565b3480156102dc57600080fd5b5061025b600a5481565b3480156102f257600080fd5b50600b54610306906001600160a01b031681565b6040516001600160a01b039091168152602001610265565b34801561032a57600080fd5b5061028e6103393660046118aa565b610889565b34801561034a57600080fd5b5061025b6108f4565b34801561035f57600080fd5b5060045461025b565b34801561037457600080fd5b50600654610306906001600160a01b031681565b34801561039457600080fd5b506103bf6040518060400160405280600b81526020016a0626574612d76312e302e360ac1b81525081565b6040516102659190611910565b3480156103d857600080fd5b5061025b610951565b3480156103ed57600080fd5b5060035461025b565b34801561040257600080fd5b506006546001600160a01b0316610306565b34801561042057600080fd5b5061025b600c5481565b34801561043657600080fd5b5061025b60015481565b34801561044c57600080fd5b5061025b61045b3660046118aa565b610963565b34801561046c57600080fd5b50610475600181565b60405160ff9091168152602001610265565b34801561049357600080fd5b5061025b60025481565b3480156104a957600080fd5b5061028e6104b83660046118aa565b610b01565b3480156104c957600080fd5b50600d54610306906001600160a01b031681565b3480156104e957600080fd5b5061025b60055481565b3480156104ff57600080fd5b5061028e61050e366004611888565b610d06565b61028e610521366004611994565b610d8c565b34801561053257600080fd5b5061025b6105413660046118aa565b600f6020526000908152604090205481565b34801561055f57600080fd5b5061057361056e3660046118aa565b6111fe565b60408051825181526020808401516001600160801b03908116918301919091529282015190921690820152606001610265565b3480156105b257600080fd5b50600754610306906001600160a01b031681565b3480156105d257600080fd5b5061028e6105e1366004611888565b61127c565b3480156105f257600080fd5b5061028e6106013660046118aa565b6112fd565b34801561061257600080fd5b506007546001600160a01b0316610306565b34801561063057600080fd5b5061025b60095481565b34801561064657600080fd5b5061028e6106553660046118aa565b61135b565b34801561066657600080fd5b5061025b60085481565b34801561067c57600080fd5b5061057361068b3660046118aa565b6113b9565b34801561069c57600080fd5b5061025b6106ab3660046118aa565b6113f1565b3480156106bc57600080fd5b506106e06106cb366004611888565b600e6020526000908152604090205460ff1681565b6040519015158152602001610265565b3480156106fc57600080fd5b5061028e61070b366004611a46565b611421565b34801561071c57600080fd5b5061025b6117cf565b34801561073157600080fd5b5061025b60045481565b34801561074757600080fd5b5061028e610756366004611888565b6117e6565b34801561076757600080fd5b5060085461025b565b600d546001600160a01b031633146107a35760405162461bcd60e51b815260040161079a90611b09565b60405180910390fd5b6001600160a01b0381166000818152600e60209081526040808320805460ff19169055519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91015b60405180910390a250565b600d546001600160a01b031633146108235760405162461bcd60e51b815260040161079a90611b09565b600c546040518291907f5d9ebe9f09b0810b3546b30781ba9a51092b37dd6abada4b830ce54a41ac6a4b90600090a3600c55565b804080610877576040516321301a1960e21b815260040160405180910390fd5b6000918252600f602052604090912055565b600d546001600160a01b031633146108b35760405162461bcd60e51b815260040161079a90611b09565b60045460408051918252602082018390527fc1bf9abfb57ea01ed9ecb4f45e9cefa7ba44b2e6778c3ce7281409999f1af1b2910160405180910390a1600455565b60035460009015610948576003805461090f90600190611b66565b8154811061091f5761091f611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b0316919050565b6001545b905090565b60035460009061094c90600190611b66565b600061096d6108f4565b8211156109f35760405162461bcd60e51b815260206004820152604860248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f7420666f72206120626c6f636b207468617420686173206e6f74206265656e206064820152671c1c9bdc1bdcd95960c21b608482015260a40161079a565b600354610a775760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f74206173206e6f206f7574707574732068617665206265656e2070726f706f736064820152651959081e595d60d21b608482015260a40161079a565b6003546000905b80821015610afa5760006002610a948385611b93565b610a9e9190611bab565b90508460038281548110610ab457610ab4611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b03161015610af057610ae9816001611b93565b9250610af4565b8091505b50610a7e565b5092915050565b6006546001600160a01b03163314610b815760405162461bcd60e51b815260206004820152603e60248201527f4c324f75747075744f7261636c653a206f6e6c7920746865206368616c6c656e60448201527f67657220616464726573732063616e2064656c657465206f7574707574730000606482015260840161079a565b6003548110610c045760405162461bcd60e51b815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c6174657374206f757470757420696e6064820152620c8caf60eb1b608482015260a40161079a565b60085460038281548110610c1a57610c1a611b7d565b6000918252602090912060016002909202010154610c41906001600160801b031642611b66565b10610cc35760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f74707574732074686174206861766520616c7265616479206265656e2066696e606482015265185b1a5e995960d21b608482015260a40161079a565b6000610cce60035490565b90508160035581817f4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b660405160405180910390a35050565b600d546001600160a01b03163314610d305760405162461bcd60e51b815260040161079a90611b09565b600b546040516001600160a01b038084169216907f0243549a92b2412f7a3caf7a2e56d65b8821b91345363faa5f57195384065fcc90600090a3600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff1680610dd4575060008052600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c5460ff165b610e465760405162461bcd60e51b815260206004820152603f60248201527f4c324f75747075744f7261636c653a206f6e6c7920617070726f76656420707260448201527f6f706f736572732063616e2070726f706f7365206e6577206f75747075747300606482015260840161079a565b610e4e6117cf565b831015610ee95760405162461bcd60e51b815260206004820152605860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f206e6560648201527f787420657870656374656420626c6f636b206e756d6265720000000000000000608482015260a40161079a565b42610ef3846113f1565b10610f5f5760405162461bcd60e51b815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527532206f757470757420696e207468652066757475726560501b606482015260840161079a565b83610fd25760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f2068617368000000000000606482015260840161079a565b6000828152600f602052604090205480610fff57604051630455475360e31b815260040160405180910390fd5b60006040518060c00160405280838152602001600361101c610951565b8154811061102c5761102c611b7d565b60009182526020918290206002909102015482528181018990526040808301899052600c54606080850191909152600a54608094850152600b5460095483518751818701529487015185850152928601518483015290850151838501529284015160a08084019190915284015160c08301529293506001600160a01b03909116916341493c609160e001604051602081830303815290604052866040518463ffffffff1660e01b81526004016110e493929190611bcd565b60006040518083038186803b1580156110fc57600080fd5b505afa158015611110573d6000803e3d6000fd5b505050508461111e60035490565b877fa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e24260405161115091815260200190565b60405180910390a45050604080516060810182529485526001600160801b034281166020870190815294811691860191825260038054600181018255600091909152955160029096027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810196909655935190518416600160801b029316929092177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909301929092555050565b60408051606081018252600080825260208201819052918101919091526003828154811061122e5761122e611b7d565b600091825260209182902060408051606081018252600290930290910180548352600101546001600160801b0380821694840194909452600160801b90049092169181019190915292915050565b600d546001600160a01b031633146112a65760405162461bcd60e51b815260040161079a90611b09565b6001600160a01b0381166000818152600e6020908152604091829020805460ff1916600190811790915591519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91016107ee565b600d546001600160a01b031633146113275760405162461bcd60e51b815260040161079a90611b09565b600a546040518291907fbf8cab6317796bfa97fea82b6d27c9542a08fa0821813cf2a57e7cff7fdc815690600090a3600a55565b600d546001600160a01b031633146113855760405162461bcd60e51b815260040161079a90611b09565b6009546040518291907f390b73b2b067afcef04d30b573e4590c6e565519e370927dd777ca0ce8a55db090600090a3600955565b604080516060810182526000808252602082018190529181019190915260036113e183610963565b8154811061122e5761122e611b7d565b6000600554600154836114049190611b66565b61140e9190611c02565b60025461141b9190611b93565b92915050565b600054600190610100900460ff16158015611443575060005460ff8083169116105b6114a65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161079a565b6000805461ffff191660ff8316176101001790556101608201516115325760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a207375626d697373696f6e20696e74657260448201527f76616c206d7573742062652067726561746572207468616e2030000000000000606482015260840161079a565b60008260800151116115a35760405162461bcd60e51b815260206004820152603460248201527f4c324f75747075744f7261636c653a204c3220626c6f636b2074696d65206d75604482015273073742062652067726561746572207468616e20360641b606482015260840161079a565b42826101400151111561162c5760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a40161079a565b610160820151600455608082015160055560035460000361170357604080516060810182526101008401518152610140840180516001600160801b03908116602084019081526101208701805183169585019586526003805460018181018355600092909252955160029687027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810191909155925196518416600160801b0296909316959095177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101559251909255905190555b8151600680546001600160a01b03199081166001600160a01b0393841617909155606084015160085560208085015183166000908152600e82526040808220805460ff1916600117905560a087015160095560c0870151600a55610180870151600b8054861691871691909117905560e0870151600c5580870151600d8054909516951694909417909255815461ff001916909155905160ff831681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498910160405180910390a15050565b60006004546117dc6108f4565b61094c9190611b93565b600d546001600160a01b031633146118105760405162461bcd60e51b815260040161079a90611b09565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461188357600080fd5b919050565b60006020828403121561189a57600080fd5b6118a38261186c565b9392505050565b6000602082840312156118bc57600080fd5b5035919050565b6000815180845260005b818110156118e9576020818501810151868301820152016118cd565b818111156118fb576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006118a360208301846118c3565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff8111828210171561195d5761195d611923565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561198c5761198c611923565b604052919050565b600080600080608085870312156119aa57600080fd5b84359350602080860135935060408601359250606086013567ffffffffffffffff808211156119d857600080fd5b818801915088601f8301126119ec57600080fd5b8135818111156119fe576119fe611923565b611a10601f8201601f19168501611963565b91508082528984828501011115611a2657600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006101a08284031215611a5957600080fd5b611a61611939565b611a6a8361186c565b8152611a786020840161186c565b6020820152611a896040840161186c565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160808401358183015250610180611afe81850161186c565b908201529392505050565b60208082526027908201527f4c324f75747075744f7261636c653a2063616c6c6572206973206e6f74207468604082015266329037bbb732b960c91b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b7857611b78611b50565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115611ba657611ba6611b50565b500190565b600082611bc857634e487b7160e01b600052601260045260246000fd5b500490565b838152606060208201526000611be660608301856118c3565b8281036040840152611bf881856118c3565b9695505050505050565b6000816000190483118215151615611c1c57611c1c611b50565b50029056fea2646970667358221220960a86e7fc8731a6278de5d7bf30cbec12bba95789c30f9d10a7cbc950c3179364736f6c634300080f0033", } // OPSuccinctL2OutputOracleABI is the input ABI used to generate the binding from. @@ -660,6 +660,37 @@ func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCallerSession) Historic return _OPSuccinctL2OutputOracle.Contract.HistoricBlockHashes(&_OPSuccinctL2OutputOracle.CallOpts, arg0) } +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCaller) InitializerVersion(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _OPSuccinctL2OutputOracle.contract.Call(opts, &out, "initializerVersion") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleSession) InitializerVersion() (uint8, error) { + return _OPSuccinctL2OutputOracle.Contract.InitializerVersion(&_OPSuccinctL2OutputOracle.CallOpts) +} + +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCallerSession) InitializerVersion() (uint8, error) { + return _OPSuccinctL2OutputOracle.Contract.InitializerVersion(&_OPSuccinctL2OutputOracle.CallOpts) +} + // L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. // // Solidity: function l2BlockTime() view returns(uint256) diff --git a/proposer/op/go.mod b/proposer/op/go.mod index f65244ba..c4f6abcb 100644 --- a/proposer/op/go.mod +++ b/proposer/op/go.mod @@ -13,6 +13,7 @@ require ( github.com/slack-go/slack v0.14.0 github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.4 + golang.org/x/sync v0.8.0 ) // Patch from ethereum-optimism/optimism @@ -109,7 +110,6 @@ require ( golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect diff --git a/proposer/op/go.sum b/proposer/op/go.sum index 8323eca8..0aa3c6b5 100644 --- a/proposer/op/go.sum +++ b/proposer/op/go.sum @@ -328,6 +328,10 @@ github.com/slack-go/slack v0.14.0 h1:6c0UTfbRnvRssZUsZ2qe0Iu07VAMPjRqOa6oX8ewF4k github.com/slack-go/slack v0.14.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -443,6 +447,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/proposer/op/op_proposer.sh b/proposer/op/op_proposer.sh index 1b15402a..e560f90c 100644 --- a/proposer/op/op_proposer.sh +++ b/proposer/op/op_proposer.sh @@ -9,10 +9,13 @@ --poll-interval=${POLL_INTERVAL:-20s} \ --rollup-rpc=${L2_NODE_RPC} \ --l2oo-address=${L2OO_ADDRESS} \ + --dgf-address=${DGF_ADDRESS} \ --private-key=${PRIVATE_KEY} \ --l1-eth-rpc=${L1_RPC} \ --beacon-rpc=${L1_BEACON_RPC} \ --max-concurrent-proof-requests=${MAX_CONCURRENT_PROOF_REQUESTS:-10} \ + --max-concurrent-witness-gen=${MAX_CONCURRENT_WITNESS_GEN:-5} \ + --witness-gen-timeout=${WITNESS_GEN_TIMEOUT:-1200} \ --db-path=${DB_PATH:-/usr/local/bin/dbdata} \ --op-succinct-server-url=${OP_SUCCINCT_SERVER_URL:-http://op-succinct-server:3000} \ --max-block-range-per-span-proof=${MAX_BLOCK_RANGE_PER_SPAN_PROOF:-300} \ diff --git a/proposer/op/proposer/config.go b/proposer/op/proposer/config.go index 7d4daa0a..a8a01889 100644 --- a/proposer/op/proposer/config.go +++ b/proposer/op/proposer/config.go @@ -33,6 +33,9 @@ type CLIConfig struct { // L2OOAddress is the L2OutputOracle contract address. L2OOAddress string + // DGFAddress is the DisputeGameFactory contract address. + DGFAddress string + // PollInterval is the delay between querying L2 for more transaction // and creating a new batch. PollInterval time.Duration @@ -76,10 +79,12 @@ type CLIConfig struct { // L1 Beacon RPC URL used to determine span batch boundaries. BeaconRpc string - // Directory to store the transaction cache when determining span batch boundaries. - TxCacheOutDir string // The max size (in blocks) of a proof we will attempt to generate. If span batches are larger, we break them up. MaxBlockRangePerSpanProof uint64 + // The max number of concurrent witness generation processes. + MaxConcurrentWitnessGen uint64 + // The max time we will wait for a witness to be generated before giving up. + WitnessGenTimeout uint64 // The Chain ID of the L2 chain. L2ChainID uint64 // The maximum amount of time we will spend waiting for a proof before giving up and trying again. @@ -88,10 +93,6 @@ type CLIConfig struct { OPSuccinctServerUrl string // The maximum proofs that can be requested from the server concurrently. MaxConcurrentProofRequests uint64 - // The batch inbox on L1 to read batches from. Note that this is ignored if L2 Chain ID is in rollup config. - BatchInbox string - // The batcher address to include transactions from. Note that this is ignored if L2 Chain ID is in rollup config. - BatcherAddress string // Mock is a flag to use the mock OP Succinct server. Mock bool } @@ -110,8 +111,8 @@ func (c *CLIConfig) Check() error { return err } - if c.L2OOAddress == "" { - return errors.New("the `L2OutputOracle` address was not provided") + if c.L2OOAddress == "" && c.DGFAddress == "" { + return errors.New("one of the `DisputeGameFactory` or `L2OutputOracle` address must be provided") } return nil @@ -138,6 +139,7 @@ func NewConfig(ctx *cli.Context) *CLIConfig { L1EthRpc: ctx.String(flags.L1EthRpcFlag.Name), RollupRpc: ctx.String(flags.RollupRpcFlag.Name), L2OOAddress: ctx.String(flags.L2OOAddressFlag.Name), + DGFAddress: ctx.String(flags.DGFAddressFlag.Name), PollInterval: ctx.Duration(flags.PollIntervalFlag.Name), TxMgrConfig: txmgr.ReadCLIConfig(ctx), BeaconRpc: ctx.String(flags.BeaconRpcFlag.Name), @@ -155,12 +157,11 @@ func NewConfig(ctx *cli.Context) *CLIConfig { UseCachedDb: ctx.Bool(flags.UseCachedDbFlag.Name), SlackToken: ctx.String(flags.SlackTokenFlag.Name), MaxBlockRangePerSpanProof: ctx.Uint64(flags.MaxBlockRangePerSpanProofFlag.Name), + MaxConcurrentWitnessGen: ctx.Uint64(flags.MaxConcurrentWitnessGenFlag.Name), + WitnessGenTimeout: ctx.Uint64(flags.WitnessGenTimeoutFlag.Name), ProofTimeout: ctx.Uint64(flags.ProofTimeoutFlag.Name), - TxCacheOutDir: ctx.String(flags.TxCacheOutDirFlag.Name), OPSuccinctServerUrl: ctx.String(flags.OPSuccinctServerUrlFlag.Name), MaxConcurrentProofRequests: ctx.Uint64(flags.MaxConcurrentProofRequestsFlag.Name), - BatchInbox: ctx.String(flags.BatchInboxFlag.Name), - BatcherAddress: ctx.String(flags.BatcherAddressFlag.Name), Mock: ctx.Bool(flags.MockFlag.Name), } } diff --git a/proposer/op/proposer/db/db.go b/proposer/op/proposer/db/db.go index 2289a398..1e3c22f1 100644 --- a/proposer/op/proposer/db/db.go +++ b/proposer/op/proposer/db/db.go @@ -38,7 +38,7 @@ func InitDB(dbPath string, useCachedDb bool) (*ProofDB, error) { } // Use the TL;DR SQLite settings from https://kerkour.com/sqlite-for-servers. - connectionUrl := fmt.Sprintf("file:%s?_fk=1&journal_mode=WAL&synchronous=normal&cache_size=100000000&busy_timeout=15000&_txlock=immediate", dbPath) + connectionUrl := fmt.Sprintf("file:%s?_fk=1&journal_mode=WAL&synchronous=normal&cache_size=100000000&busy_timeout=30000&_txlock=immediate", dbPath) writeDrv, err := sql.Open("sqlite3", connectionUrl) if err != nil { @@ -48,7 +48,7 @@ func InitDB(dbPath string, useCachedDb bool) (*ProofDB, error) { // The write lock only allows one connection to the DB at a time. writeDb.SetMaxOpenConns(1) - writeDb.SetConnMaxLifetime(time.Hour) + writeDb.SetConnMaxLifetime(10 * time.Minute) readDrv, err := sql.Open("sqlite3", connectionUrl) if err != nil { @@ -56,7 +56,7 @@ func InitDB(dbPath string, useCachedDb bool) (*ProofDB, error) { } readDb := readDrv.DB() readDb.SetMaxOpenConns(max(4, runtime.NumCPU()/4)) - readDb.SetConnMaxLifetime(time.Hour) + readDb.SetConnMaxLifetime(10 * time.Minute) readClient := ent.NewClient(ent.Driver(readDrv)) writeClient := ent.NewClient(ent.Driver(writeDrv)) @@ -256,47 +256,6 @@ func (db *ProofDB) GetLatestEndBlock() (uint64, error) { return uint64(maxEnd.EndBlock), nil } -// When restarting the L2OutputSubmitter, some proofs may have been left in a "requested" state without a prover request ID on the server. Until we -// implement a mechanism for querying the status of the witness generation, we need to time out these proofs after a period of time so they can be requested. -func (db *ProofDB) GetWitnessGenerationTimeoutProofsOnServer() ([]*ent.ProofRequest, error) { - currentTime := time.Now().Unix() - twentyMinutesAgo := currentTime - 20*60 - - proofs, err := db.readClient.ProofRequest.Query(). - Where( - proofrequest.StatusEQ(proofrequest.StatusWITNESSGEN), - proofrequest.ProverRequestIDIsNil(), - proofrequest.LastUpdatedTimeLT(uint64(twentyMinutesAgo)), - ). - All(context.Background()) - - if err != nil { - return nil, fmt.Errorf("failed to query witness generation timeout proofs: %w", err) - } - - return proofs, nil -} - -// If a proof failed to be sent to the prover network, it's status will be set to FAILED, but the prover request ID will be empty. -// This function returns all such proofs. -func (db *ProofDB) GetProofsFailedOnServer() ([]*ent.ProofRequest, error) { - proofs, err := db.readClient.ProofRequest.Query(). - Where( - proofrequest.StatusEQ(proofrequest.StatusFAILED), - proofrequest.ProverRequestIDEQ(""), - ). - All(context.Background()) - - if err != nil { - if ent.IsNotFound(err) { - return nil, nil - } - return nil, fmt.Errorf("failed to query failed proof: %w", err) - } - - return proofs, nil -} - // GetAllProofsWithStatus returns all proofs with the given status. func (db *ProofDB) GetAllProofsWithStatus(status proofrequest.Status) ([]*ent.ProofRequest, error) { proofs, err := db.readClient.ProofRequest.Query(). diff --git a/proposer/op/proposer/db/ent/migrate/schema.go b/proposer/op/proposer/db/ent/migrate/schema.go index 20062a6f..f4d05b92 100644 --- a/proposer/op/proposer/db/ent/migrate/schema.go +++ b/proposer/op/proposer/db/ent/migrate/schema.go @@ -3,6 +3,7 @@ package migrate import ( + "entgo.io/ent/dialect/entsql" "entgo.io/ent/dialect/sql/schema" "entgo.io/ent/schema/field" ) @@ -36,4 +37,8 @@ var ( ) func init() { + ProofRequestsTable.Annotation = &entsql.Annotation{ + Table: "proof_requests", + Options: "STRICT", + } } diff --git a/proposer/op/proposer/driver.go b/proposer/op/proposer/driver.go index 6d5c05cf..383c8f41 100644 --- a/proposer/op/proposer/driver.go +++ b/proposer/op/proposer/driver.go @@ -91,6 +91,8 @@ type L2OutputSubmitter struct { l2ooContract L2OOContract l2ooABI *abi.ABI + dgfABI *abi.ABI + db db.ProofDB } @@ -129,7 +131,13 @@ func newL2OOSubmitter(ctx context.Context, cancel context.CancelFunc, setup Driv } log.Info("Connected to L2OutputOracle", "address", setup.Cfg.L2OutputOracleAddr, "version", version) - parsed, err := opsuccinctbindings.OPSuccinctL2OutputOracleMetaData.GetAbi() + l2ooAbiParsed, err := opsuccinctbindings.OPSuccinctL2OutputOracleMetaData.GetAbi() + if err != nil { + cancel() + return nil, err + } + + dfgAbiParsed, err := opsuccinctbindings.OPSuccinctDisputeGameFactoryMetaData.GetAbi() if err != nil { cancel() return nil, err @@ -148,8 +156,10 @@ func newL2OOSubmitter(ctx context.Context, cancel context.CancelFunc, setup Driv cancel: cancel, l2ooContract: l2ooContract, - l2ooABI: parsed, - db: *db, + l2ooABI: l2ooAbiParsed, + dgfABI: dfgAbiParsed, + + db: *db, }, nil } @@ -486,6 +496,15 @@ func proposeL2OutputTxData(abi *abi.ABI, output *eth.OutputResponse, proof []byt proof) } +func (l *L2OutputSubmitter) ProposeL2OutputDGFTxData(output *eth.OutputResponse, proof []byte, l1BlockNum uint64) ([]byte, error) { + return l.dgfABI.Pack( + "create", + output.OutputRoot, + new(big.Int).SetUint64(output.BlockRef.Number), + new(big.Int).SetUint64(l1BlockNum), + proof) +} + func (l *L2OutputSubmitter) CheckpointBlockHashTxData(blockNumber *big.Int) ([]byte, error) { return l.l2ooABI.Pack("checkpointBlockHash", blockNumber) } @@ -526,7 +545,19 @@ func (l *L2OutputSubmitter) sendTransaction(ctx context.Context, output *eth.Out l.Log.Info("Proposing output root", "output", output.OutputRoot, "block", output.BlockRef) var receipt *types.Receipt if l.Cfg.DisputeGameFactoryAddr != nil { - return errors.New("not implemented") + data, err := l.ProposeL2OutputDGFTxData(output, proof, l1BlockNum) + if err != nil { + return err + } + // TODO: This currently blocks the loop while it waits for the transaction to be confirmed. Up to 3 minutes. + receipt, err = l.Txmgr.Send(ctx, txmgr.TxCandidate{ + TxData: data, + To: l.Cfg.DisputeGameFactoryAddr, + GasLimit: 0, + }) + if err != nil { + return err + } } else { data, err := l.ProposeL2OutputTxData(output, proof, l1BlockNum) if err != nil { @@ -551,32 +582,6 @@ func (l *L2OutputSubmitter) sendTransaction(ctx context.Context, output *eth.Out return nil } -// sendCheckpointTransaction sends a transaction to checkpoint the blockhash corresponding to `blockNumber` on the L2OO contract. -func (l *L2OutputSubmitter) sendCheckpointTransaction(ctx context.Context, blockNumber *big.Int) error { - var receipt *types.Receipt - data, err := l.CheckpointBlockHashTxData(blockNumber) - if err != nil { - return err - } - // TODO: This currently blocks the loop while it waits for the transaction to be confirmed. Up to 3 minutes. - receipt, err = l.Txmgr.Send(ctx, txmgr.TxCandidate{ - TxData: data, - To: l.Cfg.L2OutputOracleAddr, - GasLimit: 0, - }) - if err != nil { - return err - } - - if receipt.Status == types.ReceiptStatusFailed { - l.Log.Error("checkpoint blockhash tx successfully published but reverted", "tx_hash", receipt.TxHash) - } else { - l.Log.Info("checkpoint blockhash tx successfully published", - "tx_hash", receipt.TxHash) - } - return nil -} - // loop is responsible for creating & submitting the next outputs // TODO: Look into adding a transaction cache so the loop isn't waiting for the transaction to confirm. This sometimes takes up to 30s. func (l *L2OutputSubmitter) loop() { @@ -639,39 +644,48 @@ func (l *L2OutputSubmitter) loopL2OO(ctx context.Context) { continue } - // 2) Check the statuses of all requested proofs. + // 2) Check the statuses of PROVING requests. // If it's successfully returned, we validate that we have it on disk and set status = "COMPLETE". // If it fails or times out, we set status = "FAILED" (and, if it's a span proof, split the request in half to try again). - l.Log.Info("Stage 2: Processing Pending Proofs...") - err = l.ProcessPendingProofs() + l.Log.Info("Stage 2: Processing PROVING requests...") + err = l.ProcessProvingRequests() + if err != nil { + l.Log.Error("failed to update PROVING requests", "err", err) + continue + } + + // 3) Check the statuses of WITNESSGEN requests. + // If the witness generation request has been in the WITNESSGEN state for longer than the timeout, set status to FAILED and retry. + l.Log.Info("Stage 3: Processing WITNESSGEN requests...") + err = l.ProcessWitnessgenRequests() if err != nil { - l.Log.Error("failed to update requested proofs", "err", err) + l.Log.Error("failed to update WITNESSGEN requests", "err", err) continue } - // 3) Determine if there is a continguous chain of span proofs starting from the latest block on the L2OO contract. + // 4) Determine if there is a continguous chain of span proofs starting from the latest block on the L2OO contract. // If there is, queue an aggregate proof for all of the span proofs. - l.Log.Info("Stage 3: Deriving Agg Proofs...") + l.Log.Info("Stage 4: Deriving Agg Proofs...") err = l.DeriveAggProofs(ctx) if err != nil { l.Log.Error("failed to generate pending agg proofs", "err", err) continue } - // 4) Request all unrequested proofs from the prover network. + // 5) Request all unrequested proofs from the prover network. // Any DB entry with status = "UNREQ" means it's queued up and ready. // We request all of these (both span and agg) from the prover network. // For agg proofs, we also checkpoint the blockhash in advance. - l.Log.Info("Stage 4: Requesting Queued Proofs...") + l.Log.Info("Stage 5: Requesting Queued Proofs...") err = l.RequestQueuedProofs(ctx) if err != nil { l.Log.Error("failed to request unrequested proofs", "err", err) continue } - // 5) Submit agg proofs on chain. + // 6) Submit agg proofs on chain. // If we have a completed agg proof waiting in the DB, we submit them on chain. - l.Log.Info("Stage 5: Submitting Agg Proofs...") + l.Log.Info("Stage 6: Submitting Agg Proofs...") err = l.SubmitAggProofs(ctx) if err != nil { l.Log.Error("failed to submit agg proofs", "err", err) @@ -735,9 +749,43 @@ func (l *L2OutputSubmitter) checkpointBlockHash(ctx context.Context) (uint64, co blockHash := header.Hash() blockNumber := header.Number - err = l.sendCheckpointTransaction(cCtx, blockNumber) + // Check if the block hash has ALREADY been checkpointed on the L2OO contract. + // If it has, we can skip the checkpointing step. + contract, err := opsuccinctbindings.NewOPSuccinctL2OutputOracleCaller(*l.Cfg.L2OutputOracleAddr, l.L1Client) + if err != nil { + return 0, common.Hash{}, err + } + maybeBlockHash, err := contract.HistoricBlockHashes(&bind.CallOpts{Context: cCtx}, blockNumber) if err != nil { return 0, common.Hash{}, err } + if maybeBlockHash != (common.Hash{}) { + l.Log.Info("Block hash already checkpointed on L2OO contract", "block_number", blockNumber, "block_hash", blockHash) + return blockNumber.Uint64(), blockHash, nil + } + + // If not, send a transaction to checkpoint the blockhash on the L2OO contract. + var receipt *types.Receipt + data, err := l.CheckpointBlockHashTxData(blockNumber) + if err != nil { + return 0, common.Hash{}, err + } + + // TODO: This currently blocks the loop while it waits for the transaction to be confirmed. Up to 3 minutes. + receipt, err = l.Txmgr.Send(ctx, txmgr.TxCandidate{ + TxData: data, + To: l.Cfg.L2OutputOracleAddr, + GasLimit: 0, + }) + if err != nil { + return 0, common.Hash{}, err + } + + if receipt.Status == types.ReceiptStatusFailed { + l.Log.Error("checkpoint blockhash tx successfully published but reverted", "tx_hash", receipt.TxHash) + } else { + l.Log.Info("checkpoint blockhash tx successfully published", + "tx_hash", receipt.TxHash) + } return blockNumber.Uint64(), blockHash, nil } diff --git a/proposer/op/proposer/flags/flags.go b/proposer/op/proposer/flags/flags.go index 8e3d26f9..fe73b11e 100644 --- a/proposer/op/proposer/flags/flags.go +++ b/proposer/op/proposer/flags/flags.go @@ -44,6 +44,11 @@ var ( Usage: "Address of the L2OutputOracle contract", EnvVars: prefixEnvVars("L2OO_ADDRESS"), } + DGFAddressFlag = &cli.StringFlag{ + Name: "dgf-address", + Usage: "Address of the DisputeGameFactory contract", + EnvVars: prefixEnvVars("DGF_ADDRESS"), + } PollIntervalFlag = &cli.DurationFlag{ Name: "poll-interval", Usage: "How frequently to poll L2 for new blocks (legacy L2OO)", @@ -91,9 +96,23 @@ var ( Value: 50, EnvVars: prefixEnvVars("MAX_BLOCK_RANGE_PER_SPAN_PROOF"), } + // This limit is set to prevent overloading the witness generation server. Until Kona improves their native I/O API (https://github.com/anton-rs/kona/issues/553) + // the maximum number of concurrent witness generation requests is roughly num_cpu / 2. Set it to 5 for now to be safe. + MaxConcurrentWitnessGenFlag = &cli.Uint64Flag{ + Name: "max-concurrent-witness-gen", + Usage: "Maximum number of concurrent witness generation processes", + Value: 5, + EnvVars: prefixEnvVars("MAX_CONCURRENT_WITNESS_GEN"), + } + WitnessGenTimeoutFlag = &cli.Uint64Flag{ + Name: "witness-gen-timeout", + Usage: "Maximum time in seconds to spend generating a witness before giving up", + Value: 20 * 60, + EnvVars: prefixEnvVars("WITNESS_GEN_TIMEOUT"), + } ProofTimeoutFlag = &cli.Uint64Flag{ - Name: "proof-timeout", - Usage: "Maximum time in seconds to spend generating a proof before giving up", + Name: "proof-timeout", + Usage: "Maximum time in seconds to spend generating a proof before giving up", // If a proof takes more than 4 hours, assume the cluster failed to set it to failed state. Value: 14400, EnvVars: prefixEnvVars("MAX_PROOF_TIME"), @@ -110,22 +129,6 @@ var ( Value: 20, EnvVars: prefixEnvVars("MAX_CONCURRENT_PROOF_REQUESTS"), } - TxCacheOutDirFlag = &cli.StringFlag{ - Name: "tx-cache-out-dir", - Usage: "Cache directory for the found transactions to determine span batch boundaries", - Value: "/tmp/batch_decoder/transactions_cache", - EnvVars: prefixEnvVars("TX_CACHE_OUT_DIR"), - } - BatchInboxFlag = &cli.StringFlag{ - Name: "batch-inbox", - Usage: "Batch Inbox Address", - EnvVars: prefixEnvVars("BATCH_INBOX"), - } - BatcherAddressFlag = &cli.StringFlag{ - Name: "batcher-address", - Usage: "Batch Sender Address", - EnvVars: prefixEnvVars("BATCHER_ADDRESS"), - } MockFlag = &cli.BoolFlag{ Name: "mock", Usage: "Use the mock OP Succinct server", @@ -145,6 +148,7 @@ var requiredFlags = []cli.Flag{ var optionalFlags = []cli.Flag{ L2OOAddressFlag, + DGFAddressFlag, PollIntervalFlag, AllowNonFinalizedFlag, L2OutputHDPathFlag, @@ -154,13 +158,12 @@ var optionalFlags = []cli.Flag{ UseCachedDbFlag, SlackTokenFlag, MaxBlockRangePerSpanProofFlag, - TxCacheOutDirFlag, + MaxConcurrentWitnessGenFlag, OPSuccinctServerUrlFlag, ProofTimeoutFlag, MaxConcurrentProofRequestsFlag, - BatchInboxFlag, - BatcherAddressFlag, MockFlag, + WitnessGenTimeoutFlag, } func init() { diff --git a/proposer/op/proposer/prove.go b/proposer/op/proposer/prove.go index 41cc2daf..c3fc7c9a 100644 --- a/proposer/op/proposer/prove.go +++ b/proposer/op/proposer/prove.go @@ -17,14 +17,9 @@ import ( ) const PROOF_STATUS_TIMEOUT = 30 * time.Second -const WITNESS_GEN_TIMEOUT = 20 * time.Minute -// This limit is set to prevent overloading the witness generation server. Until Kona improves their native I/O API (https://github.com/anton-rs/kona/issues/553) -// the maximum number of concurrent witness generation requests is roughly num_cpu / 2. Set it to 5 for now to be safe. -const MAX_CONCURRENT_WITNESS_GEN = 5 - -// Process all of the pending proofs. -func (l *L2OutputSubmitter) ProcessPendingProofs() error { +// Process all of requests in PROVING state. +func (l *L2OutputSubmitter) ProcessProvingRequests() error { // Get all proof requests that are currently in the PROVING state. reqs, err := l.db.GetAllProofsWithStatus(proofrequest.StatusPROVING) if err != nil { @@ -39,7 +34,7 @@ func (l *L2OutputSubmitter) ProcessPendingProofs() error { l.Metr.RecordError("get_proof_status", 1) return err } - if proofStatus.Status == SP1FulfillmentStatusFulfilled { + if proofStatus.FulfillmentStatus == SP1FulfillmentStatusFulfilled { // Update the proof in the DB and update status to COMPLETE. l.Log.Info("Fulfilled Proof", "id", req.ProverRequestID) err = l.db.AddFulfilledProof(req.ID, proofStatus.Proof) @@ -50,7 +45,7 @@ func (l *L2OutputSubmitter) ProcessPendingProofs() error { continue } - if proofStatus.Status == SP1FulfillmentStatusUnfulfillable { + if proofStatus.FulfillmentStatus == SP1FulfillmentStatusUnfulfillable { // Record the failure reason. l.Log.Info("Proof is unfulfillable", "id", req.ProverRequestID) l.Metr.RecordProveFailure("unfulfillable") @@ -65,12 +60,29 @@ func (l *L2OutputSubmitter) ProcessPendingProofs() error { return nil } +// Process all of requests in WITNESSGEN state. +func (l *L2OutputSubmitter) ProcessWitnessgenRequests() error { + // Get all proof requests that are currently in the WITNESSGEN state. + reqs, err := l.db.GetAllProofsWithStatus(proofrequest.StatusWITNESSGEN) + if err != nil { + return err + } + for _, req := range reqs { + // If the request has been in the WITNESSGEN state for longer than the timeout, set status to FAILED. + // This is a catch-all in case the witness generation state update failed. + if req.LastUpdatedTime+uint64(l.Cfg.WitnessGenTimeout) < uint64(time.Now().Unix()) { + // Retry the request if it timed out. + l.RetryRequest(req, ProofStatusResponse{}) + } + } + + return nil +} + // Retry a proof request. Sets the status of a proof to FAILED and retries the proof based on the optional proof status response. // If an error response is received: // - Range Proof: Split in two if the block range is > 1. Retry the same request if range is 1 block. // - Agg Proof: Retry the same request. -// TODO: Once the reserved strategy adds an execution error, update this to retry only when there's an execution error returned. -// TODO: With a new allocator, there will not be OOM issues. func (l *L2OutputSubmitter) RetryRequest(req *ent.ProofRequest, status ProofStatusResponse) error { err := l.db.UpdateProofStatus(req.ID, proofrequest.StatusFAILED) if err != nil { @@ -78,38 +90,29 @@ func (l *L2OutputSubmitter) RetryRequest(req *ent.ProofRequest, status ProofStat return err } - if req.Type == proofrequest.TypeAGG { - l.Log.Info("AGG proof failed, retrying", "id", req.ID) - // Retry same request if range is 1 block. - err = l.db.NewEntry(req.Type, req.StartBlock, req.EndBlock) + // If there's an execution error AND the request is a SPAN proof AND the block range is > 1, split the request into two requests. + // This is likely caused by an SP1 OOM due to a large block range with many transactions. + // TODO: This solution can be removed once the embedded allocator is used, because then the programs + // will never OOM. + if req.Type == proofrequest.TypeSPAN && status.ExecutionStatus == SP1ExecutionStatusUnexecutable && req.EndBlock-req.StartBlock > 1 { + // Split the request into two requests. + midBlock := (req.StartBlock + req.EndBlock) / 2 + err = l.db.NewEntry(req.Type, req.StartBlock, midBlock) if err != nil { - l.Log.Error("failed to retry proof request", "err", err) + l.Log.Error("failed to retry first half of proof request", "err", err) + return err + } + err = l.db.NewEntry(req.Type, midBlock, req.EndBlock) + if err != nil { + l.Log.Error("failed to retry second half of proof request", "err", err) return err } } else { - l.Log.Info("SPAN proof failed, retrying", "id", req.ID) - // Split the proof in two if range is > 1, otherwise retry same request. - if (req.EndBlock-req.StartBlock) > 1 { - mid := (req.StartBlock + req.EndBlock) / 2 - // Create two new proof requests, one from [start, mid] and one from [mid, end]. The requests - // are consecutive and overlapping. - err = l.db.NewEntry(req.Type, req.StartBlock, mid) - if err != nil { - l.Log.Error("failed to add first proof request", "err", err) - return err - } - err = l.db.NewEntry(req.Type, mid, req.EndBlock) - if err != nil { - l.Log.Error("failed to add second proof request", "err", err) - return err - } - } else { - // Retry same request if range is 1 block. - err = l.db.NewEntry(req.Type, req.StartBlock, req.EndBlock) - if err != nil { - l.Log.Error("failed to retry proof request", "err", err) - return err - } + // Retry the same request. + err = l.db.NewEntry(req.Type, req.StartBlock, req.EndBlock) + if err != nil { + l.Log.Error("failed to retry proof request", "err", err) + return err } } @@ -154,7 +157,7 @@ func (l *L2OutputSubmitter) RequestQueuedProofs(ctx context.Context) error { // The number of witness generation requests is capped at MAX_CONCURRENT_WITNESS_GEN. This prevents overloading the machine with processes spawned by the witness generation server. // Once https://github.com/anton-rs/kona/issues/553 is fixed, we may be able to remove this check. - if witnessGenProofs >= MAX_CONCURRENT_WITNESS_GEN { + if witnessGenProofs >= int(l.Cfg.MaxConcurrentWitnessGen) { l.Log.Info("max witness generation reached, waiting for next cycle") return nil } @@ -293,7 +296,9 @@ func (l *L2OutputSubmitter) requestRealProof(proofType proofrequest.Type, jsonBo if err := json.Unmarshal(resp, &response); err != nil { return nil, fmt.Errorf("error decoding JSON response: %w", err) } - l.Log.Info("successfully submitted proof", "proofID", response.ProofID) + // Format the proof ID as a hex string. + proofIdHex := fmt.Sprintf("%x", response.ProofID) + l.Log.Info("successfully submitted proof", "proofID", proofIdHex) return response.ProofID, nil } @@ -321,20 +326,34 @@ func (l *L2OutputSubmitter) makeProofRequest(proofType proofrequest.Type, jsonBo } req.Header.Set("Content-Type", "application/json") - client := &http.Client{Timeout: WITNESS_GEN_TIMEOUT} + timeout := time.Duration(l.Cfg.WitnessGenTimeout) * time.Second + client := &http.Client{Timeout: timeout} resp, err := client.Do(req) if err != nil { if netErr, ok := err.(net.Error); ok && netErr.Timeout() { l.Log.Error("Witness generation request timed out", "err", err) l.Metr.RecordWitnessGenFailure("Timeout") - return nil, fmt.Errorf("request timed out after %s: %w", WITNESS_GEN_TIMEOUT, err) + return nil, fmt.Errorf("request timed out after %s: %w", timeout, err) } + l.Log.Error("Witness generation request failed", "err", err) return nil, fmt.Errorf("failed to send request: %w", err) } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - l.Log.Error("Witness generation request failed", "status", resp.StatusCode, "body", resp.Body) + body, _ := io.ReadAll(resp.Body) + var errResp struct { + Error string `json:"error"` + } + if err := json.Unmarshal(body, &errResp); err == nil { + l.Log.Error("Witness generation request failed", + "status", resp.StatusCode, + "error", errResp.Error) + } else { + l.Log.Error("Witness generation request failed", + "status", resp.StatusCode, + "body", string(body)) + } l.Metr.RecordWitnessGenFailure("Failed") return nil, fmt.Errorf("received non-200 status code: %d", resp.StatusCode) } @@ -376,6 +395,19 @@ func (l *L2OutputSubmitter) GetProofStatus(proofId string) (ProofStatusResponse, // If the response status code is not 200, return an error. if resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + var errResp struct { + Error string `json:"error"` + } + if err := json.Unmarshal(body, &errResp); err == nil { + l.Log.Error("Failed to get proof status", + "status", resp.StatusCode, + "error", errResp.Error) + } else { + l.Log.Error("Failed to get unmarshal proof status error message", + "status", resp.StatusCode, + "body", body) + } return ProofStatusResponse{}, fmt.Errorf("received non-200 status code: %d", resp.StatusCode) } diff --git a/proposer/op/proposer/range.go b/proposer/op/proposer/range.go index db98b304..d3934949 100644 --- a/proposer/op/proposer/range.go +++ b/proposer/op/proposer/range.go @@ -49,7 +49,7 @@ func (l *L2OutputSubmitter) GetL1HeadForL2Block(ctx context.Context, rollupClien return 0, fmt.Errorf("could not find an L1 block with an L2 safe head greater than the L2 end block") } -func (l *L2OutputSubmitter) isSafeDBActivated(ctx context.Context, rollupClient *sources.RollupClient) (bool, error) { +func (l *L2OutputSubmitter) IsSafeDBActivated(ctx context.Context, rollupClient *sources.RollupClient) (bool, error) { // Get the sync status of the rollup node. status, err := rollupClient.SyncStatus(ctx) if err != nil { @@ -185,25 +185,7 @@ func (l *L2OutputSubmitter) GetRangeProofBoundaries(ctx context.Context) error { // Note: Originally, this used the L1 finalized block. However, to satisfy the new API, we now use the L2 finalized block. newL2EndBlock := status.FinalizedL2.Number - // Check if the safeDB is activated on the L2 node. If it is, we use the safeHead based range - // splitting algorithm. Otherwise, we use the simple range splitting algorithm. - safeDBActivated, err := l.isSafeDBActivated(ctx, rollupClient) - if err != nil { - l.Log.Warn("safeDB is not activated. Using simple range splitting algorithm.", "err", err) - } - - var spans []Span - // If the safeDB is activated, we use the safeHead based range splitting algorithm. - // Otherwise, we use the simple range splitting algorithm. - if safeDBActivated { - spans, err = l.SplitRangeBasedOnSafeHeads(ctx, newL2StartBlock, newL2EndBlock) - if err != nil { - return fmt.Errorf("failed to split range based on safe heads: %w", err) - } - } else { - spans = l.SplitRangeBasic(newL2StartBlock, newL2EndBlock) - } - + spans := l.SplitRangeBasic(newL2StartBlock, newL2EndBlock) // Add each span to the DB. If there are no spans, we will not create any proofs. for _, span := range spans { diff --git a/proposer/op/proposer/rpc_types.go b/proposer/op/proposer/rpc_types.go index f968b169..f44920d0 100644 --- a/proposer/op/proposer/rpc_types.go +++ b/proposer/op/proposer/rpc_types.go @@ -53,7 +53,7 @@ func (d UnclaimDescription) String() string { } } -// SP1ProofStatus represents the status of a proof in the SP1 network. +// SP1FulfillmentStatus represents the fulfillment status of a proof in the SP1 network. type SP1FulfillmentStatus int const ( @@ -64,8 +64,20 @@ const ( SP1FulfillmentStatusUnfulfillable ) +// SP1ExecutionStatus represents the execution status of a proof in the SP1 network. +type SP1ExecutionStatus int + +const ( + SP1ExecutionStatusUnspecified SP1ExecutionStatus = iota + SP1ExecutionStatusUnexecuted + SP1ExecutionStatusExecuted + SP1ExecutionStatusUnexecutable +) + // ProofStatusResponse is the response type for the `/status/:proof_id` RPC from the op-succinct-server. type ProofStatusResponse struct { - Status SP1FulfillmentStatus `json:"status"` - Proof []byte `json:"proof"` + FulfillmentStatus SP1FulfillmentStatus `json:"fulfillment_status"` + ExecutionStatus SP1ExecutionStatus `json:"execution_status"` + Proof []byte `json:"proof"` } + diff --git a/proposer/op/proposer/service.go b/proposer/op/proposer/service.go index bf4cbba0..ff6840ab 100644 --- a/proposer/op/proposer/service.go +++ b/proposer/op/proposer/service.go @@ -57,14 +57,13 @@ type ProposerConfig struct { SlackToken string BeaconRpc string RollupRpc string - TxCacheOutDir string MaxBlockRangePerSpanProof uint64 + MaxConcurrentWitnessGen uint64 + WitnessGenTimeout uint64 L2ChainID uint64 ProofTimeout uint64 OPSuccinctServerUrl string MaxConcurrentProofRequests uint64 - BatchInbox common.Address - BatcherAddress common.Address Mock bool } @@ -120,17 +119,17 @@ func (ps *ProposerService) initFromCLIConfig(ctx context.Context, version string ps.SlackToken = cfg.SlackToken ps.BeaconRpc = cfg.BeaconRpc ps.RollupRpc = cfg.RollupRpc - ps.TxCacheOutDir = cfg.TxCacheOutDir ps.MaxBlockRangePerSpanProof = cfg.MaxBlockRangePerSpanProof + ps.MaxConcurrentWitnessGen = cfg.MaxConcurrentWitnessGen + ps.WitnessGenTimeout = cfg.WitnessGenTimeout ps.OPSuccinctServerUrl = cfg.OPSuccinctServerUrl ps.ProofTimeout = cfg.ProofTimeout ps.L2ChainID = cfg.L2ChainID ps.MaxConcurrentProofRequests = cfg.MaxConcurrentProofRequests - ps.BatchInbox = common.HexToAddress(cfg.BatchInbox) - ps.BatcherAddress = common.HexToAddress(cfg.BatcherAddress) ps.Mock = cfg.Mock ps.initL2ooAddress(cfg) + ps.initDGF(cfg) if err := ps.initRPCClients(ctx, cfg); err != nil { return err @@ -248,6 +247,15 @@ func (ps *ProposerService) initL2ooAddress(cfg *CLIConfig) { ps.L2OutputOracleAddr = &l2ooAddress } +func (ps *ProposerService) initDGF(cfg *CLIConfig) { + dgfAddress, err := opservice.ParseAddress(cfg.DGFAddress) + if err != nil { + // Return no error & set no DGF related configuration fields. + return + } + ps.DisputeGameFactoryAddr = &dgfAddress +} + func (ps *ProposerService) initDriver() error { driver, err := NewL2OutputSubmitter(DriverSetup{ Log: ps.Log, diff --git a/proposer/op/proposer/utils/utils.go b/proposer/op/proposer/utils/utils.go index 29018ce0..fc898e52 100644 --- a/proposer/op/proposer/utils/utils.go +++ b/proposer/op/proposer/utils/utils.go @@ -183,7 +183,7 @@ func convertBaseFeeParams(rawConfig map[string]interface{}, key string) { } } -// GetAllSpanBatchesInBlockRange fetches span batches within a range of L2 blocks. +// GetAllSpanBatchesInL2BlockRange fetches span batches within a range of L2 blocks. func GetAllSpanBatchesInL2BlockRange(config BatchDecoderConfig) ([]SpanBatchRange, error) { rollupCfg, err := setupBatchDecoderConfig(&config) if err != nil { diff --git a/proposer/succinct/Cargo.toml b/proposer/succinct/Cargo.toml index b9421cd2..62627136 100644 --- a/proposer/succinct/Cargo.toml +++ b/proposer/succinct/Cargo.toml @@ -29,7 +29,7 @@ dotenv.workspace = true op-succinct-client-utils.workspace = true serde = { workspace = true } serde_json.workspace = true - +csv.workspace = true # server axum = "0.7.4" bincode.workspace = true diff --git a/proposer/succinct/Dockerfile b/proposer/succinct/Dockerfile index e045e1de..95099904 100644 --- a/proposer/succinct/Dockerfile +++ b/proposer/succinct/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.4 # Build stage -FROM ubuntu:22.04 AS builder +FROM ubuntu:24.04 AS builder WORKDIR /build @@ -17,6 +17,8 @@ RUN apt-get update && apt-get install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH=/root/.cargo/bin:$PATH +RUN rustup install nightly +RUN rustup default nightly # Verify Rust installation RUN rustc --version && cargo --version @@ -28,7 +30,6 @@ RUN curl -L https://sp1.succinct.xyz | bash && \ # Copy only what's needed for the build COPY Cargo.toml Cargo.lock ./ -COPY scripts/prove ./scripts/prove COPY proposer/succinct ./proposer/succinct COPY scripts/witnessgen ./scripts/witnessgen COPY elf ./elf @@ -41,12 +42,11 @@ RUN --mount=type=ssh \ --mount=type=cache,target=/build/target \ cargo build --bin server --release && \ cp target/release/server /build/server && \ - cp target/release-client-lto/fault-proof /build/fault_proof && \ cp target/release-client-lto/range /build/range && \ cp target/native_host_runner/release/native_host_runner /build/native_host_runner # Final stage -FROM ubuntu:22.04 +FROM ubuntu:24.04 WORKDIR /app @@ -62,6 +62,8 @@ RUN apt-get update && apt-get install -y \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH=/root/.cargo/bin:$PATH +RUN rustup install nightly +RUN rustup default nightly # Verify Rust installation RUN rustc --version && cargo --version @@ -73,7 +75,6 @@ RUN curl -L https://sp1.succinct.xyz | bash && \ # Copy only the built binaries from builder COPY --from=builder /build/server /usr/local/bin/server -COPY --from=builder /build/fault_proof /usr/local/bin/fault_proof COPY --from=builder /build/range /usr/local/bin/range COPY --from=builder /build/native_host_runner /usr/local/bin/native_host_runner diff --git a/proposer/succinct/bin/server.rs b/proposer/succinct/bin/server.rs index daaa66d2..a2b18684 100644 --- a/proposer/succinct/bin/server.rs +++ b/proposer/succinct/bin/server.rs @@ -7,7 +7,7 @@ use axum::{ routing::{get, post}, Json, Router, }; -use log::info; +use log::{error, info}; use op_succinct_client_utils::{ boot::{hash_rollup_config, BootInfoStruct}, types::u32_to_u8, @@ -15,34 +15,40 @@ use op_succinct_client_utils::{ use op_succinct_host_utils::{ fetcher::{CacheMode, OPSuccinctDataFetcher, RunContext}, get_agg_proof_stdin, get_proof_stdin, + stats::ExecutionStats, witnessgen::{WitnessGenExecutor, WITNESSGEN_TIMEOUT}, L2OutputOracle, ProgramType, }; use op_succinct_proposer::{ - AggProofRequest, ContractConfig, ProofResponse, ProofStatus, SpanProofRequest, + AggProofRequest, ProofResponse, ProofStatus, SpanProofRequest, SuccinctProposerConfig, ValidateConfigRequest, ValidateConfigResponse, }; use sp1_sdk::{ - network_v2::{ - client::NetworkClient, - proto::network::{FulfillmentStatus, FulfillmentStrategy, ProofMode}, + network::{ + proto::network::{ExecutionStatus, FulfillmentStatus}, + FulfillmentStrategy, }, - utils, HashableKey, NetworkProverV2, ProverClient, SP1Proof, SP1ProofWithPublicValues, + utils, HashableKey, Prover, ProverClient, SP1Proof, SP1ProofMode, SP1ProofWithPublicValues, + SP1_CIRCUIT_VERSION, }; -use std::{env, str::FromStr, time::Duration}; +use std::{env, fs, str::FromStr, time::Instant}; use tower_http::limit::RequestBodyLimitLayer; -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); +pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); pub const AGG_ELF: &[u8] = include_bytes!("../../../elf/aggregation-elf"); #[tokio::main] async fn main() -> Result<()> { + // Enable logging. + env::set_var("RUST_LOG", "info"); + + // Set up the SP1 SDK logger. utils::setup_logger(); dotenv::dotenv().ok(); - let prover = ProverClient::new(); - let (range_pk, range_vk) = prover.setup(MULTI_BLOCK_ELF); + let prover = ProverClient::builder().cpu().build(); + let (range_pk, range_vk) = prover.setup(RANGE_ELF); let (agg_pk, agg_vk) = prover.setup(AGG_ELF); let multi_block_vkey_u8 = u32_to_u8(range_vk.vk.hash_u32()); let range_vkey_commitment = B256::from(multi_block_vkey_u8); @@ -54,8 +60,18 @@ async fn main() -> Result<()> { // [`RollupConfig`] is released from `op-alloy`. let rollup_config_hash = hash_rollup_config(fetcher.rollup_config.as_ref().unwrap()); + // Set the proof strategies based on environment variables. Default to reserved to keep existing behavior. + let range_proof_strategy = match env::var("RANGE_PROOF_STRATEGY") { + Ok(strategy) if strategy.to_lowercase() == "hosted" => FulfillmentStrategy::Hosted, + _ => FulfillmentStrategy::Reserved, + }; + let agg_proof_strategy = match env::var("AGG_PROOF_STRATEGY") { + Ok(strategy) if strategy.to_lowercase() == "hosted" => FulfillmentStrategy::Hosted, + _ => FulfillmentStrategy::Reserved, + }; + // Initialize global hashes. - let global_hashes = ContractConfig { + let global_hashes = SuccinctProposerConfig { agg_vkey_hash, range_vkey_commitment, rollup_config_hash, @@ -63,6 +79,8 @@ async fn main() -> Result<()> { range_pk, agg_vk, agg_pk, + range_proof_strategy, + agg_proof_strategy, }; let app = Router::new() @@ -88,7 +106,7 @@ async fn main() -> Result<()> { /// Validate the configuration of the L2 Output Oracle. async fn validate_config( - State(state): State, + State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received validate config request: {:?}", payload); @@ -117,11 +135,17 @@ async fn validate_config( /// Request a proof for a span of blocks. async fn request_span_proof( - State(state): State, + State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received span proof request: {:?}", payload); - let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; + let fetcher = match OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await { + Ok(f) => f, + Err(e) => { + error!("Failed to create data fetcher: {}", e); + return Err(AppError(e)); + } + }; let host_cli = match fetcher .get_host_cli_args( @@ -134,7 +158,7 @@ async fn request_span_proof( { Ok(cli) => cli, Err(e) => { - log::error!("Failed to get host CLI args: {}", e); + error!("Failed to get host CLI args: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to get host CLI args: {}", e @@ -146,63 +170,58 @@ async fn request_span_proof( // Note: Ideally, the server should call out to a separate process that executes the native // host, and return an ID that the client can poll on to check if the proof was submitted. let mut witnessgen_executor = WitnessGenExecutor::new(WITNESSGEN_TIMEOUT, RunContext::Docker); - let res = witnessgen_executor.spawn_witnessgen(&host_cli).await; - if let Err(e) = res { - log::error!("Failed to spawn witness generation: {}", e); + if let Err(e) = witnessgen_executor.spawn_witnessgen(&host_cli).await { + error!("Failed to spawn witness generation: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to spawn witness generation: {}", e ))); } // Log any errors from running the witness generation process. - let res = witnessgen_executor.flush().await; - if let Err(e) = res { - log::error!("Failed to generate witness: {}", e); + if let Err(e) = witnessgen_executor.flush().await { + error!("Failed to generate witness: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to generate witness: {}", e ))); } - let sp1_stdin = get_proof_stdin(&host_cli)?; - - let private_key = env::var("SP1_PRIVATE_KEY")?; - let rpc_url = env::var("PROVER_NETWORK_RPC")?; - let mut prover = NetworkProverV2::new(&private_key, Some(rpc_url.to_string()), false); - // Use the reserved strategy to route to a specific cluster. - prover.with_strategy(FulfillmentStrategy::Reserved); - - // Set simulation to false on range proofs as they're large. - env::set_var("SKIP_SIMULATION", "true"); - let vk_hash = prover - .register_program(&state.range_vk, MULTI_BLOCK_ELF) - .await?; - let res = prover - .request_proof( - &vk_hash, - &sp1_stdin, - ProofMode::Compressed, - 1_000_000_000_000, - None, - ) - .await; - env::set_var("SKIP_SIMULATION", "false"); - - // Check if error, otherwise get proof ID. - let proof_id = match res { - Ok(proof_id) => proof_id, + let sp1_stdin = match get_proof_stdin(&host_cli) { + Ok(stdin) => stdin, Err(e) => { - log::error!("Failed to request proof: {}", e); - return Err(AppError(anyhow::anyhow!("Failed to request proof: {}", e))); + error!("Failed to get proof stdin: {}", e); + return Err(AppError(anyhow::anyhow!( + "Failed to get proof stdin: {}", + e + ))); } }; - Ok((StatusCode::OK, Json(ProofResponse { proof_id }))) + let client = ProverClient::builder().network().build(); + let proof_id = client + .prove(&state.range_pk, &sp1_stdin) + .compressed() + .strategy(state.range_proof_strategy) + .skip_simulation(true) + .cycle_limit(1_000_000_000_000) + .request_async() + .await + .map_err(|e| { + error!("Failed to request proof: {}", e); + AppError(anyhow::anyhow!("Failed to request proof: {}", e)) + })?; + + Ok(( + StatusCode::OK, + Json(ProofResponse { + proof_id: proof_id.to_vec(), + }), + )) } /// Request an aggregation proof for a set of subproofs. async fn request_agg_proof( - State(state): State, + State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received agg proof request"); @@ -222,22 +241,51 @@ async fn request_agg_proof( .map(|proof| proof.proof.clone()) .collect(); - let l1_head_bytes = hex::decode( - payload - .head - .strip_prefix("0x") - .expect("Invalid L1 head, no 0x prefix."), - )?; - let l1_head: [u8; 32] = l1_head_bytes.try_into().unwrap(); + let l1_head_bytes = match payload.head.strip_prefix("0x") { + Some(hex_str) => match hex::decode(hex_str) { + Ok(bytes) => bytes, + Err(e) => { + error!("Failed to decode L1 head hex string: {}", e); + return Err(AppError(anyhow::anyhow!( + "Failed to decode L1 head hex string: {}", + e + ))); + } + }, + None => { + error!("Invalid L1 head format: missing 0x prefix"); + return Err(AppError(anyhow::anyhow!( + "Invalid L1 head format: missing 0x prefix" + ))); + } + }; - let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; - let res = fetcher + let l1_head: [u8; 32] = match l1_head_bytes.clone().try_into() { + Ok(array) => array, + Err(_) => { + error!( + "Invalid L1 head length: expected 32 bytes, got {}", + l1_head_bytes.len() + ); + return Err(AppError(anyhow::anyhow!( + "Invalid L1 head length: expected 32 bytes, got {}", + l1_head_bytes.len() + ))); + } + }; + + let fetcher = match OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await { + Ok(f) => f, + Err(e) => return Err(AppError(anyhow::anyhow!("Failed to create fetcher: {}", e))), + }; + + let headers = match fetcher .get_header_preimages(&boot_infos, l1_head.into()) - .await; - let headers = match res { - Ok(headers) => headers, + .await + { + Ok(h) => h, Err(e) => { - log::error!("Failed to get header preimages: {}", e); + error!("Failed to get header preimages: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to get header preimages: {}", e @@ -245,17 +293,13 @@ async fn request_agg_proof( } }; - let private_key = env::var("SP1_PRIVATE_KEY")?; - let rpc_url = env::var("PROVER_NETWORK_RPC")?; - let mut prover = NetworkProverV2::new(&private_key, Some(rpc_url.to_string()), false); - // Use the reserved strategy to route to a specific cluster. - prover.with_strategy(FulfillmentStrategy::Reserved); + let prover = ProverClient::builder().network().build(); let stdin = match get_agg_proof_stdin(proofs, boot_infos, headers, &state.range_vk, l1_head.into()) { - Ok(stdin) => stdin, + Ok(s) => s, Err(e) => { - log::error!("Failed to get agg proof stdin: {}", e); + error!("Failed to get agg proof stdin: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to get agg proof stdin: {}", e @@ -263,86 +307,128 @@ async fn request_agg_proof( } }; - let res = prover.register_program(&state.agg_vk, AGG_ELF).await; - let vk_hash = match res { - Ok(vk_hash) => vk_hash, - Err(e) => { - log::error!("Failed to register program: {}", e); - return Err(AppError(anyhow::anyhow!( - "Failed to register program: {}", - e - ))); - } - }; - let res = prover - .request_proof( - &vk_hash, - &stdin, - ProofMode::Groth16, - 1_000_000_000_000, - None, - ) - .await; - - // Check if error, otherwise get proof ID. - let proof_id = match res { - Ok(proof_id) => proof_id, + let proof_id = match prover + .prove(&state.agg_pk, &stdin) + .groth16() + .strategy(state.agg_proof_strategy) + .request_async() + .await + { + Ok(id) => id, Err(e) => { - log::error!("Failed to request proof: {}", e); + error!("Failed to request proof: {}", e); return Err(AppError(anyhow::anyhow!("Failed to request proof: {}", e))); } }; - Ok((StatusCode::OK, Json(ProofResponse { proof_id }))) + Ok(( + StatusCode::OK, + Json(ProofResponse { + proof_id: proof_id.to_vec(), + }), + )) } -/// Request a proof for a span of blocks. +/// Request a mock proof for a span of blocks. async fn request_mock_span_proof( - State(state): State, + State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received mock span proof request: {:?}", payload); - let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; + let fetcher = match OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await { + Ok(f) => f, + Err(e) => { + error!("Failed to create data fetcher: {}", e); + return Err(AppError(e)); + } + }; - let host_cli = fetcher + let host_cli = match fetcher .get_host_cli_args( payload.start, payload.end, ProgramType::Multi, CacheMode::DeleteCache, ) - .await?; + .await + { + Ok(cli) => cli, + Err(e) => { + error!("Failed to get host CLI args: {}", e); + return Err(AppError(e)); + } + }; // Start the server and native client with a timeout. // Note: Ideally, the server should call out to a separate process that executes the native // host, and return an ID that the client can poll on to check if the proof was submitted. + let start_time = Instant::now(); let mut witnessgen_executor = WitnessGenExecutor::new(WITNESSGEN_TIMEOUT, RunContext::Docker); - witnessgen_executor.spawn_witnessgen(&host_cli).await?; + if let Err(e) = witnessgen_executor.spawn_witnessgen(&host_cli).await { + error!("Failed to spawn witness generator: {}", e); + return Err(AppError(e)); + } // Log any errors from running the witness generation process. - let res = witnessgen_executor.flush().await; - if let Err(e) = res { - log::error!("Failed to generate witness: {}", e); + if let Err(e) = witnessgen_executor.flush().await { + error!("Failed to generate witness: {}", e); return Err(AppError(anyhow::anyhow!( "Failed to generate witness: {}", e ))); } + let witness_generation_time_sec = start_time.elapsed(); + + let sp1_stdin = match get_proof_stdin(&host_cli) { + Ok(stdin) => stdin, + Err(e) => { + error!("Failed to get proof stdin: {}", e); + return Err(AppError(e)); + } + }; - let sp1_stdin = get_proof_stdin(&host_cli)?; + let start_time = Instant::now(); + let prover = ProverClient::builder().cpu().build(); + let (pv, report) = prover.execute(RANGE_ELF, &sp1_stdin).run().unwrap(); + let execution_duration = start_time.elapsed(); - let prover = ProverClient::mock(); - let proof = prover - .prove(&state.range_pk, sp1_stdin) - .set_skip_deferred_proof_verification(true) - .compressed() - .run()?; + let block_data = fetcher + .get_l2_block_data_range(payload.start, payload.end) + .await?; + + let stats = ExecutionStats::new( + &block_data, + &report, + witness_generation_time_sec.as_secs(), + execution_duration.as_secs(), + ); + + let l2_chain_id = fetcher.get_l2_chain_id().await?; + // Save the report to disk. + let report_dir = format!("execution-reports/{}", l2_chain_id); + if !std::path::Path::new(&report_dir).exists() { + fs::create_dir_all(&report_dir)?; + } + + let report_path = format!("{}/{}-{}.json", report_dir, payload.start, payload.end); + // Write to CSV. + let mut csv_writer = csv::Writer::from_path(report_path)?; + csv_writer.serialize(&stats)?; + csv_writer.flush()?; + + let proof = SP1ProofWithPublicValues::create_mock_proof( + &state.range_pk, + pv.clone(), + SP1ProofMode::Compressed, + SP1_CIRCUIT_VERSION, + ); let proof_bytes = bincode::serialize(&proof).unwrap(); Ok(( StatusCode::OK, Json(ProofStatus { - status: sp1_sdk::network::proto::network::ProofStatus::ProofFulfilled.into(), + fulfillment_status: FulfillmentStatus::Fulfilled.into(), + execution_status: ExecutionStatus::UnspecifiedExecutionStatus.into(), proof: proof_bytes, }), )) @@ -350,7 +436,7 @@ async fn request_mock_span_proof( /// Request mock aggregation proof. async fn request_mock_agg_proof( - State(state): State, + State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received mock agg proof request!"); @@ -371,35 +457,67 @@ async fn request_mock_agg_proof( .map(|proof| proof.proof.clone()) .collect(); - let l1_head_bytes = hex::decode( + let l1_head_bytes = match hex::decode( payload .head .strip_prefix("0x") .expect("Invalid L1 head, no 0x prefix."), - )?; + ) { + Ok(bytes) => bytes, + Err(e) => { + error!("Failed to decode L1 head: {}", e); + return Err(AppError(anyhow::anyhow!("Failed to decode L1 head: {}", e))); + } + }; let l1_head: [u8; 32] = l1_head_bytes.try_into().unwrap(); - let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; - let headers = fetcher + let fetcher = match OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await { + Ok(f) => f, + Err(e) => { + error!("Failed to create data fetcher: {}", e); + return Err(AppError(e)); + } + }; + let headers = match fetcher .get_header_preimages(&boot_infos, l1_head.into()) - .await?; + .await + { + Ok(h) => h, + Err(e) => { + error!("Failed to get header preimages: {}", e); + return Err(AppError(e)); + } + }; - let prover = ProverClient::mock(); + let prover = ProverClient::builder().mock().build(); let stdin = - get_agg_proof_stdin(proofs, boot_infos, headers, &state.range_vk, l1_head.into()).unwrap(); + match get_agg_proof_stdin(proofs, boot_infos, headers, &state.range_vk, l1_head.into()) { + Ok(s) => s, + Err(e) => { + error!("Failed to get aggregation proof stdin: {}", e); + return Err(AppError(e)); + } + }; - // Simulate the mock proof. proof.bytes() returns an empty byte array for mock proofs. - let proof = prover - .prove(&state.agg_pk, stdin) - .set_skip_deferred_proof_verification(true) + let proof = match prover + .prove(&state.agg_pk, &stdin) .groth16() - .run()?; + .deferred_proof_verification(false) + .run() + { + Ok(p) => p, + Err(e) => { + error!("Failed to generate proof: {}", e); + return Err(AppError(e)); + } + }; Ok(( StatusCode::OK, Json(ProofStatus { - status: sp1_sdk::network::proto::network::ProofStatus::ProofFulfilled.into(), + fulfillment_status: FulfillmentStatus::Fulfilled.into(), + execution_status: ExecutionStatus::UnspecifiedExecutionStatus.into(), proof: proof.bytes(), }), )) @@ -410,42 +528,41 @@ async fn get_proof_status( Path(proof_id): Path, ) -> Result<(StatusCode, Json), AppError> { info!("Received proof status request: {:?}", proof_id); - let private_key = env::var("SP1_PRIVATE_KEY")?; - let rpc_url = env::var("PROVER_NETWORK_RPC")?; - let client = NetworkClient::new(&private_key, Some(rpc_url.to_string())); + let client = ProverClient::builder().network().build(); let proof_id_bytes = hex::decode(proof_id)?; - // Time out this request if it takes too long. - let timeout = Duration::from_secs(10); - let (status, maybe_proof) = - match tokio::time::timeout(timeout, client.get_proof_request_status(&proof_id_bytes)).await - { - Ok(Ok(result)) => result, - Ok(Err(_)) => { - return Ok(( - StatusCode::INTERNAL_SERVER_ERROR, - Json(ProofStatus { - status: FulfillmentStatus::UnspecifiedFulfillmentStatus.into(), - proof: vec![], - }), - )); - } - Err(_) => { - return Ok(( - StatusCode::INTERNAL_SERVER_ERROR, - Json(ProofStatus { - status: FulfillmentStatus::UnspecifiedFulfillmentStatus.into(), - proof: vec![], - }), - )); - } - }; + // This request will time out if the server is down. + let (status, maybe_proof) = match client + .get_proof_status(B256::from_slice(&proof_id_bytes)) + .await + { + Ok(res) => res, + Err(e) => { + error!("Failed to get proof status: {}", e); + return Err(AppError(e)); + } + }; + + // Check the deadline. + if status.deadline < Instant::now().elapsed().as_secs() { + error!( + "Proof request timed out on the server. Default timeout is set to 4 hours. Returning status as Unfulfillable." + ); + return Ok(( + StatusCode::OK, + Json(ProofStatus { + fulfillment_status: FulfillmentStatus::Unfulfillable.into(), + execution_status: ExecutionStatus::Executed.into(), + proof: vec![], + }), + )); + } - // TODO: Use execution error for reserved once it's added. - let status = status.fulfillment_status(); - if status == FulfillmentStatus::Fulfilled { + let fulfillment_status = status.fulfillment_status; + let execution_status = status.execution_status; + if fulfillment_status == FulfillmentStatus::Fulfilled as i32 { let proof: SP1ProofWithPublicValues = maybe_proof.unwrap(); match proof.proof { @@ -457,7 +574,8 @@ async fn get_proof_status( return Ok(( StatusCode::OK, Json(ProofStatus { - status: status.into(), + fulfillment_status, + execution_status, proof: proof_bytes, }), )); @@ -468,7 +586,8 @@ async fn get_proof_status( return Ok(( StatusCode::OK, Json(ProofStatus { - status: status.into(), + fulfillment_status, + execution_status, proof: proof_bytes, }), )); @@ -479,18 +598,20 @@ async fn get_proof_status( return Ok(( StatusCode::OK, Json(ProofStatus { - status: status.into(), + fulfillment_status, + execution_status, proof: proof_bytes, }), )); } _ => (), } - } else if status == FulfillmentStatus::Unfulfillable { + } else if fulfillment_status == FulfillmentStatus::Unfulfillable as i32 { return Ok(( StatusCode::OK, Json(ProofStatus { - status: status.into(), + fulfillment_status, + execution_status, proof: vec![], }), )); @@ -498,7 +619,8 @@ async fn get_proof_status( Ok(( StatusCode::OK, Json(ProofStatus { - status: status.into(), + fulfillment_status, + execution_status, proof: vec![], }), )) diff --git a/proposer/succinct/build.rs b/proposer/succinct/build.rs index abda4cd2..7a61a605 100644 --- a/proposer/succinct/build.rs +++ b/proposer/succinct/build.rs @@ -1,5 +1,5 @@ -use op_succinct_build_utils::build_all; +use op_succinct_build_utils::{build_all, ProgramBuildArgs}; fn main() { - build_all(); + build_all(ProgramBuildArgs::Default); } diff --git a/proposer/succinct/src/lib.rs b/proposer/succinct/src/lib.rs index 55fe3b47..5599715e 100644 --- a/proposer/succinct/src/lib.rs +++ b/proposer/succinct/src/lib.rs @@ -2,7 +2,7 @@ use alloy_primitives::B256; use base64::{engine::general_purpose, Engine as _}; use serde::{Deserialize, Deserializer, Serialize}; use serde_repr::{Deserialize_repr, Serialize_repr}; -use sp1_sdk::{SP1ProvingKey, SP1VerifyingKey}; +use sp1_sdk::{network::FulfillmentStrategy, SP1ProvingKey, SP1VerifyingKey}; #[derive(Serialize, Deserialize, Debug)] pub struct ValidateConfigRequest { @@ -66,16 +66,16 @@ impl From for UnclaimDescription { #[derive(Serialize, Deserialize)] /// The status of a proof request. pub struct ProofStatus { - // Note: Can't use `SP1FulfillmentStatus` directly because `Serialize_repr` and `Deserialize_repr` aren't derived on it. - // serde_repr::Serialize_repr and Deserialize_repr are necessary to use `SP1FulfillmentStatus` in this struct. - pub status: i32, + // Note: Can't use `FulfillmentStatus`/`ExecutionStatus` directly because `Serialize_repr` and `Deserialize_repr` aren't derived on it. + pub fulfillment_status: i32, + pub execution_status: i32, pub proof: Vec, } /// Configuration of the L2 Output Oracle contract. Created once at server start-up, monitors if there are any changes /// to the contract's configuration. #[derive(Clone)] -pub struct ContractConfig { +pub struct SuccinctProposerConfig { pub range_vk: SP1VerifyingKey, pub range_pk: SP1ProvingKey, pub agg_pk: SP1ProvingKey, @@ -83,6 +83,8 @@ pub struct ContractConfig { pub agg_vkey_hash: B256, pub range_vkey_commitment: B256, pub rollup_config_hash: B256, + pub range_proof_strategy: FulfillmentStrategy, + pub agg_proof_strategy: FulfillmentStrategy, } /// Deserialize a vector of base64 strings into a vector of vectors of bytes. Go serializes diff --git a/rust-toolchain b/rust-toolchain index 6f113e3b..37db4627 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "1.81" +channel = "nightly-2024-12-16" components = ["llvm-tools", "rustc-dev"] diff --git a/scripts/prove/Cargo.toml b/scripts/prove/Cargo.toml index ce1dcda4..161ae1f0 100644 --- a/scripts/prove/Cargo.toml +++ b/scripts/prove/Cargo.toml @@ -7,10 +7,6 @@ authors.workspace = true repository.workspace = true homepage.workspace = true -[[bin]] -name = "single" -path = "bin/single.rs" - [[bin]] name = "multi" path = "bin/multi.rs" @@ -27,7 +23,6 @@ clap = { workspace = true } cargo_metadata = { workspace = true } anyhow.workspace = true dotenv.workspace = true -num-format.workspace = true csv.workspace = true # kona @@ -36,13 +31,10 @@ kona-host = { workspace = true } # local op-succinct-host-utils.workspace = true op-succinct-client-utils.workspace = true - -# op-alloy -op-alloy-genesis.workspace = true +op-succinct-scripts = { path = "../utils" } # alloy alloy-primitives = { workspace = true } -alloy-eips = { workspace = true } # sp1 sp1-sdk = { workspace = true } diff --git a/scripts/prove/bin/agg.rs b/scripts/prove/bin/agg.rs index c7e72f91..e76450f2 100644 --- a/scripts/prove/bin/agg.rs +++ b/scripts/prove/bin/agg.rs @@ -7,14 +7,12 @@ use op_succinct_host_utils::{ fetcher::{OPSuccinctDataFetcher, RunContext}, get_agg_proof_stdin, }; +use op_succinct_prove::{AGG_ELF, RANGE_ELF}; use sp1_sdk::{ - utils, HashableKey, ProverClient, SP1Proof, SP1ProofWithPublicValues, SP1VerifyingKey, + utils, HashableKey, Prover, ProverClient, SP1Proof, SP1ProofWithPublicValues, SP1VerifyingKey, }; use std::fs; -pub const AGG_ELF: &[u8] = include_bytes!("../../../elf/aggregation-elf"); -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); - #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { @@ -35,7 +33,6 @@ struct Args { fn load_aggregation_proof_data( proof_names: Vec, range_vkey: &SP1VerifyingKey, - prover: &ProverClient, ) -> (Vec, Vec) { let metadata = MetadataCommand::new().exec().unwrap(); let workspace_root = metadata.workspace_root; @@ -44,6 +41,8 @@ fn load_aggregation_proof_data( let mut proofs = Vec::with_capacity(proof_names.len()); let mut boot_infos = Vec::with_capacity(proof_names.len()); + let prover = ProverClient::builder().cpu().build(); + for proof_name in proof_names.iter() { let proof_path = format!("{}/{}.bin", proof_directory, proof_name); if fs::metadata(&proof_path).is_err() { @@ -73,12 +72,12 @@ async fn main() -> Result<()> { dotenv::from_filename(args.env_file).ok(); - let prover = ProverClient::new(); + let prover = ProverClient::from_env(); let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Dev).await?; - let (_, vkey) = prover.setup(MULTI_BLOCK_ELF); + let (_, vkey) = prover.setup(RANGE_ELF); - let (proofs, boot_infos) = load_aggregation_proof_data(args.proofs, &vkey, &prover); + let (proofs, boot_infos) = load_aggregation_proof_data(args.proofs, &vkey); let header = fetcher.get_latest_l1_head_in_batch(&boot_infos).await?; let headers = fetcher @@ -98,12 +97,12 @@ async fn main() -> Result<()> { if args.prove { prover - .prove(&agg_pk, stdin) + .prove(&agg_pk, &stdin) .groth16() .run() .expect("proving failed"); } else { - let (_, report) = prover.execute(AGG_ELF, stdin).run().unwrap(); + let (_, report) = prover.execute(AGG_ELF, &stdin).run().unwrap(); println!("report: {:?}", report); } diff --git a/scripts/prove/bin/multi.rs b/scripts/prove/bin/multi.rs index 3485f61f..19bd0698 100644 --- a/scripts/prove/bin/multi.rs +++ b/scripts/prove/bin/multi.rs @@ -7,42 +7,15 @@ use op_succinct_host_utils::{ stats::ExecutionStats, ProgramType, }; -use op_succinct_prove::{execute_multi, generate_witness, DEFAULT_RANGE, MULTI_BLOCK_ELF}; +use op_succinct_prove::{execute_multi, generate_witness, DEFAULT_RANGE, RANGE_ELF}; +use op_succinct_scripts::HostExecutorArgs; use sp1_sdk::{utils, ProverClient}; -use std::{fs, path::PathBuf, time::Duration}; - -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -struct Args { - /// Start L2 block number. - #[arg(short, long)] - start: Option, - - /// End L2 block number. - #[arg(short, long)] - end: Option, - - /// Verbosity level. - #[arg(short, long, default_value = "0")] - verbosity: u8, - - /// Skip running native execution. - #[arg(short, long)] - use_cache: bool, - - /// Generate proof. - #[arg(short, long)] - prove: bool, - - /// Env file. - #[arg(long, default_value = ".env")] - env_file: PathBuf, -} +use std::{fs, time::Duration}; /// Execute the OP Succinct program for multiple blocks. #[tokio::main] async fn main() -> Result<()> { - let args = Args::parse(); + let args = HostExecutorArgs::parse(); dotenv::from_path(&args.env_file)?; utils::setup_logger(); @@ -73,14 +46,14 @@ async fn main() -> Result<()> { // Get the stdin for the block. let sp1_stdin = get_proof_stdin(&host_cli)?; - let prover = ProverClient::new(); + let prover = ProverClient::from_env(); if args.prove { // If the prove flag is set, generate a proof. - let (pk, _) = prover.setup(MULTI_BLOCK_ELF); + let (pk, _) = prover.setup(RANGE_ELF); // Generate proofs in compressed mode for aggregation verification. - let proof = prover.prove(&pk, sp1_stdin).compressed().run().unwrap(); + let proof = prover.prove(&pk, &sp1_stdin).compressed().run().unwrap(); // Create a proof directory for the chain ID if it doesn't exist. let proof_dir = format!( @@ -100,14 +73,8 @@ async fn main() -> Result<()> { } else { let l2_chain_id = data_fetcher.get_l2_chain_id().await?; - let (block_data, report, execution_duration) = execute_multi( - &prover, - &data_fetcher, - sp1_stdin, - l2_start_block, - l2_end_block, - ) - .await?; + let (block_data, report, execution_duration) = + execute_multi(&data_fetcher, sp1_stdin, l2_start_block, l2_end_block).await?; let stats = ExecutionStats::new( &block_data, diff --git a/scripts/prove/bin/single.rs b/scripts/prove/bin/single.rs deleted file mode 100644 index 2daa32fe..00000000 --- a/scripts/prove/bin/single.rs +++ /dev/null @@ -1,122 +0,0 @@ -use anyhow::Result; -use clap::Parser; -use op_succinct_host_utils::{ - fetcher::{CacheMode, OPSuccinctDataFetcher, RunContext}, - get_proof_stdin, - stats::ExecutionStats, - witnessgen::WitnessGenExecutor, - ProgramType, -}; -use sp1_sdk::{utils, ProverClient}; -use std::time::Instant; - -pub const SINGLE_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/fault-proof-elf"); - -#[derive(Parser, Debug)] -#[command(author, version, about, long_about = None)] -struct Args { - /// Start block number. - #[arg(short, long)] - l2_block: u64, - - /// Skip running native execution. - #[arg(short, long)] - use_cache: bool, - - /// Generate proof. - #[arg(short, long)] - prove: bool, - - /// Environment file. - #[arg(short, long, default_value = ".env")] - env_file: String, -} - -/// Execute the OP Succinct program for a single block. -#[tokio::main] -async fn main() -> Result<()> { - let args = Args::parse(); - dotenv::from_path(&args.env_file)?; - utils::setup_logger(); - - let data_fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Dev).await?; - - let l2_chain_id = data_fetcher.get_l2_chain_id().await?; - - let l2_safe_head = args.l2_block - 1; - - let cache_mode = if args.use_cache { - CacheMode::KeepCache - } else { - CacheMode::DeleteCache - }; - - let host_cli = data_fetcher - .get_host_cli_args(l2_safe_head, args.l2_block, ProgramType::Single, cache_mode) - .await?; - - // By default, re-run the native execution unless the user passes `--use-cache`. - let start_time = Instant::now(); - if !args.use_cache { - // Start the server and native client. - let mut witnessgen_executor = WitnessGenExecutor::default(); - witnessgen_executor.spawn_witnessgen(&host_cli).await?; - witnessgen_executor.flush().await?; - } - let witness_generation_time_sec = start_time.elapsed(); - // Get the stdin for the block. - let sp1_stdin = get_proof_stdin(&host_cli)?; - - let prover = ProverClient::new(); - - if args.prove { - // If the prove flag is set, generate a proof. - let (pk, _) = prover.setup(SINGLE_BLOCK_ELF); - - // Generate proofs in PLONK mode for on-chain verification. - let proof = prover.prove(&pk, sp1_stdin).plonk().run().unwrap(); - - // Create a proof directory for the chain ID if it doesn't exist. - let proof_dir = format!("data/{}/proofs", l2_chain_id); - if !std::path::Path::new(&proof_dir).exists() { - std::fs::create_dir_all(&proof_dir)?; - } - proof - .save(format!("{}/{}.bin", proof_dir, args.l2_block)) - .expect("Failed to save proof"); - } else { - let start_time = Instant::now(); - let (_, report) = prover.execute(SINGLE_BLOCK_ELF, sp1_stdin).run().unwrap(); - let execution_duration = start_time.elapsed(); - - let report_path = format!( - "execution-reports/single/{}/{}.csv", - l2_chain_id, args.l2_block - ); - - // Create the report directory if it doesn't exist. - let report_dir = format!("execution-reports/single/{}", l2_chain_id); - if !std::path::Path::new(&report_dir).exists() { - std::fs::create_dir_all(&report_dir)?; - } - - let block_data = data_fetcher - .get_l2_block_data_range(args.l2_block, args.l2_block) - .await?; - - let stats = ExecutionStats::new( - &block_data, - &report, - witness_generation_time_sec.as_secs(), - execution_duration.as_secs(), - ); - println!("Execution Stats: \n{:?}", stats); - - // Write to CSV. - let mut csv_writer = csv::Writer::from_path(report_path)?; - csv_writer.serialize(&stats)?; - csv_writer.flush()?; - } - - Ok(()) -} diff --git a/scripts/prove/build.rs b/scripts/prove/build.rs index abda4cd2..7a61a605 100644 --- a/scripts/prove/build.rs +++ b/scripts/prove/build.rs @@ -1,5 +1,5 @@ -use op_succinct_build_utils::build_all; +use op_succinct_build_utils::{build_all, ProgramBuildArgs}; fn main() { - build_all(); + build_all(ProgramBuildArgs::Default); } diff --git a/scripts/prove/src/lib.rs b/scripts/prove/src/lib.rs index ae531349..cb55be4b 100644 --- a/scripts/prove/src/lib.rs +++ b/scripts/prove/src/lib.rs @@ -12,7 +12,8 @@ pub const DEFAULT_RANGE: u64 = 5; pub const TWO_WEEKS: Duration = Duration::from_secs(14 * 24 * 60 * 60); pub const ONE_HOUR: Duration = Duration::from_secs(60 * 60); -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); +pub const AGG_ELF: &[u8] = include_bytes!("../../../elf/aggregation-elf"); +pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); pub async fn generate_witness(host_cli: &HostCli) -> Result { let start_time = Instant::now(); @@ -32,17 +33,14 @@ pub async fn generate_witness(host_cli: &HostCli) -> Result { } pub async fn execute_multi( - prover: &ProverClient, data_fetcher: &OPSuccinctDataFetcher, sp1_stdin: SP1Stdin, l2_start_block: u64, l2_end_block: u64, ) -> Result<(Vec, ExecutionReport, Duration)> { let start_time = Instant::now(); - let (_, report) = prover - .execute(MULTI_BLOCK_ELF, sp1_stdin.clone()) - .run() - .unwrap(); + let prover = ProverClient::builder().mock().build(); + let (_, report) = prover.execute(RANGE_ELF, &sp1_stdin).run().unwrap(); let execution_duration = start_time.elapsed(); let block_data = data_fetcher diff --git a/scripts/prove/tests/multi.rs b/scripts/prove/tests/multi.rs index 20949c7c..5bf95e15 100644 --- a/scripts/prove/tests/multi.rs +++ b/scripts/prove/tests/multi.rs @@ -8,7 +8,6 @@ use op_succinct_host_utils::{ ProgramType, }; use op_succinct_prove::{execute_multi, generate_witness, DEFAULT_RANGE, ONE_HOUR}; -use sp1_sdk::ProverClient; mod common; @@ -36,16 +35,8 @@ async fn execute_batch() -> Result<()> { // Get the stdin for the block. let sp1_stdin = get_proof_stdin(&host_cli)?; - let prover = ProverClient::new(); - - let (block_data, report, execution_duration) = execute_multi( - &prover, - &data_fetcher, - sp1_stdin, - l2_start_block, - l2_end_block, - ) - .await?; + let (block_data, report, execution_duration) = + execute_multi(&data_fetcher, sp1_stdin, l2_start_block, l2_end_block).await?; let stats = ExecutionStats::new( &block_data, diff --git a/scripts/utils/Cargo.toml b/scripts/utils/Cargo.toml index 8a74a963..c9ad3bc8 100644 --- a/scripts/utils/Cargo.toml +++ b/scripts/utils/Cargo.toml @@ -57,14 +57,8 @@ kona-host = { workspace = true } op-succinct-host-utils.workspace = true op-succinct-client-utils.workspace = true -# op-alloy -op-alloy-consensus.workspace = true -op-alloy-network.workspace = true -op-alloy-rpc-types.workspace = true - # sp1 sp1-sdk = { workspace = true } -dashmap = { version = "6.1.0", features = ["rayon"] } [build-dependencies] op-succinct-build-utils.workspace = true diff --git a/scripts/utils/bin/cost_estimator.rs b/scripts/utils/bin/cost_estimator.rs index d870e8aa..a100024d 100644 --- a/scripts/utils/bin/cost_estimator.rs +++ b/scripts/utils/bin/cost_estimator.rs @@ -25,7 +25,7 @@ use std::{ time::{Duration, Instant}, }; -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); +pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); const TWELVE_HOURS: Duration = Duration::from_secs(60 * 60 * 12); @@ -34,7 +34,6 @@ const TWELVE_HOURS: Duration = Duration::from_secs(60 * 60 * 12); async fn execute_blocks_and_write_stats_csv( host_clis: &[HostCli], ranges: Vec, - prover: &ProverClient, l2_chain_id: u64, start: u64, end: u64, @@ -73,6 +72,8 @@ async fn execute_blocks_and_write_stats_csv( fs::File::create(&report_path).unwrap(); let report_path = report_path.canonicalize().unwrap(); + let prover = ProverClient::builder().cpu().build(); + // Run the zkVM execution process for each split range in parallel and fill in the execution stats. host_clis .par_iter() @@ -81,7 +82,7 @@ async fn execute_blocks_and_write_stats_csv( let sp1_stdin = get_proof_stdin(host_cli).unwrap(); // FIXME: Implement retries with a smaller block range if this fails. - let result = prover.execute(MULTI_BLOCK_ELF, sp1_stdin).run(); + let result = prover.execute(RANGE_ELF, &sp1_stdin).run(); // If the execution fails, skip this block range and log the error. if let Some(err) = result.as_ref().err() { @@ -150,6 +151,7 @@ fn aggregate_execution_stats( aggregate_stats.bn_mul_cycles += stats.bn_mul_cycles; aggregate_stats.kzg_eval_cycles += stats.kzg_eval_cycles; aggregate_stats.ec_recover_cycles += stats.ec_recover_cycles; + aggregate_stats.p256_verify_cycles += stats.p256_verify_cycles; } // For statistics that are per-block or per-transaction, we take the average over the entire @@ -206,8 +208,6 @@ async fn main() -> Result<()> { split_ranges ); - let prover = ProverClient::new(); - let cache_mode = if args.use_cache { CacheMode::KeepCache } else { @@ -237,7 +237,6 @@ async fn main() -> Result<()> { execute_blocks_and_write_stats_csv( &host_clis, split_ranges, - &prover, l2_chain_id, l2_start_block, l2_end_block, diff --git a/scripts/utils/bin/fetch_and_save_proof.rs b/scripts/utils/bin/fetch_and_save_proof.rs index 949291ca..9ac36500 100644 --- a/scripts/utils/bin/fetch_and_save_proof.rs +++ b/scripts/utils/bin/fetch_and_save_proof.rs @@ -1,9 +1,13 @@ use alloy::{hex, sol_types::SolValue}; +use alloy_primitives::B256; use anyhow::Result; use clap::Parser; use op_succinct_client_utils::{boot::BootInfoStruct, AGGREGATION_OUTPUTS_SIZE}; -use sp1_sdk::{NetworkProverV2, SP1ProofWithPublicValues}; -use std::{env, fs, path::Path}; +use sp1_sdk::{ + network::proto::network::{ExecutionStatus, FulfillmentStatus, GetProofRequestStatusResponse}, + ProverClient, SP1ProofWithPublicValues, +}; +use std::{fs, path::Path}; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] @@ -30,13 +34,26 @@ async fn main() -> Result<()> { dotenv::dotenv().ok(); let args = Args::parse(); - let private_key = env::var("SP1_PRIVATE_KEY")?; - let rpc_url = env::var("PROVER_NETWORK_RPC")?; - let prover = NetworkProverV2::new(&private_key, Some(rpc_url.to_string()), false); + let prover = ProverClient::builder().network().build(); let request_id = hex::decode(&args.request_id)?; // Fetch the proof - let mut proof: SP1ProofWithPublicValues = prover.wait_proof(&request_id, None).await?; + let (status, proof): ( + GetProofRequestStatusResponse, + Option, + ) = prover + .get_proof_status(B256::from_slice(&request_id)) + .await?; + let fulfillment_status = FulfillmentStatus::try_from(status.fulfillment_status).unwrap(); + let _ = ExecutionStatus::try_from(status.execution_status).unwrap(); + + let mut proof = match fulfillment_status { + FulfillmentStatus::Fulfilled => proof.unwrap(), + _ => { + println!("Proof is still pending"); + return Ok(()); + } + }; if args.agg_proof { let mut raw_boot_info = [0u8; AGGREGATION_OUTPUTS_SIZE]; diff --git a/scripts/utils/bin/fetch_rollup_config.rs b/scripts/utils/bin/fetch_rollup_config.rs index 61d7c457..612cdef8 100644 --- a/scripts/utils/bin/fetch_rollup_config.rs +++ b/scripts/utils/bin/fetch_rollup_config.rs @@ -1,11 +1,11 @@ use alloy::{eips::BlockId, hex, signers::local::PrivateKeySigner}; -use alloy_primitives::{Address, B256}; +use alloy_primitives::Address; use anyhow::Result; use op_succinct_client_utils::{boot::hash_rollup_config, types::u32_to_u8}; use op_succinct_host_utils::fetcher::{OPSuccinctDataFetcher, RPCMode, RunContext}; use serde::{Deserialize, Serialize}; use serde_json::Value; -use sp1_sdk::{HashableKey, ProverClient}; +use sp1_sdk::{HashableKey, Prover, ProverClient}; use std::{ env, fs, path::{Path, PathBuf}, @@ -22,6 +22,7 @@ struct L2OOConfig { challenger: String, finalization_period: u64, l2_block_time: u64, + op_succinct_l2_output_oracle_impl: String, owner: String, proposer: String, rollup_config_hash: String, @@ -32,20 +33,29 @@ struct L2OOConfig { verifier: String, aggregation_vkey: String, range_vkey_commitment: String, + proxy_admin: String, } -/// If the environment variable is set for the address, return it. Otherwise, return the address associated with the private key. If the private key is not set, return the zero address. -fn get_address(env_var: &str) -> String { - let private_key = env::var("PRIVATE_KEY").unwrap_or_else(|_| B256::ZERO.to_string()); +/// Returns an address based on environment variables and private key settings: +/// - If env_var exists, returns that address +/// - Otherwise if private_key_by_default=true and PRIVATE_KEY exists, returns address derived from private key +/// - Otherwise returns zero address +fn get_address(env_var: &str, private_key_by_default: bool) -> String { + // First try to get address directly from env var + if let Ok(addr) = env::var(env_var) { + return addr; + } - env::var(env_var).unwrap_or_else(|_| { - if private_key == B256::ZERO.to_string() { - Address::ZERO.to_string() - } else { - let signer: PrivateKeySigner = private_key.parse().unwrap(); - signer.address().to_string() + // Next try to derive address from private key if enabled + if private_key_by_default { + if let Ok(pk) = env::var("PRIVATE_KEY") { + let signer: PrivateKeySigner = pk.parse().unwrap(); + return signer.address().to_string(); } - }) + } + + // Fallback to zero address + Address::ZERO.to_string() } /// Update the L2OO config with the rollup config hash and other relevant data before the contract is deployed. @@ -53,7 +63,7 @@ fn get_address(env_var: &str) -> String { /// Specifically, updates the following fields in `opsuccinctl2ooconfig.json`: /// - rollup_config_hash: Get the hash of the rollup config from the rollup config file. /// - l2_block_time: Get the block time from the rollup config. -/// - starting_block_number: If `USE_CACHED_STARTING_BLOCK` is `false`, set starting_block_number to 10 blocks before the latest block on L2. +/// - starting_block_number: If `STARTING_BLOCK_NUMBER` is not set, set starting_block_number to the latest finalized block on L2. /// - starting_output_root: Set to the output root of the starting block number. /// - starting_timestamp: Set to the timestamp of the starting block number. /// - chain_id: Get the chain id from the rollup config. @@ -69,7 +79,7 @@ async fn update_l2oo_config() -> Result<()> { // Set the verifier address let verifier = env::var("VERIFIER_ADDRESS").unwrap_or_else(|_| { // Default to Groth16 VerifierGateway contract address - // Source: https://docs.succinct.xyz/verification/onchain/contract-addresses + // Source: https://docs.succinct.xyz/docs/verification/onchain/contract-addresses "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B".to_string() }); @@ -117,11 +127,14 @@ async fn update_l2oo_config() -> Result<()> { .unwrap_or(DEFAULT_FINALIZATION_PERIOD_SECS); // Default to the address associated with the private key if the environment variable is not set. If private key is not set, default to zero address. - let proposer = get_address("PROPOSER"); - let owner = get_address("OWNER"); - let challenger = get_address("CHALLENGER"); + let proposer = get_address("PROPOSER", true); + let owner = get_address("OWNER", true); + let challenger = get_address("CHALLENGER", true); + + let proxy_admin = get_address("PROXY_ADMIN", false); + let op_succinct_l2_output_oracle_impl = get_address("OP_SUCCINCT_L2_OUTPUT_ORACLE_IMPL", false); - let prover = ProverClient::new(); + let prover = ProverClient::builder().cpu().build(); let (_, agg_vkey) = prover.setup(AGG_ELF); let aggregation_vkey = agg_vkey.vk.bytes32(); @@ -142,6 +155,8 @@ async fn update_l2oo_config() -> Result<()> { verifier, aggregation_vkey, range_vkey_commitment, + proxy_admin, + op_succinct_l2_output_oracle_impl, }; write_l2oo_config(l2oo_config, workspace_root.as_std_path())?; diff --git a/scripts/utils/bin/gen_sp1_test_artifacts.rs b/scripts/utils/bin/gen_sp1_test_artifacts.rs index 3611d855..bb78a48f 100644 --- a/scripts/utils/bin/gen_sp1_test_artifacts.rs +++ b/scripts/utils/bin/gen_sp1_test_artifacts.rs @@ -1,61 +1,22 @@ use anyhow::Result; use clap::Parser; use futures::StreamExt; -use kona_host::HostCli; use log::info; use op_succinct_host_utils::{ - block_range::{get_validated_block_range, split_range_basic, SpanBatchRange}, + block_range::{get_validated_block_range, split_range_basic}, fetcher::{CacheMode, OPSuccinctDataFetcher, RunContext}, get_proof_stdin, witnessgen::run_native_data_generation, ProgramType, }; use op_succinct_scripts::HostExecutorArgs; -use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIterator}; -use sp1_sdk::{utils, ProverClient, SP1Stdin}; +use sp1_sdk::utils; use std::{ fs::{self}, path::PathBuf, }; -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); - -/// Run the zkVM execution process for each split range in parallel. Get the SP1Stdin and the range -/// for each successful execution. -async fn execute_blocks_parallel( - host_clis: &[HostCli], - ranges: Vec, - prover: &ProverClient, -) -> Vec<(SP1Stdin, SpanBatchRange)> { - // Run the zkVM execution process for each split range in parallel and fill in the execution stats. - let successful_ranges = host_clis - .par_iter() - .zip(ranges.par_iter()) - .map(|(host_cli, range)| { - let sp1_stdin = get_proof_stdin(host_cli).unwrap(); - - let result = prover.execute(MULTI_BLOCK_ELF, sp1_stdin.clone()).run(); - - // If the execution fails, skip this block range and log the error. - if let Some(err) = result.as_ref().err() { - log::warn!( - "Failed to execute blocks {:?} - {:?} because of {:?}. Reduce your `batch-size` if you're running into OOM issues on SP1.", - range.start, - range.end, - err - ); - return None; - } - - Some((sp1_stdin.clone(), range.clone())) - }) - .filter_map(|result| result) - .collect(); - - info!("Execution is complete."); - - successful_ranges -} +pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); #[tokio::main] async fn main() -> Result<()> { @@ -77,8 +38,6 @@ async fn main() -> Result<()> { split_ranges ); - let prover = ProverClient::new(); - let cache_mode = if args.use_cache { CacheMode::KeepCache } else { @@ -102,10 +61,16 @@ async fn main() -> Result<()> { run_native_data_generation(&host_clis).await; } - let successful_ranges = execute_blocks_parallel(&host_clis, split_ranges, &prover).await; + let successful_ranges = split_ranges + .iter() + .zip(host_clis.iter()) + .map(|(range, host_cli)| { + let sp1_stdin = get_proof_stdin(host_cli).unwrap(); + (sp1_stdin, range) + }); // Now, write the successful ranges to /sp1-testing-suite-artifacts/op-succinct-chain-{l2_chain_id}-{start}-{end} - // The folders should each have the MULTI_BLOCK_ELF as program.bin, and the serialized stdin should be + // The folders should each have the RANGE_ELF as program.bin, and the serialized stdin should be // written to stdin.bin. let cargo_metadata = cargo_metadata::MetadataCommand::new().exec().unwrap(); let root_dir = PathBuf::from(cargo_metadata.workspace_root).join("sp1-testing-suite-artifacts"); @@ -121,7 +86,7 @@ async fn main() -> Result<()> { )); fs::create_dir_all(&program_dir)?; - fs::write(program_dir.join("program.bin"), MULTI_BLOCK_ELF)?; + fs::write(program_dir.join("program.bin"), RANGE_ELF)?; fs::write( program_dir.join("stdin.bin"), bincode::serialize(&sp1_stdin).unwrap(), diff --git a/scripts/utils/bin/vkey.rs b/scripts/utils/bin/vkey.rs index 71bf18c4..2b1d2fd9 100644 --- a/scripts/utils/bin/vkey.rs +++ b/scripts/utils/bin/vkey.rs @@ -1,10 +1,10 @@ use alloy_primitives::B256; use anyhow::Result; use op_succinct_client_utils::types::u32_to_u8; -use sp1_sdk::{utils, HashableKey, ProverClient}; +use sp1_sdk::{utils, HashableKey, Prover, ProverClient}; pub const AGG_ELF: &[u8] = include_bytes!("../../../elf/aggregation-elf"); -pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); +pub const RANGE_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); // Get the verification keys for the ELFs and check them against the contract. #[tokio::main] @@ -12,9 +12,9 @@ async fn main() -> Result<()> { dotenv::dotenv().ok(); utils::setup_logger(); - let prover = ProverClient::new(); + let prover = ProverClient::builder().cpu().build(); - let (_, range_vk) = prover.setup(MULTI_BLOCK_ELF); + let (_, range_vk) = prover.setup(RANGE_ELF); // Get the 32 byte commitment to the vkey from vkey.vk.hash_u32() let multi_block_vkey_u8 = u32_to_u8(range_vk.vk.hash_u32()); diff --git a/scripts/utils/build.rs b/scripts/utils/build.rs index abda4cd2..7a61a605 100644 --- a/scripts/utils/build.rs +++ b/scripts/utils/build.rs @@ -1,5 +1,5 @@ -use op_succinct_build_utils::build_all; +use op_succinct_build_utils::{build_all, ProgramBuildArgs}; fn main() { - build_all(); + build_all(ProgramBuildArgs::Default); } diff --git a/scripts/utils/src/lib.rs b/scripts/utils/src/lib.rs index b88bdfa7..12ac22fa 100644 --- a/scripts/utils/src/lib.rs +++ b/scripts/utils/src/lib.rs @@ -20,9 +20,12 @@ pub struct HostExecutorArgs { #[clap(long)] pub rolling: bool, /// The number of blocks to use for the default range. - #[clap(long, default_value = "100")] + #[clap(long, default_value = "5")] pub default_range: u64, /// The environment file to use. #[clap(long, default_value = ".env")] pub env_file: PathBuf, + /// Whether to generate proofs. + #[clap(long)] + pub prove: bool, } diff --git a/utils/build/src/lib.rs b/utils/build/src/lib.rs index 80362a8f..f7b673e7 100644 --- a/utils/build/src/lib.rs +++ b/utils/build/src/lib.rs @@ -3,20 +3,32 @@ use std::process::Command; use chrono::Local; use sp1_build::{build_program_with_args, BuildArgs}; +#[derive(Clone, Copy)] +pub enum ProgramBuildArgs { + Default, + WithTracing, +} + /// Build a native program. -fn build_native_program(program: &str) { - // Build with tracing-subscriber feature enabled for `kona-client` logging. +fn build_native_program(program: &str, program_args: ProgramBuildArgs) { + let mut args = vec![ + "build", + "--workspace", + "--bin", + program, + "--profile", + "release-client-lto", + ]; + + match program_args { + ProgramBuildArgs::Default => {} + ProgramBuildArgs::WithTracing => { + args.extend(&["--features", "tracing-subscriber"]); + } + } + let status = Command::new("cargo") - .args([ - "build", - "--workspace", - "--bin", - program, - "--profile", - "release-client-lto", - "--features", - "tracing-subscriber", - ]) + .args(&args) .status() .expect("Failed to execute cargo build command"); @@ -74,9 +86,10 @@ fn build_zkvm_program(program: &str) { build_program_with_args( &format!("{}/{}", metadata.workspace_root.join("programs"), program), BuildArgs { - elf_name: format!("{}-elf", program), + elf_name: Some(format!("{}-elf", program)), + output_directory: Some("../../elf".to_string()), docker: true, - tag: "v3.0.0".to_string(), + tag: "v4.0.0-rc.10".to_string(), ..Default::default() }, ); @@ -84,17 +97,15 @@ fn build_zkvm_program(program: &str) { /// Build all the native programs and the native host runner. Optional flag to build the zkVM /// programs. -pub fn build_all() { - let programs = vec!["fault-proof", "range"]; - - for program in programs { - // Note: Don't comment this out, because the Docker program depends on the native program - // for range being built. - build_native_program(program); - // build_zkvm_program(program); - } +pub fn build_all(program_args: ProgramBuildArgs) { + // Note: Don't comment this out, because the Docker program depends on the native program + // for range being built. + build_native_program("range", program_args); + // build_zkvm_program("range"); + // Build aggregation program. // build_zkvm_program("aggregation"); + // Note: Don't comment this out, because the Docker program depends on the native host runner // being built. build_native_host_runner(); diff --git a/utils/client/src/lib.rs b/utils/client/src/lib.rs index 33ef0cbe..bdf47d30 100644 --- a/utils/client/src/lib.rs +++ b/utils/client/src/lib.rs @@ -8,7 +8,7 @@ mod executor; pub use executor::block_on; mod oracle; -pub use oracle::InMemoryOracle; +pub use oracle::{InMemoryOracle, InMemoryOracleData}; pub mod precompiles; diff --git a/utils/client/src/oracle/mod.rs b/utils/client/src/oracle/mod.rs index 92ac60fe..7bc43633 100644 --- a/utils/client/src/oracle/mod.rs +++ b/utils/client/src/oracle/mod.rs @@ -11,23 +11,24 @@ use kona_preimage::{ }; use kona_proof::FlushableCache; use kzg_rs::{get_kzg_settings, Blob as KzgRsBlob, Bytes48}; -use rkyv::{ - with::{ArchiveWith, DeserializeWith, SerializeWith}, - Archive, Archived, Deserialize, Fallible, Infallible, Resolver, Serialize, -}; +use rkyv::{from_bytes, Archive, Deserialize, Serialize}; use sha2::{Digest, Sha256}; use spin::mutex::Mutex; use std::{collections::HashMap, sync::Arc}; type LockableMap = Arc, BytesHasherBuilder>>>; +#[derive(Archive, Serialize, Deserialize)] +pub struct InMemoryOracleData { + pub map: HashMap<[u8; 32], Vec, BytesHasherBuilder>, +} + /// An in-memory HashMap that will serve as the oracle for the zkVM. /// Rather than relying on a trusted host for data, the data in this oracle /// is verified with the `verify()` function, and then is trusted for /// the remainder of execution. -#[derive(Debug, Clone, Archive, Serialize, Deserialize)] +#[derive(Debug, Clone)] pub struct InMemoryOracle { - #[with(Lock)] cache: LockableMap, } @@ -35,14 +36,19 @@ impl InMemoryOracle { /// Creates a new [InMemoryOracle] from the raw bytes passed into the zkVM. /// These values are deserialized using rkyv for zero copy deserialization. pub fn from_raw_bytes(input: Vec) -> Self { - println!("cycle-tracker-start: in-memory-oracle-from-raw-bytes-archive"); - let archived = unsafe { rkyv::archived_root::(&input) }; - println!("cycle-tracker-end: in-memory-oracle-from-raw-bytes-archive"); println!("cycle-tracker-start: in-memory-oracle-from-raw-bytes-deserialize"); - let deserialized: Self = archived.deserialize(&mut Infallible).unwrap(); + let deserialized: InMemoryOracleData = + from_bytes::(&input) + .expect("failed to deserialize"); println!("cycle-tracker-end: in-memory-oracle-from-raw-bytes-deserialize"); - deserialized + Self::from_in_memory_oracle_data(deserialized) + } + + pub fn from_in_memory_oracle_data(data: InMemoryOracleData) -> Self { + Self { + cache: Arc::new(Mutex::new(data.map)), + } } /// Creates a new [InMemoryOracle] from a HashMap of B256 keys and Vec values. @@ -199,46 +205,3 @@ impl InMemoryOracle { Ok(()) } } - -struct Lock; - -impl ArchiveWith>> for Lock { - type Archived = Archived; - type Resolver = Resolver; - - unsafe fn resolve_with( - field: &Arc>, - pos: usize, - resolver: Self::Resolver, - out: *mut Self::Archived, - ) { - field.lock().resolve(pos, resolver, out.cast()); - } -} - -impl SerializeWith>, S> for Lock -where - T: Serialize, - S: Fallible + ?Sized, -{ - fn serialize_with( - field: &Arc>, - serializer: &mut S, - ) -> Result::Error> { - field.lock().serialize(serializer) - } -} - -impl DeserializeWith, Arc>, D> for Lock -where - Archived: Deserialize, - T: Archive, - D: Fallible + ?Sized, -{ - fn deserialize_with( - field: &Archived, - deserializer: &mut D, - ) -> Result>, D::Error> { - Ok(Arc::new(Mutex::new(field.deserialize(deserializer)?))) - } -} diff --git a/utils/client/src/precompiles/mod.rs b/utils/client/src/precompiles/mod.rs index 120bee25..9a7f4e9a 100644 --- a/utils/client/src/precompiles/mod.rs +++ b/utils/client/src/precompiles/mod.rs @@ -18,9 +18,13 @@ macro_rules! create_annotated_precompile { let precompile = $precompile.precompile(); match precompile { Precompile::Standard(precompile) => { - println!(concat!("cycle-tracker-report-start: precompile-", $name)); + if cfg!(target_os = "zkvm") { + println!(concat!("cycle-tracker-report-start: precompile-", $name)); + } let result = precompile(input, gas_limit); - println!(concat!("cycle-tracker-report-end: precompile-", $name)); + if cfg!(target_os = "zkvm") { + println!(concat!("cycle-tracker-report-end: precompile-", $name)); + } result } _ => panic!("Annotated precompile must be a standard precompile."), @@ -42,6 +46,8 @@ pub(crate) const ANNOTATED_KZG_EVAL: PrecompileWithAddress = create_annotated_pr ); pub(crate) const ANNOTATED_EC_RECOVER: PrecompileWithAddress = create_annotated_precompile!(revm::precompile::secp256k1::ECRECOVER, "ec-recover"); +pub(crate) const ANNOTATED_P256_VERIFY: PrecompileWithAddress = + create_annotated_precompile!(revm::precompile::secp256r1::P256VERIFY, "p256-verify"); // Source: https://github.com/anton-rs/kona/blob/main/bin/client/src/fault/handler/mod.rs#L20-L42 pub fn zkvm_handle_register(handler: &mut EvmHandler<'_, (), &mut State<&mut TrieDB>>) @@ -64,6 +70,7 @@ where ANNOTATED_BN_PAIR, ANNOTATED_KZG_EVAL, ANNOTATED_EC_RECOVER, + ANNOTATED_P256_VERIFY, ]; ctx_precompiles.extend(override_precompiles); diff --git a/utils/host/src/block_range.rs b/utils/host/src/block_range.rs index 4f7cf49e..9e646472 100644 --- a/utils/host/src/block_range.rs +++ b/utils/host/src/block_range.rs @@ -18,22 +18,16 @@ pub async fn get_validated_block_range( end: Option, default_range: u64, ) -> Result<(u64, u64)> { - // If safeDB is activated, get the L2 safe head. If not, use the finalized block. - let safe_db_activated = data_fetcher.is_safe_db_activated().await?; - let end_number = if safe_db_activated { - let header = data_fetcher.get_l1_header(BlockId::latest()).await?; - let safe_head_response: SafeHeadResponse = data_fetcher - .fetch_rpc_data_with_mode( - RPCMode::L2Node, - "optimism_safeHeadAtL1Block", - vec![format!("0x{:x}", header.number).into()], - ) - .await?; - safe_head_response.safe_head.number - } else { - let header = data_fetcher.get_l2_header(BlockId::finalized()).await?; - header.number - }; + // Get the latest finalized block number when end block is not provided. + // Even though the safeDB is activated, we use the finalized block number as the + // end block by default to ensure the program doesn't run into L2 Block Validation + // Failure error. + // L2 Block Validation Failure error might still occur. See + // [Troubleshooting](../troubleshooting.md#l2-block-validation-failure) for more details. + let end_number = data_fetcher + .get_l2_header(BlockId::finalized()) + .await? + .number; // If end block not provided, use latest finalized block let l2_end_block = match end { diff --git a/utils/host/src/fetcher.rs b/utils/host/src/fetcher.rs index 9a5cf461..1ffc596d 100644 --- a/utils/host/src/fetcher.rs +++ b/utils/host/src/fetcher.rs @@ -347,11 +347,16 @@ impl OPSuccinctDataFetcher { Ok(fee_data) } - /// Get the aggregate block statistics for a range of blocks. + /// Get the aggregate block statistics for a range of blocks exclusive of the start block. + /// + /// When proving a range in OP Succinct, we are proving the transition from the block hash + /// of the start block to the block hash of the end block. This means that we don't expend resources + /// to "prove" the start block. This is why the start block is not included in the range for which + /// we fetch block data. pub async fn get_l2_block_data_range(&self, start: u64, end: u64) -> Result> { use futures::stream::{self, StreamExt}; - let block_data = stream::iter(start..=end) + let block_data = stream::iter(start + 1..=end) .map(|block_number| async move { let block = self .l2_provider @@ -606,7 +611,7 @@ impl OPSuccinctDataFetcher { pub async fn fetch_headers_in_range(&self, start: u64, end: u64) -> Result> { let headers = stream::iter(start..=end) .map(|block_number| async move { self.get_l1_header(block_number.into()).await }) - .buffered(100) + .buffered(10) .collect::>>() .await .into_iter() diff --git a/utils/host/src/lib.rs b/utils/host/src/lib.rs index 2cab84c7..93a4e625 100644 --- a/utils/host/src/lib.rs +++ b/utils/host/src/lib.rs @@ -8,26 +8,19 @@ pub mod witnessgen; use alloy::sol; use alloy_consensus::Header; use alloy_primitives::B256; +use anyhow::Result; use kona_host::{ kv::{DiskKeyValueStore, MemoryKeyValueStore}, HostCli, }; use op_alloy_genesis::RollupConfig; use op_succinct_client_utils::{ - boot::BootInfoStruct, types::AggregationInputs, BootInfoWithBytesConfig, InMemoryOracle, + boot::BootInfoStruct, types::AggregationInputs, BootInfoWithBytesConfig, BytesHasherBuilder, + InMemoryOracleData, }; +use rkyv::to_bytes; use sp1_sdk::{HashableKey, SP1Proof, SP1Stdin}; -use std::{fs::File, io::Read}; - -use anyhow::Result; - -use rkyv::{ - ser::{ - serializers::{AlignedSerializer, CompositeSerializer, HeapScratch, SharedSerializeMap}, - Serializer, - }, - AlignedVec, -}; +use std::{collections::HashMap, fs::File, io::Read}; sol! { #[allow(missing_docs)] @@ -88,17 +81,15 @@ pub fn get_proof_stdin(host_cli: &HostCli) -> Result { anyhow::anyhow!("Failed to convert DiskKeyValueStore to MemoryKeyValueStore") })?; - let mut serializer = CompositeSerializer::new( - AlignedSerializer::new(AlignedVec::new()), - // Note: This value corresponds to the size of the heap needed to serialize the KV store. - // Increase this value if we start running into serialization issues. - HeapScratch::<268435456>::new(), - SharedSerializeMap::new(), - ); + // Convert the memory KV store to a HashMap<[u8;32], Vec>. + let mut kv_store_map = HashMap::with_hasher(BytesHasherBuilder); + for (k, v) in mem_kv_store.store { + kv_store_map.insert(k.0, v); + } + // Serialize the underlying KV store. - serializer.serialize_value(&InMemoryOracle::from_b256_hashmap(mem_kv_store.store))?; + let buffer = to_bytes::(&InMemoryOracleData { map: kv_store_map })?; - let buffer = serializer.into_serializer().into_inner(); let kv_store_bytes = buffer.into_vec(); stdin.write_slice(&kv_store_bytes); diff --git a/utils/host/src/stats.rs b/utils/host/src/stats.rs index f05432b4..5daf4f39 100644 --- a/utils/host/src/stats.rs +++ b/utils/host/src/stats.rs @@ -3,7 +3,7 @@ use std::fmt; use crate::fetcher::BlockInfo; use num_format::{Locale, ToFormattedString}; use serde::{Deserialize, Serialize}; -use sp1_sdk::{CostEstimator, ExecutionReport}; +use sp1_sdk::ExecutionReport; /// Statistics for the range execution. #[derive(Debug, Clone, Serialize, Deserialize, Default)] @@ -35,6 +35,7 @@ pub struct ExecutionStats { pub bn_mul_cycles: u64, pub kzg_eval_cycles: u64, pub ec_recover_cycles: u64, + pub p256_verify_cycles: u64, } /// Write a statistic to the formatter. @@ -101,6 +102,7 @@ impl fmt::Display for ExecutionStats { write_stat(f, "BN Mul Cycles", self.bn_mul_cycles)?; write_stat(f, "KZG Eval Cycles", self.kzg_eval_cycles)?; write_stat(f, "EC Recover Cycles", self.ec_recover_cycles)?; + write_stat(f, "P256 Verify Cycles", self.p256_verify_cycles)?; writeln!( f, "+--------------------------------+---------------------------+" @@ -127,10 +129,12 @@ impl ExecutionStats { let total_gas_used: u64 = block_data.iter().map(|b| b.gas_used).sum(); Self { - batch_start: block_data[0].block_number, + // The "block data" does not include the first block (as it's not executed), so we need to subtract 1 to give the user back the + // block corresponding to the blockhash they're proving from. + batch_start: block_data[0].block_number - 1, batch_end: block_data[block_data.len() - 1].block_number, total_instruction_count: report.total_instruction_count(), - total_sp1_gas: report.estimate_gas(), + total_sp1_gas: 0, block_execution_instruction_count: get_cycles("block-execution"), oracle_verify_instruction_count: get_cycles("oracle-verify"), derivation_instruction_count: get_cycles("payload-derivation"), @@ -140,6 +144,7 @@ impl ExecutionStats { bn_pair_cycles: get_cycles("precompile-bn-pair"), kzg_eval_cycles: get_cycles("precompile-kzg-eval"), ec_recover_cycles: get_cycles("precompile-ec-recover"), + p256_verify_cycles: get_cycles("precompile-p256-verify"), nb_transactions, eth_gas_used: block_data.iter().map(|b| b.gas_used).sum(), l1_fees: block_data.iter().map(|b| b.total_l1_fees).sum(), @@ -219,7 +224,8 @@ impl fmt::Display for MarkdownExecutionStats { write_stat(f, "BN Add Cycles", self.0.bn_add_cycles)?; write_stat(f, "BN Mul Cycles", self.0.bn_mul_cycles)?; write_stat(f, "KZG Eval Cycles", self.0.kzg_eval_cycles)?; - write_stat(f, "EC Recover Cycles", self.0.ec_recover_cycles) + write_stat(f, "EC Recover Cycles", self.0.ec_recover_cycles)?; + write_stat(f, "P256 Verify Cycles", self.0.p256_verify_cycles) } } @@ -244,6 +250,7 @@ pub struct SpanBatchStats { pub bn_pair_cycles: u64, pub kzg_eval_cycles: u64, pub ec_recover_cycles: u64, + pub p256_verify_cycles: u64, } impl fmt::Display for SpanBatchStats { @@ -280,6 +287,7 @@ impl fmt::Display for SpanBatchStats { write_stat(f, "BN Pair Cycles", self.bn_pair_cycles)?; write_stat(f, "KZG Eval Cycles", self.kzg_eval_cycles)?; write_stat(f, "EC Recover Cycles", self.ec_recover_cycles)?; + write_stat(f, "P256 Verify Cycles", self.p256_verify_cycles)?; writeln!( f, "+-------------------------------+---------------------------+" diff --git a/utils/host/src/witnessgen.rs b/utils/host/src/witnessgen.rs index 0385a0a3..263c4cc3 100644 --- a/utils/host/src/witnessgen.rs +++ b/utils/host/src/witnessgen.rs @@ -56,8 +56,8 @@ pub fn convert_host_cli_to_args(host_cli: &HostCli) -> Vec { args } -/// Default timeout for witness generation. -pub const WITNESSGEN_TIMEOUT: Duration = Duration::from_secs(60 * 20); +/// Set to 12 hours to allow for long witness generation. +pub const WITNESSGEN_TIMEOUT: Duration = Duration::from_secs(60 * 60 * 12); struct WitnessGenProcess { child: tokio::process::Child,