diff --git a/.github/workflows/action_tests.yaml b/.github/workflows/action_tests.yaml
index a90dd32535..64c4b81e4b 100644
--- a/.github/workflows/action_tests.yaml
+++ b/.github/workflows/action_tests.yaml
@@ -16,6 +16,10 @@ jobs:
uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@stable
+ with:
+ components: llvm-tools-preview
+ toolchain: 1.81
+ - uses: taiki-e/install-action@cargo-llvm-cov
- name: Clone monorepo
run: just monorepo
- uses: Swatinem/rust-cache@v2
@@ -31,8 +35,25 @@ jobs:
uses: autero1/action-gotestsum@v2.0.0
with:
gotestsum_version: 1.12.0
+ - name: Setup yq
+ uses: dcarbone/install-yq-action@v1
+ - name: Extract monorepo forge version
+ id: collect-versions
+ run: |
+ echo "forge-version=$(yq '.tools.forge' monorepo/mise.toml | tr -d '\n')" >> $GITHUB_OUTPUT
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- - name: Run Actions Tests
+ with:
+ version: ${{ steps.collect-versions.outputs.forge-version }}
+ - name: Run Action Tests
run: |
+ source <(cargo llvm-cov show-env --export-prefix)
just action-tests
+ cargo llvm-cov report --lcov --output-path actions_cov.lcov
+ - name: Upload coverage to codecov.io
+ uses: codecov/codecov-action@v5
+ with:
+ fail_ci_if_error: true
+ token: ${{ secrets.CODECOV_TOKEN }}
+ env_vars: OS,RUST
+ files: actions_cov.lcov
diff --git a/.github/workflows/book.yaml b/.github/workflows/book.yaml
index 7b2464809c..b1d75c7bae 100644
--- a/.github/workflows/book.yaml
+++ b/.github/workflows/book.yaml
@@ -14,6 +14,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- name: Setup mdbook
run: |
cargo install --version 0.4.40 mdbook
diff --git a/.github/workflows/client_host.yaml b/.github/workflows/client_host.yaml
index faa2b5e133..2e0fbdf8cb 100644
--- a/.github/workflows/client_host.yaml
+++ b/.github/workflows/client_host.yaml
@@ -12,15 +12,19 @@ jobs:
strategy:
matrix:
target: ["native", "asterisc"]
- name: ["OP Sepolia (Granite) - Block #16491249"]
+ name: ["OP Sepolia (Holocene) - Block #22012816"]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: taiki-e/install-action@just
+ - uses: taiki-e/install-action@cargo-llvm-cov
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ components: llvm-tools-preview
+ toolchain: 1.81
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -45,19 +49,19 @@ jobs:
- name: Build `asterisc`
if: "!contains(matrix.target, 'native')"
run: |
- cd asterisc && git checkout v1.1.2 && make build-rvgo
+ cd asterisc && git checkout v1.2.0 && make build-rvgo
mv ./rvgo/bin/asterisc /usr/local/bin/
- name: Set run environment
run: |
- if [[ ${{ contains(matrix.name, 16491249) }} == true ]]; then
- BLOCK_NUMBER=16491249
+ if [[ ${{ contains(matrix.name, 22012816) }} == true ]]; then
+ BLOCK_NUMBER=22012816
echo "BLOCK_NUMBER=$BLOCK_NUMBER" >> $GITHUB_ENV
- echo "L2_CLAIM=0x82da7204148ba4d8d59e587b6b3fdde5561dc31d9e726220f7974bf9f2158d75" >> $GITHUB_ENV
- echo "L2_OUTPUT_ROOT=0xa548f22e1aa590de7ed271e3eab5b66c6c3db9b8cb0e3f91618516ea9ececde4" >> $GITHUB_ENV
- echo "L2_HEAD=0x09b298a83baf4c2e3c6a2e355bb09e27e3fdca435080e8754f8749233d7333b2" >> $GITHUB_ENV
- echo "L1_HEAD=0x33a3e5721faa4dc6f25e75000d9810fd6c41320868f3befcc0c261a71da398e1" >> $GITHUB_ENV
+ echo "L2_CLAIM=0x42ff78e504c207c3786cb30ecb74fe915984b48649165f95bbf6f9248584be69" >> $GITHUB_ENV
+ echo "L2_OUTPUT_ROOT=0x9084f101b85cd1c7c624946feca169768896d88b3ecf4eea3a7760bfceb9cd73" >> $GITHUB_ENV
+ echo "L2_HEAD=0x6a34183664b9ad39de024a8d4077c78abf05198148b6dbfc6e39fbe4a70de299" >> $GITHUB_ENV
+ echo "L1_HEAD=0x02a50d0b5a3226758a6e9b2bdeb5deb5f0779ab55b2b34a52331d0eac48c9389" >> $GITHUB_ENV
echo "L2_CHAIN_ID=11155420" >> $GITHUB_ENV
- echo "WITNESS_TAR_NAME=granite-op-sepolia-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
+ echo "WITNESS_TAR_NAME=holocene-op-sepolia-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
fi
- name: Decompress witness data directory
run: |
@@ -65,6 +69,8 @@ jobs:
- name: Run host + client offline
working-directory: ./bin/client
run: |
+ source <(cargo llvm-cov show-env --export-prefix)
+
mkdir -p ../../target
just run-client-${{ matrix.target }}-offline \
$BLOCK_NUMBER \
@@ -73,3 +79,12 @@ jobs:
$L2_HEAD \
$L1_HEAD \
$L2_CHAIN_ID
+
+ cargo llvm-cov report --lcov --output-path client_host_cov.lcov
+ - name: Upload coverage to codecov.io
+ uses: codecov/codecov-action@v5
+ with:
+ fail_ci_if_error: true
+ token: ${{ secrets.CODECOV_TOKEN }}
+ env_vars: OS,RUST
+ files: client_host_cov.lcov
diff --git a/.github/workflows/monorepo_pin_update.yaml b/.github/workflows/monorepo_pin_update.yaml
index bbcc5641f7..1b95189fc5 100644
--- a/.github/workflows/monorepo_pin_update.yaml
+++ b/.github/workflows/monorepo_pin_update.yaml
@@ -17,6 +17,8 @@ jobs:
token: ${{ secrets.PAT_TOKEN }}
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- name: Update Monorepo Commit
run: just update-monorepo
- name: Create Pull Request
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 81b1e80be8..4b7f5bed84 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -18,6 +18,8 @@ jobs:
submodules: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- name: Commit Cargo.lock
run: |
git config --local user.email "action@github.com"
diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml
index e8addfdb19..537d7c6c4d 100644
--- a/.github/workflows/rust_ci.yaml
+++ b/.github/workflows/rust_ci.yaml
@@ -19,6 +19,8 @@ jobs:
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -70,6 +72,8 @@ jobs:
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -94,6 +98,8 @@ jobs:
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -120,6 +126,8 @@ jobs:
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
@@ -138,9 +146,55 @@ jobs:
- uses: taiki-e/install-action@just
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: 1.81
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: cargo hack
run: just hack
+ coverage:
+ runs-on: ubuntu-latest
+ name: coverage
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: true
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ components: llvm-tools-preview
+ toolchain: 1.81
+ - uses: Swatinem/rust-cache@v2
+ with:
+ cache-on-failure: true
+ - uses: taiki-e/install-action@cargo-llvm-cov
+ - uses: taiki-e/install-action@nextest
+ - name: cargo generate-lockfile
+ if: hashFiles('Cargo.lock') == ''
+ run: cargo generate-lockfile
+ - name: cargo llvm-cov
+ run: |
+ RUST_MIN_STACK=33554432 cargo llvm-cov nextest \
+ --locked \
+ --workspace \
+ --lcov \
+ --output-path lcov.info \
+ --features test-utils \
+ --profile ci \
+ -E '!test(test_online)' && \
+ mv ./target/nextest/ci/junit.xml ./junit.xml
+ - name: Record Rust version
+ run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV"
+ - name: Upload coverage to codecov.io
+ uses: codecov/codecov-action@v5
+ with:
+ fail_ci_if_error: true
+ token: ${{ secrets.CODECOV_TOKEN }}
+ env_vars: OS,RUST
+ files: lcov.info
+ - name: Upload test results to codecov.io
+ if: ${{ !cancelled() }}
+ uses: codecov/test-results-action@v1
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 42cc707b36..ed486344d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,7 @@ monorepo/
# Environment Variables
.env
+.idea
+
# kona-host data-dir
data/
\ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index ea8f2861a9..ee71439508 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 4
+version = 3
[[package]]
name = "addr2line"
@@ -24,10 +24,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if",
- "getrandom",
+ "getrandom 0.2.15",
"once_cell",
"version_check",
- "zerocopy",
+ "zerocopy 0.7.35",
]
[[package]]
@@ -41,28 +41,13 @@ dependencies = [
[[package]]
name = "aligned-vec"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e0966165eaf052580bd70eb1b32cb3d6245774c0104d1b2793e9650bf83b52a"
+checksum = "af15ccceeacb9304119d97925de463bc97ae3555ee8dc8056f67b119f66e5934"
dependencies = [
"equator",
]
-[[package]]
-name = "alloc-no-stdlib"
-version = "2.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
-
-[[package]]
-name = "alloc-stdlib"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
-dependencies = [
- "alloc-no-stdlib",
-]
-
[[package]]
name = "allocator-api2"
version = "0.2.21"
@@ -71,20 +56,20 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "alloy-chains"
-version = "0.1.47"
+version = "0.1.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18c5c520273946ecf715c0010b4e3503d7eba9893cd9ce6b7fff5654c4a3c470"
+checksum = "996564c1782285d4e0299c29b318bc74f24b1d7f456cef3e040810b061ee3256"
dependencies = [
"alloy-primitives",
"num_enum",
- "strum",
+ "strum 0.27.1",
]
[[package]]
name = "alloy-consensus"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ba14856660f31807ebb26ce8f667e814c72694e1077e97ef102e326ad580f3f"
+checksum = "69e32ef5c74bbeb1733c37f4ac7f866f8c8af208b7b4265e21af609dcac5bd5e"
dependencies = [
"alloy-eips",
"alloy-primitives",
@@ -93,16 +78,16 @@ dependencies = [
"alloy-trie",
"auto_impl",
"c-kzg",
- "derive_more",
+ "derive_more 1.0.0",
"k256",
"serde",
]
[[package]]
name = "alloy-consensus-any"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28666307e76441e7af37a2b90cde7391c28112121bea59f4e0d804df8b20057e"
+checksum = "0fa13b7b1e1e3fedc42f0728103bfa3b4d566d3d42b606db449504d88dbdbdcf"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -113,54 +98,58 @@ dependencies = [
]
[[package]]
-name = "alloy-eip2930"
+name = "alloy-eip2124"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41"
+checksum = "675264c957689f0fd75f5993a73123c2cc3b5c235a38f5b9037fe6c826bfb2c0"
dependencies = [
"alloy-primitives",
"alloy-rlp",
- "serde",
+ "crc",
+ "thiserror 2.0.12",
]
[[package]]
-name = "alloy-eip7702"
-version = "0.2.0"
+name = "alloy-eip2930"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eeffd2590ce780ddfaa9d0ae340eb2b4e08627650c4676eef537cef0b4bf535d"
+checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41"
dependencies = [
"alloy-primitives",
"alloy-rlp",
- "k256",
"serde",
]
[[package]]
name = "alloy-eip7702"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e"
+checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c"
dependencies = [
"alloy-primitives",
"alloy-rlp",
- "derive_more",
"k256",
"serde",
+ "thiserror 2.0.12",
]
[[package]]
name = "alloy-eips"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47e922d558006ba371681d484d12aa73fe673d84884f83747730af7433c0e86d"
+checksum = "5591581ca2ab0b3e7226a4047f9a1bfcf431da1d0cce3752fda609fea3c27e37"
dependencies = [
+ "alloy-eip2124",
"alloy-eip2930",
- "alloy-eip7702 0.4.2",
+ "alloy-eip7702",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
+ "auto_impl",
"c-kzg",
- "derive_more",
+ "derive_more 1.0.0",
+ "ethereum_ssz",
+ "ethereum_ssz_derive",
"once_cell",
"serde",
"sha2",
@@ -168,23 +157,23 @@ dependencies = [
[[package]]
name = "alloy-json-rpc"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9335278f50b0273e0a187680ee742bb6b154a948adf036f448575bacc5ccb315"
+checksum = "762414662d793d7aaa36ee3af6928b6be23227df1681ce9c039f6f11daadef64"
dependencies = [
"alloy-primitives",
"alloy-sol-types",
"serde",
"serde_json",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tracing",
]
[[package]]
name = "alloy-network"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad4e6ad4230df8c4a254c20f8d6a84ab9df151bfca13f463177dbc96571cc1f8"
+checksum = "8be03f2ebc00cf88bd06d3c6caf387dceaa9c7e6b268216779fa68a9bf8ab4e6"
dependencies = [
"alloy-consensus",
"alloy-consensus-any",
@@ -202,14 +191,14 @@ dependencies = [
"futures-utils-wasm",
"serde",
"serde_json",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
]
[[package]]
name = "alloy-network-primitives"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4df88a2f8020801e0fefce79471d3946d39ca3311802dbbd0ecfdeee5e972e3"
+checksum = "3a00ce618ae2f78369918be0c20f620336381502c83b6ed62c2f7b2db27698b0"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -220,9 +209,9 @@ dependencies = [
[[package]]
name = "alloy-primitives"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430"
+checksum = "8c66bb6715b7499ea755bde4c96223ae8eb74e05c014ab38b9db602879ffb825"
dependencies = [
"alloy-rlp",
"arbitrary",
@@ -230,10 +219,9 @@ dependencies = [
"cfg-if",
"const-hex",
"derive_arbitrary",
- "derive_more",
+ "derive_more 2.0.1",
"foldhash",
"hashbrown 0.15.2",
- "hex-literal",
"indexmap",
"itoa",
"k256",
@@ -241,9 +229,9 @@ dependencies = [
"paste",
"proptest",
"proptest-derive",
- "rand",
+ "rand 0.8.5",
"ruint",
- "rustc-hash 2.1.0",
+ "rustc-hash 2.1.1",
"serde",
"sha3",
"tiny-keccak",
@@ -251,9 +239,9 @@ dependencies = [
[[package]]
name = "alloy-provider"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5115c74c037714e1b02a86f742289113afa5d494b5ea58308ba8aa378e739101"
+checksum = "cbe0a2acff0c4bd1669c71251ce10fc455cbffa1b4d0a817d5ea4ba7e5bb3db7"
dependencies = [
"alloy-chains",
"alloy-consensus",
@@ -262,35 +250,57 @@ dependencies = [
"alloy-network",
"alloy-network-primitives",
"alloy-primitives",
+ "alloy-pubsub",
"alloy-rpc-client",
"alloy-rpc-types-eth",
+ "alloy-sol-types",
"alloy-transport",
"alloy-transport-http",
+ "alloy-transport-ipc",
+ "alloy-transport-ws",
"async-stream",
"async-trait",
"auto_impl",
"dashmap",
"futures",
"futures-utils-wasm",
- "lru",
+ "lru 0.13.0",
"parking_lot",
"pin-project",
"reqwest",
- "schnellru",
"serde",
"serde_json",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"url",
"wasmtimer",
]
+[[package]]
+name = "alloy-pubsub"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de3a68996f193f542f9e29c88dfa8ed1369d6ee04fa764c1bf23dc11b2f9e4a2"
+dependencies = [
+ "alloy-json-rpc",
+ "alloy-primitives",
+ "alloy-transport",
+ "bimap",
+ "futures",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tokio-stream",
+ "tower",
+ "tracing",
+]
+
[[package]]
name = "alloy-rlp"
-version = "0.3.9"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f"
+checksum = "3d6c1d995bff8d011f7cd6c81820d51825e6e06d6db73914c1630ecf544d83d6"
dependencies = [
"alloy-rlp-derive",
"arrayvec",
@@ -299,25 +309,28 @@ dependencies = [
[[package]]
name = "alloy-rlp-derive"
-version = "0.3.9"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f"
+checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "alloy-rpc-client"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c6a0bd0ce5660ac48e4f3bb0c7c5c3a94db287a0be94971599d83928476cbcd"
+checksum = "b37cc3c7883dc41be1b01460127ad7930466d0a4bb6ba15a02ee34d2745e2d7c"
dependencies = [
"alloy-json-rpc",
"alloy-primitives",
+ "alloy-pubsub",
"alloy-transport",
"alloy-transport-http",
+ "alloy-transport-ipc",
+ "alloy-transport-ws",
"futures",
"pin-project",
"reqwest",
@@ -333,9 +346,9 @@ dependencies = [
[[package]]
name = "alloy-rpc-types"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "374ac12e35bb90ebccd86e7c943ddba9590149a6e35cc4d9cd860d6635fd1018"
+checksum = "6f18e68a3882f372e045ddc89eb455469347767d17878ca492cfbac81e71a111"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-debug",
@@ -346,9 +359,9 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-any"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea98f81bcd759dbfa3601565f9d7a02220d8ef1d294ec955948b90aaafbfd857"
+checksum = "318ae46dd12456df42527c3b94c1ae9001e1ceb707f7afe2c7807ac4e49ebad9"
dependencies = [
"alloy-consensus-any",
"alloy-rpc-types-eth",
@@ -357,24 +370,23 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-beacon"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e13e94be8f6f5cb735e604f9db436430bf3773fdd41db7221edaa58c07c4c8a"
+checksum = "799103aa44270c7bea076ec5d3d7b6c6d29557ab5485c91a74d3068327adb485"
dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types-engine",
- "alloy-serde",
"serde",
"serde_with",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
]
[[package]]
name = "alloy-rpc-types-debug"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fd14f68a482e67dfba52d404dfff1d3b0d9fc3b4775bd0923f3175d7661c3bd"
+checksum = "2834b7012054cb2f90ee9893b7cc97702edca340ec1ef386c30c42e55e6cd691"
dependencies = [
"alloy-primitives",
"serde",
@@ -382,25 +394,27 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-engine"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ca5898f753ff0d15a0dc955c169523d8fee57e05bb5a38a398b3451b0b988be"
+checksum = "e83dde9fcf1ccb9b815cc0c89bba26bbbbaae5150a53ae624ed0fc63cb3676c1"
dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
- "derive_more",
+ "derive_more 1.0.0",
+ "ethereum_ssz",
+ "ethereum_ssz_derive",
"serde",
- "strum",
+ "strum 0.26.3",
]
[[package]]
name = "alloy-rpc-types-eth"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e518b0a7771e00728f18be0708f828b18a1cfc542a7153bef630966a26388e0"
+checksum = "8b4dbee4d82f8a22dde18c28257bed759afeae7ba73da4a1479a039fd1445d04"
dependencies = [
"alloy-consensus",
"alloy-consensus-any",
@@ -410,17 +424,17 @@ dependencies = [
"alloy-rlp",
"alloy-serde",
"alloy-sol-types",
- "derive_more",
- "itertools 0.13.0",
+ "itertools 0.14.0",
"serde",
"serde_json",
+ "thiserror 2.0.12",
]
[[package]]
name = "alloy-serde"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed3dc8d4a08ffc90c1381d39a4afa2227668259a42c97ab6eecf51cbd82a8761"
+checksum = "8732058f5ca28c1d53d241e8504620b997ef670315d7c8afab856b3e3b80d945"
dependencies = [
"alloy-primitives",
"serde",
@@ -429,37 +443,38 @@ dependencies = [
[[package]]
name = "alloy-signer"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16188684100f6e0f2a2b949968fe3007749c5be431549064a1bce4e7b3a196a9"
+checksum = "f96b3526fdd779a4bd0f37319cfb4172db52a7ac24cdbb8804b72091c18e1701"
dependencies = [
"alloy-primitives",
"async-trait",
"auto_impl",
+ "either",
"elliptic-curve",
"k256",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
]
[[package]]
name = "alloy-sol-macro"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a"
+checksum = "c7f9c3c7bc1f4e334e5c5fc59ec8dac894973a71b11da09065affc6094025049"
dependencies = [
"alloy-sol-macro-expander",
"alloy-sol-macro-input",
"proc-macro-error2",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "alloy-sol-macro-expander"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f"
+checksum = "46ff7aa715eb2404cb87fa94390d2c5d5addd70d9617e20b2398ee6f48cb21f0"
dependencies = [
"alloy-sol-macro-input",
"const-hex",
@@ -468,31 +483,31 @@ dependencies = [
"proc-macro-error2",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
"syn-solidity",
"tiny-keccak",
]
[[package]]
name = "alloy-sol-macro-input"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee"
+checksum = "6f105fa700140c0cc6e2c3377adef650c389ac57b8ead8318a2e6bd52f1ae841"
dependencies = [
"const-hex",
"dunce",
"heck",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
"syn-solidity",
]
[[package]]
name = "alloy-sol-types"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8"
+checksum = "5f819635439ebb06aa13c96beac9b2e7360c259e90f5160a6848ae0d94d10452"
dependencies = [
"alloy-primitives",
"alloy-sol-macro",
@@ -501,17 +516,16 @@ dependencies = [
[[package]]
name = "alloy-transport"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "628be5b9b75e4f4c4f2a71d985bbaca4f23de356dc83f1625454c505f5eef4df"
+checksum = "5a8d762eadce3e9b65eac09879430c6f4fce3736cac3cac123f9b1bf435ddd13"
dependencies = [
"alloy-json-rpc",
"base64",
- "futures-util",
"futures-utils-wasm",
"serde",
"serde_json",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tower",
"tracing",
@@ -521,9 +535,9 @@ dependencies = [
[[package]]
name = "alloy-transport-http"
-version = "0.8.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e24412cf72f79c95cd9b1d9482e3a31f9d94c24b43c4b3b710cc8d4341eaab0"
+checksum = "20819c4cb978fb39ce6ac31991ba90f386d595f922f42ef888b4a18be190713e"
dependencies = [
"alloy-json-rpc",
"alloy-transport",
@@ -534,16 +548,54 @@ dependencies = [
"url",
]
+[[package]]
+name = "alloy-transport-ipc"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e88304aa8b796204e5e2500dfe235933ed692745e3effd94c3733643db6d218"
+dependencies = [
+ "alloy-json-rpc",
+ "alloy-pubsub",
+ "alloy-transport",
+ "bytes",
+ "futures",
+ "interprocess",
+ "pin-project",
+ "serde",
+ "serde_json",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "alloy-transport-ws"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9653ea9aa06d0e02fcbe2f04f1c47f35a85c378ccefa98e54ae85210bc8bbfa"
+dependencies = [
+ "alloy-pubsub",
+ "alloy-transport",
+ "futures",
+ "http",
+ "rustls",
+ "serde_json",
+ "tokio",
+ "tokio-tungstenite",
+ "tracing",
+ "ws_stream_wasm",
+]
+
[[package]]
name = "alloy-trie"
-version = "0.7.6"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b"
+checksum = "d95a94854e420f07e962f7807485856cde359ab99ab6413883e15235ad996e8b"
dependencies = [
"alloy-primitives",
"alloy-rlp",
"arrayvec",
- "derive_more",
+ "derive_more 1.0.0",
"nybbles",
"serde",
"smallvec",
@@ -597,19 +649,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.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
+checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
[[package]]
name = "arbitrary"
@@ -617,6 +670,39 @@ version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+[[package]]
+name = "ark-bn254"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc"
+dependencies = [
+ "ark-ec",
+ "ark-ff 0.5.0",
+ "ark-std 0.5.0",
+]
+
+[[package]]
+name = "ark-ec"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce"
+dependencies = [
+ "ahash",
+ "ark-ff 0.5.0",
+ "ark-poly",
+ "ark-serialize 0.5.0",
+ "ark-std 0.5.0",
+ "educe",
+ "fnv",
+ "hashbrown 0.15.2",
+ "itertools 0.13.0",
+ "num-bigint",
+ "num-integer",
+ "num-traits",
+ "rayon",
+ "zeroize",
+]
+
[[package]]
name = "ark-ff"
version = "0.3.0"
@@ -655,6 +741,27 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "ark-ff"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70"
+dependencies = [
+ "ark-ff-asm 0.5.0",
+ "ark-ff-macros 0.5.0",
+ "ark-serialize 0.5.0",
+ "ark-std 0.5.0",
+ "arrayvec",
+ "digest 0.10.7",
+ "educe",
+ "itertools 0.13.0",
+ "num-bigint",
+ "num-traits",
+ "paste",
+ "rayon",
+ "zeroize",
+]
+
[[package]]
name = "ark-ff-asm"
version = "0.3.0"
@@ -675,6 +782,16 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "ark-ff-asm"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60"
+dependencies = [
+ "quote",
+ "syn 2.0.99",
+]
+
[[package]]
name = "ark-ff-macros"
version = "0.3.0"
@@ -700,6 +817,35 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "ark-ff-macros"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09be120733ee33f7693ceaa202ca41accd5653b779563608f1234f78ae07c4b3"
+dependencies = [
+ "num-bigint",
+ "num-traits",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "ark-poly"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27"
+dependencies = [
+ "ahash",
+ "ark-ff 0.5.0",
+ "ark-serialize 0.5.0",
+ "ark-std 0.5.0",
+ "educe",
+ "fnv",
+ "hashbrown 0.15.2",
+ "rayon",
+]
+
[[package]]
name = "ark-serialize"
version = "0.3.0"
@@ -721,6 +867,31 @@ dependencies = [
"num-bigint",
]
+[[package]]
+name = "ark-serialize"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7"
+dependencies = [
+ "ark-serialize-derive",
+ "ark-std 0.5.0",
+ "arrayvec",
+ "digest 0.10.7",
+ "num-bigint",
+ "rayon",
+]
+
+[[package]]
+name = "ark-serialize-derive"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
[[package]]
name = "ark-std"
version = "0.3.0"
@@ -728,7 +899,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c"
dependencies = [
"num-traits",
- "rand",
+ "rand 0.8.5",
]
[[package]]
@@ -738,7 +909,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185"
dependencies = [
"num-traits",
- "rand",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "ark-std"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a"
+dependencies = [
+ "num-traits",
+ "rand 0.8.5",
+ "rayon",
]
[[package]]
@@ -781,18 +963,29 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "async-trait"
-version = "0.1.83"
+version = "0.1.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
+checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "async_io_stream"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c"
+dependencies = [
+ "futures",
+ "pharos",
+ "rustc_version 0.4.1",
]
[[package]]
@@ -803,9 +996,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "aurora-engine-modexp"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5"
+checksum = "518bc5745a6264b5fd7b09dffb9667e400ee9e2bbe18555fac75e1fe9afa0df9"
dependencies = [
"hex",
"num",
@@ -813,13 +1006,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.99",
]
[[package]]
@@ -861,13 +1054,19 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+[[package]]
+name = "bimap"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7"
+
[[package]]
name = "bindgen"
version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
@@ -878,23 +1077,23 @@ dependencies = [
"regex",
"rustc-hash 1.1.0",
"shlex",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "bit-set"
-version = "0.5.3"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
dependencies = [
"bit-vec",
]
[[package]]
name = "bit-vec"
-version = "0.6.3"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
name = "bitflags"
@@ -904,9 +1103,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.6.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "bitvec"
@@ -931,9 +1130,9 @@ dependencies = [
[[package]]
name = "blst"
-version = "0.3.13"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874"
+checksum = "47c79a94619fade3c0b887670333513a67ac28a6a7e653eb260bf0d4103db38d"
dependencies = [
"cc",
"glob",
@@ -941,44 +1140,23 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "brotli"
-version = "7.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
- "brotli-decompressor",
-]
-
-[[package]]
-name = "brotli-decompressor"
-version = "4.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
-]
-
[[package]]
name = "bumpalo"
-version = "3.16.0"
+version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "byte-slice-cast"
-version = "1.2.2"
+version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c"
+checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d"
[[package]]
name = "bytecheck"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50c8f430744b23b54ad15161fcbc22d82a29b73eacbe425fea23ec822600bc6f"
+checksum = "50690fb3370fb9fe3550372746084c46f2ac8c9685c583d2be10eefd89d3d1a3"
dependencies = [
"bytecheck_derive",
"ptr_meta",
@@ -988,20 +1166,20 @@ dependencies = [
[[package]]
name = "bytecheck_derive"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523363cbe1df49b68215efdf500b103ac3b0fb4836aed6d15689a076eadb8fff"
+checksum = "efb7846e0cb180355c2dec69e721edafa36919850f1a9f52ffba4ebc0393cb71"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "bytemuck"
-version = "1.20.0"
+version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
+checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
[[package]]
name = "byteorder"
@@ -1011,21 +1189,20 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
+checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9"
dependencies = [
"serde",
]
[[package]]
name = "bzip2-sys"
-version = "0.1.11+1.0.8"
+version = "0.1.13+1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
dependencies = [
"cc",
- "libc",
"pkg-config",
]
@@ -1052,9 +1229,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.2.2"
+version = "1.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
+checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
dependencies = [
"jobserver",
"libc",
@@ -1078,9 +1255,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
-version = "0.4.38"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
dependencies = [
"num-traits",
"serde",
@@ -1126,9 +1303,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.22"
+version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b"
+checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1136,9 +1313,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.22"
+version = "4.5.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1"
+checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
dependencies = [
"anstream",
"anstyle",
@@ -1148,21 +1325,21 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.18"
+version = "4.5.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
+checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "clap_lex"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
@@ -1198,6 +1375,26 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+[[package]]
+name = "const_format"
+version = "0.2.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd"
+dependencies = [
+ "const_format_proc_macros",
+]
+
+[[package]]
+name = "const_format_proc_macros"
+version = "0.2.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
[[package]]
name = "core-foundation"
version = "0.9.4"
@@ -1225,13 +1422,28 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.16"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
[[package]]
name = "criterion"
version = "0.5.1"
@@ -1268,11 +1480,20 @@ dependencies = [
"itertools 0.10.5",
]
+[[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",
@@ -1289,15 +1510,15 @@ 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"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
[[package]]
name = "crypto-bigint"
@@ -1306,7 +1527,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
"generic-array",
- "rand_core",
+ "rand_core 0.6.4",
"subtle",
"zeroize",
]
@@ -1342,7 +1563,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -1353,7 +1574,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -1370,6 +1591,12 @@ dependencies = [
"parking_lot_core",
]
+[[package]]
+name = "data-encoding"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010"
+
[[package]]
name = "debugid"
version = "0.8.0"
@@ -1417,7 +1644,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -1426,7 +1653,16 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05"
dependencies = [
- "derive_more-impl",
+ "derive_more-impl 1.0.0",
+]
+
+[[package]]
+name = "derive_more"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678"
+dependencies = [
+ "derive_more-impl 2.0.1",
]
[[package]]
@@ -1437,7 +1673,19 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
+ "unicode-xid",
+]
+
+[[package]]
+name = "derive_more-impl"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
"unicode-xid",
]
@@ -1470,9 +1718,15 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
+[[package]]
+name = "doctest-file"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562"
+
[[package]]
name = "dunce"
version = "1.0.5"
@@ -1481,9 +1735,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]]
name = "dyn-clone"
-version = "1.0.17"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
+checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005"
[[package]]
name = "ecdsa"
@@ -1499,11 +1753,37 @@ dependencies = [
"spki",
]
+[[package]]
+name = "educe"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417"
+dependencies = [
+ "enum-ordinalize",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "eigen-da"
+version = "0.1.0"
+dependencies = [
+ "alloy-primitives",
+ "alloy-rlp",
+ "bytes",
+ "hex",
+ "kona-derive",
+ "rust-kzg-bn254-primitives",
+ "serde_json",
+ "tracing",
+]
+
[[package]]
name = "either"
-version = "1.13.0"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
[[package]]
name = "elliptic-curve"
@@ -1518,7 +1798,7 @@ dependencies = [
"generic-array",
"group",
"pkcs8",
- "rand_core",
+ "rand_core 0.6.4",
"sec1",
"subtle",
"zeroize",
@@ -1533,6 +1813,26 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "enum-ordinalize"
+version = "4.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5"
+dependencies = [
+ "enum-ordinalize-derive",
+]
+
+[[package]]
+name = "enum-ordinalize-derive"
+version = "4.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
[[package]]
name = "enumn"
version = "0.1.14"
@@ -1541,34 +1841,34 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "equator"
-version = "0.2.2"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c35da53b5a021d2484a7cc49b2ac7f2d840f8236a286f84202369bd338d761ea"
+checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc"
dependencies = [
"equator-macro",
]
[[package]]
name = "equator-macro"
-version = "0.2.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bf679796c0322556351f287a51b49e48f7c4986e727b5dd78c972d30e2e16cc"
+checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "equivalent"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
@@ -1580,11 +1880,51 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "ethereum_serde_utils"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70cbccfccf81d67bff0ab36e591fa536c8a935b078a7b0e58c1d00d418332fc9"
+dependencies = [
+ "alloy-primitives",
+ "hex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+]
+
+[[package]]
+name = "ethereum_ssz"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86da3096d1304f5f28476ce383005385459afeaf0eea08592b65ddbc9b258d16"
+dependencies = [
+ "alloy-primitives",
+ "ethereum_serde_utils",
+ "itertools 0.13.0",
+ "serde",
+ "serde_derive",
+ "smallvec",
+ "typenum",
+]
+
+[[package]]
+name = "ethereum_ssz_derive"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d832a5c38eba0e7ad92592f7a22d693954637fbb332b4f669590d66a5c3183e5"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
[[package]]
name = "event-listener"
-version = "5.3.1"
+version = "5.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba"
+checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae"
dependencies = [
"concurrent-queue",
"parking",
@@ -1603,9 +1943,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"
@@ -1618,13 +1958,24 @@ dependencies = [
"bytes",
]
+[[package]]
+name = "fastrlp"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4"
+dependencies = [
+ "arrayvec",
+ "auto_impl",
+ "bytes",
+]
+
[[package]]
name = "ff"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
- "rand_core",
+ "rand_core 0.6.4",
"subtle",
]
@@ -1647,7 +1998,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534"
dependencies = [
"byteorder",
- "rand",
+ "rand 0.8.5",
"rustc-hex",
"static_assertions",
]
@@ -1660,9 +2011,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"
@@ -1750,7 +2101,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -1765,6 +2116,12 @@ 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"
+
[[package]]
name = "futures-util"
version = "0.3.31"
@@ -1808,7 +2165,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.13.3+wasi-0.2.2",
+ "windows-targets",
]
[[package]]
@@ -1819,9 +2188,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
name = "glob"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
[[package]]
name = "group"
@@ -1830,15 +2199,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff",
- "rand_core",
+ "rand_core 0.6.4",
"subtle",
]
[[package]]
name = "h2"
-version = "0.4.7"
+version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
+checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2"
dependencies = [
"atomic-waker",
"bytes",
@@ -1863,12 +2232,6 @@ dependencies = [
"crunchy",
]
-[[package]]
-name = "hashbrown"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
-
[[package]]
name = "hashbrown"
version = "0.14.5"
@@ -1914,12 +2277,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "hex-literal"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
-
[[package]]
name = "hmac"
version = "0.12.1"
@@ -1965,15 +2322,15 @@ dependencies = [
[[package]]
name = "httparse"
-version = "1.9.5"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
name = "hyper"
-version = "1.5.1"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
+checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
dependencies = [
"bytes",
"futures-channel",
@@ -1991,9 +2348,9 @@ 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",
@@ -2156,7 +2513,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -2203,14 +2560,14 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "indexmap"
-version = "2.7.0"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
+checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
dependencies = [
"arbitrary",
"equivalent",
@@ -2236,21 +2593,36 @@ dependencies = [
"str_stack",
]
+[[package]]
+name = "interprocess"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "894148491d817cb36b6f778017b8ac46b17408d522dd90f539d677ea938362eb"
+dependencies = [
+ "doctest-file",
+ "futures-core",
+ "libc",
+ "recvmsg",
+ "tokio",
+ "widestring",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "ipnet"
-version = "2.10.1"
+version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
+checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
[[package]]
name = "is-terminal"
-version = "0.4.13"
+version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
+checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37"
dependencies = [
"hermit-abi 0.4.0",
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -2286,11 +2658,20 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itoa"
-version = "1.0.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "jobserver"
@@ -2303,9 +2684,9 @@ 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",
@@ -2362,7 +2743,7 @@ dependencies = [
"kona-proof",
"kona-std-fpvm",
"kona-std-fpvm-proc",
- "lru",
+ "lru 0.12.5",
"op-alloy-consensus",
"op-alloy-genesis",
"op-alloy-protocol",
@@ -2371,13 +2752,13 @@ dependencies = [
"serde",
"serde_json",
"spin",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tracing",
]
[[package]]
name = "kona-derive"
-version = "0.2.0"
+version = "0.2.3"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -2385,15 +2766,20 @@ dependencies = [
"alloy-rlp",
"alloy-rpc-types-engine",
"async-trait",
+ "bytes",
+ "hex",
+ "log",
+ "miniz_oxide",
"op-alloy-consensus",
"op-alloy-genesis",
"op-alloy-protocol",
- "op-alloy-registry",
"op-alloy-rpc-types-engine",
"proptest",
+ "prost",
+ "rlp 0.6.1",
"serde_json",
"spin",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"tracing-subscriber",
@@ -2401,18 +2787,20 @@ dependencies = [
[[package]]
name = "kona-driver"
-version = "0.2.0"
+version = "0.2.3"
dependencies = [
"alloy-consensus",
"alloy-primitives",
"alloy-rlp",
"async-trait",
"kona-derive",
+ "kona-executor",
"op-alloy-consensus",
"op-alloy-genesis",
"op-alloy-protocol",
"op-alloy-rpc-types-engine",
- "thiserror 2.0.4",
+ "spin",
+ "thiserror 2.0.12",
"tracing",
]
@@ -2423,20 +2811,27 @@ dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
+ "alloy-provider",
"alloy-rlp",
+ "alloy-rpc-client",
"alloy-rpc-types-engine",
- "anyhow",
+ "alloy-transport",
+ "alloy-transport-http",
+ "alloy-trie",
"criterion",
+ "kona-host",
"kona-mpt",
"op-alloy-consensus",
"op-alloy-genesis",
"op-alloy-rpc-types-engine",
"pprof",
- "rand",
+ "rand 0.8.5",
"revm",
+ "rstest",
"serde",
"serde_json",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
+ "tokio",
"tracing",
]
@@ -2455,21 +2850,29 @@ dependencies = [
"alloy-serde",
"alloy-transport-http",
"anyhow",
+ "ark-bn254",
+ "ark-ff 0.5.0",
"async-trait",
"clap",
+ "eigen-da",
"kona-client",
"kona-derive",
"kona-mpt",
"kona-preimage",
"kona-proof",
+ "kona-providers-alloy",
"kona-std-fpvm",
+ "num",
"op-alloy-genesis",
+ "op-alloy-network",
"op-alloy-protocol",
"op-alloy-rpc-types-engine",
"proptest",
"reqwest",
"revm",
"rocksdb",
+ "rust-kzg-bn254-primitives",
+ "rust-kzg-bn254-prover",
"serde",
"serde_json",
"tokio",
@@ -2492,10 +2895,10 @@ dependencies = [
"criterion",
"pprof",
"proptest",
- "rand",
+ "rand 0.8.5",
"reqwest",
"serde",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tracing-subscriber",
]
@@ -2509,39 +2912,64 @@ dependencies = [
"async-trait",
"rkyv",
"serde",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
[[package]]
name = "kona-proof"
-version = "0.2.0"
+version = "0.2.3"
dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"async-trait",
+ "eigen-da",
"kona-derive",
"kona-driver",
"kona-executor",
"kona-mpt",
"kona-preimage",
- "lru",
+ "lru 0.12.5",
"op-alloy-consensus",
"op-alloy-genesis",
"op-alloy-protocol",
- "op-alloy-registry",
"op-alloy-rpc-types-engine",
"serde",
"serde_json",
"spin",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
+[[package]]
+name = "kona-providers-alloy"
+version = "0.1.0"
+dependencies = [
+ "alloy-consensus",
+ "alloy-eips",
+ "alloy-primitives",
+ "alloy-provider",
+ "alloy-rlp",
+ "alloy-rpc-types-beacon",
+ "alloy-serde",
+ "alloy-transport",
+ "async-trait",
+ "eigen-da",
+ "kona-derive",
+ "lru 0.12.5",
+ "op-alloy-consensus",
+ "op-alloy-genesis",
+ "op-alloy-protocol",
+ "reqwest",
+ "serde",
+ "thiserror 2.0.12",
+ "tokio",
+]
+
[[package]]
name = "kona-std-fpvm"
version = "0.1.1"
@@ -2550,7 +2978,7 @@ dependencies = [
"cfg-if",
"kona-preimage",
"linked_list_allocator",
- "thiserror 2.0.4",
+ "thiserror 2.0.12",
"tracing",
]
@@ -2563,7 +2991,7 @@ dependencies = [
"kona-std-fpvm",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -2583,9 +3011,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
-version = "0.2.167"
+version = "0.2.170"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
+checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
[[package]]
name = "libloading"
@@ -2619,9 +3047,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",
"pkg-config",
@@ -2639,15 +3067,15 @@ 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"
-version = "0.7.4"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
name = "lock_api"
@@ -2661,9 +3089,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.22"
+version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "lru"
@@ -2674,6 +3102,15 @@ dependencies = [
"hashbrown 0.15.2",
]
+[[package]]
+name = "lru"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465"
+dependencies = [
+ "hashbrown 0.15.2",
+]
+
[[package]]
name = "memchr"
version = "2.7.4"
@@ -2703,9 +3140,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.0"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
"adler2",
]
@@ -2717,35 +3154,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
dependencies = [
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.52.0",
]
[[package]]
name = "munge"
-version = "0.4.1"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64142d38c84badf60abf06ff9bd80ad2174306a5b11bd4706535090a30a419df"
+checksum = "a0091202c98cf06da46c279fdf50cccb6b1c43b4521abdf6a27b4c7e71d5d9d7"
dependencies = [
"munge_macro",
]
[[package]]
name = "munge_macro"
-version = "0.4.1"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bb5c1d8184f13f7d0ccbeeca0def2f9a181bce2624302793005f5ca8aa62e5e"
+checksum = "734799cf91479720b2f970c61a22850940dd91e27d4f02b1c6fc792778df2459"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "native-tls"
-version = "0.2.12"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
+checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
dependencies = [
"libc",
"log",
@@ -2906,14 +3343,14 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "nybbles"
-version = "0.2.1"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23"
+checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307"
dependencies = [
"const-hex",
"serde",
@@ -2922,18 +3359,18 @@ 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",
]
[[package]]
name = "once_cell"
-version = "1.20.2"
+version = "1.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
[[package]]
name = "oorandom"
@@ -2943,25 +3380,23 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9"
[[package]]
name = "op-alloy-consensus"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24aaf487dd59beed72931e31b11b305cdcb6a20651a1cccf992a20706a54cc3b"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
- "derive_more",
+ "derive_more 1.0.0",
"serde",
- "thiserror 2.0.4",
+ "spin",
]
[[package]]
name = "op-alloy-genesis"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42ad6c33c2711611e19092a7d17c076542e27687ef975f67bf57039fa3d57e06"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -2969,71 +3404,82 @@ dependencies = [
"alloy-sol-types",
"serde",
"serde_repr",
- "thiserror 2.0.4",
+]
+
+[[package]]
+name = "op-alloy-network"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
+dependencies = [
+ "alloy-consensus",
+ "alloy-network",
+ "alloy-primitives",
+ "alloy-rpc-types-eth",
+ "alloy-signer",
+ "op-alloy-consensus",
+ "op-alloy-rpc-types",
]
[[package]]
name = "op-alloy-protocol"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccb98f90d0101cdaabb739c44f4d4b2d0ad0ad1a3dd68ce525683ffafd97dd13"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
dependencies = [
- "alloc-no-stdlib",
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
"async-trait",
- "brotli",
- "cfg-if",
- "miniz_oxide",
+ "derive_more 1.0.0",
"op-alloy-consensus",
"op-alloy-genesis",
"serde",
- "thiserror 2.0.4",
"tracing",
"unsigned-varint",
]
[[package]]
-name = "op-alloy-registry"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "892a3b296687acf306d2a25f96bf542f55b10ca741ae92b2ebdd492dd41e48b3"
+name = "op-alloy-rpc-types"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
dependencies = [
+ "alloy-consensus",
+ "alloy-eips",
+ "alloy-network-primitives",
"alloy-primitives",
- "lazy_static",
- "op-alloy-genesis",
+ "alloy-rpc-types-eth",
+ "alloy-serde",
+ "derive_more 1.0.0",
+ "op-alloy-consensus",
"serde",
"serde_json",
]
[[package]]
name = "op-alloy-rpc-types-engine"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c63ba3f50dba410d1ce18aa16242c198f91ad44da5221f7347c1525958a9b09"
+version = "0.6.5"
+source = "git+https://github.com/mantle-xyz/op-alloy?branch=alloy-0.11.1#8d6fee26f2530f4d2b1745448c63ac1d05202247"
dependencies = [
"alloy-eips",
"alloy-primitives",
"alloy-rpc-types-engine",
"alloy-serde",
- "derive_more",
+ "derive_more 1.0.0",
+ "ethereum_ssz",
"op-alloy-consensus",
- "op-alloy-genesis",
"op-alloy-protocol",
"serde",
- "thiserror 2.0.4",
+ "snap",
]
[[package]]
name = "openssl"
-version = "0.10.68"
+version = "0.10.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
+checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"cfg-if",
"foreign-types",
"libc",
@@ -3050,20 +3496,20 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "openssl-probe"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "openssl-sys"
-version = "0.9.104"
+version = "0.9.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
+checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd"
dependencies = [
"cc",
"libc",
@@ -3091,28 +3537,30 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.6.12"
+version = "3.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
+checksum = "c9fde3d0718baf5bc92f577d652001da0f8d54cd03a7974e118d04fc888dc23d"
dependencies = [
"arrayvec",
"bitvec",
"byte-slice-cast",
+ "const_format",
"impl-trait-for-tuples",
"parity-scale-codec-derive",
+ "rustversion",
"serde",
]
[[package]]
name = "parity-scale-codec-derive"
-version = "3.6.12"
+version = "3.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
+checksum = "581c837bb6b9541ce7faa9377c20616e4fb7650f6b0f68bc93c827ee504fb7b3"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.99",
]
[[package]]
@@ -3158,40 +3606,50 @@ 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.12",
"ucd-trie",
]
+[[package]]
+name = "pharos"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414"
+dependencies = [
+ "futures",
+ "rustc_version 0.4.1",
+]
+
[[package]]
name = "pin-project"
-version = "1.1.7"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95"
+checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.7"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
+checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[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"
@@ -3211,9 +3669,9 @@ dependencies = [
[[package]]
name = "pkg-config"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "plotters"
@@ -3278,7 +3736,7 @@ version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
- "zerocopy",
+ "zerocopy 0.7.35",
]
[[package]]
@@ -3329,31 +3787,31 @@ dependencies = [
"proc-macro-error-attr2",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "proc-macro2"
-version = "1.0.92"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
[[package]]
name = "proptest"
-version = "1.5.0"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d"
+checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50"
dependencies = [
"bit-set",
"bit-vec",
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"lazy_static",
"num-traits",
- "rand",
- "rand_chacha",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
"rand_xorshift",
"regex-syntax",
"rusty-fork",
@@ -3363,13 +3821,36 @@ dependencies = [
[[package]]
name = "proptest-derive"
-version = "0.5.0"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "prost"
+version = "0.13.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5"
+dependencies = [
+ "bytes",
+ "prost-derive",
+]
+
+[[package]]
+name = "prost-derive"
+version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77"
+checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"
dependencies = [
+ "anyhow",
+ "itertools 0.14.0",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -3389,7 +3870,7 @@ checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -3409,9 +3890,9 @@ dependencies = [
[[package]]
name = "quote"
-version = "1.0.37"
+version = "1.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801"
dependencies = [
"proc-macro2",
]
@@ -3438,11 +3919,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha",
- "rand_core",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
"serde",
]
+[[package]]
+name = "rand"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
+dependencies = [
+ "rand_chacha 0.9.0",
+ "rand_core 0.9.3",
+ "zerocopy 0.8.21",
+]
+
[[package]]
name = "rand_chacha"
version = "0.3.1"
@@ -3450,7 +3942,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.9.3",
]
[[package]]
@@ -3459,7 +3961,16 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "getrandom",
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
+dependencies = [
+ "getrandom 0.3.1",
]
[[package]]
@@ -3468,7 +3979,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
dependencies = [
- "rand_core",
+ "rand_core 0.6.4",
]
[[package]]
@@ -3491,13 +4002,19 @@ dependencies = [
"crossbeam-utils",
]
+[[package]]
+name = "recvmsg"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175"
+
[[package]]
name = "redox_syscall"
-version = "0.5.7"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -3529,6 +4046,12 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+[[package]]
+name = "relative-path"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2"
+
[[package]]
name = "rend"
version = "0.5.2"
@@ -3540,9 +4063,9 @@ dependencies = [
[[package]]
name = "reqwest"
-version = "0.12.9"
+version = "0.12.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
+checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
dependencies = [
"base64",
"bytes",
@@ -3569,10 +4092,11 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
- "sync_wrapper 1.0.2",
+ "sync_wrapper",
"system-configuration",
"tokio",
"tokio-native-tls",
+ "tower",
"tower-service",
"url",
"wasm-bindgen",
@@ -3583,24 +4107,23 @@ dependencies = [
[[package]]
name = "revm"
-version = "16.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34e44692d5736cc44c697a372e507890f8797f06d1541c5f4b9bec594d90fd8a"
+version = "17.0.0"
+source = "git+https://github.com/mantle-xyz/revm?branch=dev#9a355b02deb81dc367f8d764af2e4f3dd8fc8c4b"
dependencies = [
"auto_impl",
"cfg-if",
"dyn-clone",
"revm-interpreter",
"revm-precompile",
+ "revm-primitives",
"serde",
"serde_json",
]
[[package]]
name = "revm-interpreter"
-version = "12.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f89940d17d5d077570de1977f52f69049595322e237cb6c754c3d47f668f023"
+version = "13.0.0"
+source = "git+https://github.com/mantle-xyz/revm?branch=dev#9a355b02deb81dc367f8d764af2e4f3dd8fc8c4b"
dependencies = [
"revm-primitives",
"serde",
@@ -3608,9 +4131,8 @@ dependencies = [
[[package]]
name = "revm-precompile"
-version = "13.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8f816aaea3245cbdbe7fdd84955df33597f9322c7912c3e3ba7bc855e03211f"
+version = "14.0.0"
+source = "git+https://github.com/mantle-xyz/revm?branch=dev#9a355b02deb81dc367f8d764af2e4f3dd8fc8c4b"
dependencies = [
"aurora-engine-modexp",
"blst",
@@ -3628,15 +4150,14 @@ dependencies = [
[[package]]
name = "revm-primitives"
-version = "12.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "532411bbde45a46707c1d434dcdc29866cf261c1b748fb01b303ce3b4310b361"
+version = "13.0.0"
+source = "git+https://github.com/mantle-xyz/revm?branch=dev#9a355b02deb81dc367f8d764af2e4f3dd8fc8c4b"
dependencies = [
"alloy-eip2930",
- "alloy-eip7702 0.2.0",
+ "alloy-eip7702",
"alloy-primitives",
"auto_impl",
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"bitvec",
"c-kzg",
"cfg-if",
@@ -3667,15 +4188,14 @@ dependencies = [
[[package]]
name = "ring"
-version = "0.17.8"
+version = "0.17.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
+checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73"
dependencies = [
"cc",
"cfg-if",
- "getrandom",
+ "getrandom 0.2.15",
"libc",
- "spin",
"untrusted",
"windows-sys 0.52.0",
]
@@ -3691,9 +4211,9 @@ dependencies = [
[[package]]
name = "rkyv"
-version = "0.8.9"
+version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b11a153aec4a6ab60795f8ebe2923c597b16b05bb1504377451e705ef1a45323"
+checksum = "1e147371c75553e1e2fcdb483944a8540b8438c31426279553b9a8182a9b7b65"
dependencies = [
"bytecheck",
"bytes",
@@ -3710,13 +4230,13 @@ dependencies = [
[[package]]
name = "rkyv_derive"
-version = "0.8.9"
+version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "beb382a4d9f53bd5c0be86b10d8179c3f8a14c30bf774ff77096ed6581e35981"
+checksum = "246b40ac189af6c675d124b802e8ef6d5246c53e17367ce9501f8f66a81abb7a"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -3729,6 +4249,16 @@ dependencies = [
"rustc-hex",
]
+[[package]]
+name = "rlp"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa24e92bb2a83198bb76d661a71df9f7076b8c420b8696e4d3d97d50d94479e3"
+dependencies = [
+ "bytes",
+ "rustc-hex",
+]
+
[[package]]
name = "rocksdb"
version = "0.22.0"
@@ -3739,25 +4269,57 @@ dependencies = [
"librocksdb-sys",
]
+[[package]]
+name = "rstest"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03e905296805ab93e13c1ec3a03f4b6c4f35e9498a3d5fa96dc626d22c03cd89"
+dependencies = [
+ "futures-timer",
+ "futures-util",
+ "rstest_macros",
+ "rustc_version 0.4.1",
+]
+
+[[package]]
+name = "rstest_macros"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef0053bbffce09062bee4bcc499b0fbe7a57b879f1efe088d6d8d4c7adcdef9b"
+dependencies = [
+ "cfg-if",
+ "glob",
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "relative-path",
+ "rustc_version 0.4.1",
+ "syn 2.0.99",
+ "unicode-ident",
+]
+
[[package]]
name = "ruint"
-version = "1.12.3"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286"
+checksum = "825df406ec217a8116bd7b06897c6cc8f65ffefc15d030ae2c9540acc9ed50b6"
dependencies = [
"alloy-rlp",
"arbitrary",
"ark-ff 0.3.0",
"ark-ff 0.4.2",
"bytes",
- "fastrlp",
+ "fastrlp 0.3.1",
+ "fastrlp 0.4.0",
"num-bigint",
+ "num-integer",
"num-traits",
"parity-scale-codec",
"primitive-types",
"proptest",
- "rand",
- "rlp",
+ "rand 0.8.5",
+ "rlp 0.5.2",
"ruint-macro",
"serde",
"valuable",
@@ -3770,6 +4332,39 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18"
+[[package]]
+name = "rust-kzg-bn254-primitives"
+version = "0.1.0"
+source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=b3e532e9aad533009849755d5ad7b9578a16bfb2#b3e532e9aad533009849755d5ad7b9578a16bfb2"
+dependencies = [
+ "ark-bn254",
+ "ark-ec",
+ "ark-ff 0.5.0",
+ "ark-poly",
+ "ark-serialize 0.5.0",
+ "ark-std 0.5.0",
+ "num-traits",
+ "sha2",
+ "thiserror 2.0.12",
+]
+
+[[package]]
+name = "rust-kzg-bn254-prover"
+version = "0.1.0"
+source = "git+https://github.com/Layr-Labs/rust-kzg-bn254?rev=b3e532e9aad533009849755d5ad7b9578a16bfb2#b3e532e9aad533009849755d5ad7b9578a16bfb2"
+dependencies = [
+ "ark-bn254",
+ "ark-ec",
+ "ark-ff 0.5.0",
+ "ark-poly",
+ "ark-std 0.5.0",
+ "crossbeam-channel",
+ "num-traits",
+ "num_cpus",
+ "rayon",
+ "rust-kzg-bn254-primitives",
+]
+
[[package]]
name = "rustc-demangle"
version = "0.1.24"
@@ -3784,9 +4379,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
-version = "2.1.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "rustc-hex"
@@ -3809,29 +4404,30 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
- "semver 1.0.23",
+ "semver 1.0.26",
]
[[package]]
name = "rustix"
-version = "0.38.41"
+version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"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.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
+checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
dependencies = [
"once_cell",
+ "ring",
"rustls-pki-types",
"rustls-webpki",
"subtle",
@@ -3849,9 +4445,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
[[package]]
name = "rustls-webpki"
@@ -3866,9 +4462,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.18"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "rusty-fork"
@@ -3884,9 +4480,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.18"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "same-file"
@@ -3906,17 +4502,6 @@ dependencies = [
"windows-sys 0.59.0",
]
-[[package]]
-name = "schnellru"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367"
-dependencies = [
- "ahash",
- "cfg-if",
- "hashbrown 0.13.2",
-]
-
[[package]]
name = "scopeguard"
version = "1.2.0"
@@ -3943,7 +4528,7 @@ version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113"
dependencies = [
- "rand",
+ "rand 0.8.5",
"secp256k1-sys",
]
@@ -3962,7 +4547,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"core-foundation",
"core-foundation-sys",
"libc",
@@ -3971,9 +4556,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",
@@ -3990,9 +4575,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.23"
+version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
[[package]]
name = "semver-parser"
@@ -4003,31 +4588,37 @@ dependencies = [
"pest",
]
+[[package]]
+name = "send_wrapper"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
+
[[package]]
name = "serde"
-version = "1.0.215"
+version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.215"
+version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "serde_json"
-version = "1.0.133"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"indexmap",
"itoa",
@@ -4038,13 +4629,13 @@ dependencies = [
[[package]]
name = "serde_repr"
-version = "0.1.19"
+version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -4061,9 +4652,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",
"chrono",
@@ -4077,14 +4668,25 @@ 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.99",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.7",
]
[[package]]
@@ -4149,7 +4751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest 0.10.7",
- "rand_core",
+ "rand_core 0.6.4",
]
[[package]]
@@ -4169,13 +4771,19 @@ dependencies = [
[[package]]
name = "smallvec"
-version = "1.13.2"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
dependencies = [
"serde",
]
+[[package]]
+name = "snap"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b"
+
[[package]]
name = "socket2"
version = "0.5.8"
@@ -4244,7 +4852,16 @@ version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
dependencies = [
- "strum_macros",
+ "strum_macros 0.26.4",
+]
+
+[[package]]
+name = "strum"
+version = "0.27.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32"
+dependencies = [
+ "strum_macros 0.27.1",
]
[[package]]
@@ -4257,7 +4874,20 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.90",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.27.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.99",
]
[[package]]
@@ -4269,7 +4899,7 @@ dependencies = [
"byteorder",
"crunchy",
"lazy_static",
- "rand",
+ "rand 0.8.5",
"rustc-hex",
]
@@ -4281,9 +4911,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "symbolic-common"
-version = "12.12.3"
+version = "12.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5ba5365997a4e375660bed52f5b42766475d5bc8ceb1bb13fea09c469ea0f49"
+checksum = "b6189977df1d6ec30c920647919d76f29fb8d8f25e8952e835b0fcda25e8f792"
dependencies = [
"debugid",
"memmap2",
@@ -4293,9 +4923,9 @@ dependencies = [
[[package]]
name = "symbolic-demangle"
-version = "12.12.3"
+version = "12.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "beff338b2788519120f38c59ff4bb15174f52a183e547bac3d6072c2c0aa48aa"
+checksum = "d234917f7986498e7f62061438cee724bafb483fe84cfbe2486f68dce48240d7"
dependencies = [
"cpp_demangle",
"rustc-demangle",
@@ -4315,9 +4945,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.90"
+version = "2.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
+checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2"
dependencies = [
"proc-macro2",
"quote",
@@ -4326,22 +4956,16 @@ dependencies = [
[[package]]
name = "syn-solidity"
-version = "0.8.15"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0"
+checksum = "ac9f9798a84bca5cd4d1760db691075fda8f2c3a5d9647e8bfd29eb9b3fabb87"
dependencies = [
"paste",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
-[[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"
@@ -4359,7 +4983,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -4368,7 +4992,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
dependencies = [
- "bitflags 2.6.0",
+ "bitflags 2.9.0",
"core-foundation",
"system-configuration-sys",
]
@@ -4391,12 +5015,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
-version = "3.14.0"
+version = "3.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
+checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230"
dependencies = [
"cfg-if",
"fastrand",
+ "getrandom 0.3.1",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@@ -4413,11 +5038,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.4"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
- "thiserror-impl 2.0.4",
+ "thiserror-impl 2.0.12",
]
[[package]]
@@ -4428,18 +5053,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.4"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -4511,9 +5136,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
+checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
dependencies = [
"tinyvec_macros",
]
@@ -4526,9 +5151,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",
@@ -4544,13 +5169,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.99",
]
[[package]]
@@ -4565,20 +5190,19 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.26.0"
+version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"
dependencies = [
"rustls",
- "rustls-pki-types",
"tokio",
]
[[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",
@@ -4586,6 +5210,22 @@ dependencies = [
"tokio-util",
]
+[[package]]
+name = "tokio-tungstenite"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084"
+dependencies = [
+ "futures-util",
+ "log",
+ "rustls",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls",
+ "tungstenite",
+ "webpki-roots",
+]
+
[[package]]
name = "tokio-util"
version = "0.7.13"
@@ -4607,9 +5247,9 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
[[package]]
name = "toml_edit"
-version = "0.22.22"
+version = "0.22.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
+checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
dependencies = [
"indexmap",
"toml_datetime",
@@ -4618,14 +5258,15 @@ 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",
]
@@ -4661,7 +5302,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -4705,11 +5346,30 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+[[package]]
+name = "tungstenite"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13"
+dependencies = [
+ "bytes",
+ "data-encoding",
+ "http",
+ "httparse",
+ "log",
+ "rand 0.9.0",
+ "rustls",
+ "rustls-pki-types",
+ "sha1",
+ "thiserror 2.0.12",
+ "utf-8",
+]
+
[[package]]
name = "typenum"
-version = "1.17.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "ucd-trie"
@@ -4737,9 +5397,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
[[package]]
name = "unicode-ident"
-version = "1.0.14"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-xid"
@@ -4770,6 +5430,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
[[package]]
name = "utf16_iter"
version = "1.0.5"
@@ -4790,15 +5456,15 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
-version = "1.11.0"
+version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587"
[[package]]
name = "valuable"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "vcpkg"
@@ -4814,9 +5480,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wait-timeout"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11"
dependencies = [
"libc",
]
@@ -4846,37 +5512,46 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+[[package]]
+name = "wasi"
+version = "0.13.3+wasi-0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
+dependencies = [
+ "wit-bindgen-rt",
+]
+
[[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.99",
"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",
@@ -4887,9 +5562,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",
@@ -4897,22 +5572,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.99",
"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 = "wasmtimer"
@@ -4930,14 +5608,29 @@ 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",
]
+[[package]]
+name = "webpki-roots"
+version = "0.26.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9"
+dependencies = [
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "widestring"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -5083,13 +5776,22 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
-version = "0.6.20"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
+checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
dependencies = [
"memchr",
]
+[[package]]
+name = "wit-bindgen-rt"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+dependencies = [
+ "bitflags 2.9.0",
+]
+
[[package]]
name = "write16"
version = "1.0.0"
@@ -5102,6 +5804,25 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+[[package]]
+name = "ws_stream_wasm"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5"
+dependencies = [
+ "async_io_stream",
+ "futures",
+ "js-sys",
+ "log",
+ "pharos",
+ "rustc_version 0.4.1",
+ "send_wrapper",
+ "thiserror 1.0.69",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
[[package]]
name = "wyz"
version = "0.5.1"
@@ -5131,7 +5852,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
"synstructure",
]
@@ -5142,7 +5863,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
- "zerocopy-derive",
+ "zerocopy-derive 0.7.35",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcf01143b2dd5d134f11f545cf9f1431b13b749695cb33bcce051e7568f99478"
+dependencies = [
+ "zerocopy-derive 0.8.21",
]
[[package]]
@@ -5153,27 +5883,38 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712c8386f4f4299382c9abee219bee7084f78fb939d88b6840fcc1320d5f6da2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.99",
]
[[package]]
name = "zerofrom"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
"synstructure",
]
@@ -5194,7 +5935,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
[[package]]
@@ -5216,5 +5957,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn 2.0.99",
]
diff --git a/Cargo.toml b/Cargo.toml
index 61fbd43d98..1db8929a36 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,21 +3,21 @@ edition = "2021"
license = "MIT"
rust-version = "1.81"
authors = ["clabby", "refcell"]
-homepage = "https://github.com/anton-rs/kona"
-repository = "https://github.com/anton-rs/kona"
+homepage = "https://github.com/op-rs/kona"
+repository = "https://github.com/op-rs/kona"
keywords = ["ethereum", "optimism", "crypto"]
categories = ["cryptography", "cryptography::cryptocurrencies"]
exclude = ["**/target"]
[workspace]
members = [
- "crates/derive",
- "crates/driver",
- "crates/executor",
- "crates/mpt",
- "crates/proof-sdk/*",
- "bin/*"
-]
+ "crates/derive",
+ "crates/driver",
+ "crates/executor",
+ "crates/mpt",
+ "crates/providers-alloy",
+ "crates/proof-sdk/*",
+ "bin/*", "crates/eigen-da", ]
default-members = ["bin/host", "bin/client"]
# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021
@@ -62,75 +62,108 @@ lto = "fat"
[workspace.dependencies]
# Workspace
-kona-mpt = { path = "crates/mpt", version = "0.1.1", default-features = false }
+kona-host = { path = "bin/host", version = "0.1.0", default-features = false }
kona-client = { path = "bin/client", version = "0.1.0", default-features = false }
-kona-derive = { path = "crates/derive", version = "0.2.0", default-features = false }
-kona-driver = { path = "crates/driver", version = "0.2.0", default-features = false }
+kona-mpt = { path = "crates/mpt", version = "0.1.1", default-features = false }
+kona-derive = { path = "crates/derive", version = "0.2.3", default-features = false }
+kona-driver = { path = "crates/driver", version = "0.2.3", default-features = false }
+kona-providers-alloy = { path = "crates/providers-alloy", version = "0.1.0", default-features = false }
kona-executor = { path = "crates/executor", version = "0.2.0", default-features = false }
-kona-proof = { path = "crates/proof-sdk/proof", version = "0.2.0", default-features = false }
+kona-proof = { path = "crates/proof-sdk/proof", version = "0.2.3", default-features = false }
kona-std-fpvm = { path = "crates/proof-sdk/std-fpvm", version = "0.1.1", default-features = false }
kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.0", default-features = false }
kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.1", default-features = false }
+eigen-da = { path = "crates/eigen-da" , version = "0.1.0", default-features = false }
+
# Alloy
-alloy-rlp = { version = "0.3.9", default-features = false }
-alloy-trie = { version = "0.7.4", default-features = false }
-alloy-eips = { version = "0.8.0", default-features = false }
-alloy-serde = { version = "0.8.0", default-features = false }
-alloy-provider = { version = "0.8.0", default-features = false }
-alloy-consensus = { version = "0.8.0", default-features = false }
-alloy-transport = { version = "0.8.0", default-features = false }
-alloy-rpc-types = { version = "0.8.0", default-features = false }
-alloy-rpc-client = { version = "0.8.0", default-features = false }
-alloy-primitives = { version = "0.8.14", default-features = false }
-alloy-node-bindings = { version = "0.8.0", default-features = false }
-alloy-transport-http = { version = "0.8.0", default-features = false }
-alloy-rpc-types-engine = { version = "0.8.0", default-features = false }
-alloy-rpc-types-beacon = { version = "0.8.0", default-features = false }
+alloy-rlp = { version = "0.3.11", default-features = false }
+alloy-trie = { version = "0.7.9", default-features = false }
+alloy-eips = { version = "0.11.1", default-features = false }
+alloy-serde = { version = "0.11.1", default-features = false }
+alloy-provider = { version = "0.11.1", default-features = false }
+alloy-consensus = { version = "0.11.1", default-features = false }
+alloy-transport = { version = "0.11.1", default-features = false }
+alloy-rpc-types = { version = "0.11.1", default-features = false }
+alloy-rpc-client = { version = "0.11.1", default-features = false }
+alloy-primitives = { version = "0.8.21", default-features = false }
+alloy-node-bindings = { version = "0.11.1", default-features = false }
+alloy-transport-http = { version = "0.11.1", default-features = false }
+alloy-rpc-types-engine = { version = "0.11.1", default-features = false }
+alloy-rpc-types-beacon = { version = "0.11.1", default-features = false }
+alloy-sol-types = { version = "0.8.19", default-features = false }
# OP Alloy
-op-alloy-genesis = { version = "0.8.2", default-features = false }
-op-alloy-registry = { version = "0.8.2", default-features = false }
-op-alloy-protocol = { version = "0.8.2", default-features = false }
-op-alloy-consensus = { version = "0.8.2", default-features = false }
-op-alloy-rpc-types-engine = { version = "0.8.2", default-features = false }
+#op-alloy-genesis = { version = "0.5.2", default-features = false }
+#op-alloy-protocol = { version = "0.5.2", default-features = false }
+#op-alloy-consensus = { version = "0.5.2", default-features = false }
+#op-alloy-rpc-types-engine = { version = "0.5.2", default-features = false }
+
+# Mantle Alloy
+op-alloy-genesis = { git = "https://github.com/mantle-xyz/op-alloy", branch = "alloy-0.11.1" }
+op-alloy-protocol = { git = "https://github.com/mantle-xyz/op-alloy", branch = "alloy-0.11.1" }
+op-alloy-consensus = { git = "https://github.com/mantle-xyz/op-alloy", branch = "alloy-0.11.1" }
+op-alloy-rpc-types-engine = { git = "https://github.com/mantle-xyz/op-alloy", branch = "alloy-0.11.1" }
+op-alloy-network = { git = "https://github.com/mantle-xyz/op-alloy", branch = "alloy-0.11.1" }
+
+
+
# General
-lru = "0.12.4"
+lru = "0.12.5"
spin = "0.9.8"
rand = "0.8.5"
-clap = "4.5.19"
+clap = "4.5.24"
tokio = "1.42.0"
async-channel = "2.3.1"
cfg-if = "1.0.0"
-reqwest = "0.12.9"
-async-trait = "0.1.83"
+reqwest = "0.12.12"
+async-trait = "0.1.85"
linked_list_allocator = "0.10.5"
+rstest = "0.24.0"
# General
sha2 = { version = "0.10.8", default-features = false }
c-kzg = { version = "2.0.0", default-features = false }
-anyhow = { version = "1.0.93", default-features = false }
-thiserror = { version = "2.0.4", default-features = false }
+anyhow = { version = "1.0.95", default-features = false }
+thiserror = { version = "2.0.9", default-features = false }
# Tracing
tracing-loki = "0.2.5"
tracing-subscriber = "0.3.19"
tracing = { version = "0.1.41", default-features = false }
+# Encoding
+miniz_oxide = "0.8.0"
+brotli = { version = "7.0.0", default-features = false }
+
# Testing
pprof = "0.14.0"
-proptest = "1.5.0"
+proptest = "1.6.0"
criterion = "0.5.1"
# Serialization
rkyv = "0.8.9"
-serde = { version = "1.0.215", default-features = false }
-serde_json = { version = "1.0.133", default-features = false }
+serde = { version = "1.0.217", default-features = false }
+serde_json = { version = "1.0.135", default-features = false }
# Ethereum
unsigned-varint = "0.8.0"
-revm = { version = "16.0.0", default-features = false }
+revm = { git = "https://github.com/mantle-xyz/revm", branch = "dev", default-features = false }
# K/V database
rocksdb = { version = "0.22.0", default-features = false }
+
+# proto
+prost = "0.13.3"
+bytes = "1.8.0"
+hex = "0.4.3"
+rlp = "0.6.1"
+
+#eigenlayer
+rust-kzg-bn254-primitives = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "b3e532e9aad533009849755d5ad7b9578a16bfb2", default-features = false }
+rust-kzg-bn254-prover = { git = "https://github.com/Layr-Labs/rust-kzg-bn254", rev = "b3e532e9aad533009849755d5ad7b9578a16bfb2", default-features = false }
+
+ark-bn254 = "0.5.0"
+ark-ff = { version = "0.5.0", features = ["parallel"] }
+num = "0.4"
diff --git a/README.md b/README.md
index adf8a1d749..4a0d9d55b9 100644
--- a/README.md
+++ b/README.md
@@ -7,17 +7,17 @@
-
-
-
+
+
+
-
+
What's Kona? •
Overview •
- Contributing •
+ Contributing •
Credits
@@ -37,7 +37,7 @@ program! Kona is also used by:
- [`op-succinct`][op-succinct]
To build your own backend for kona, or build a new application on top of its libraries,
-see the [SDK section of the book](https://anton-rs.github.io/kona/sdk/intro.html).
+see the [SDK section of the book](https://op-rs.github.io/kona/sdk/intro.html).
### Development Status
@@ -53,7 +53,8 @@ see the [SDK section of the book](https://anton-rs.github.io/kona/sdk/intro.html
**Build Pipelines**
- [`cannon`](./build/cannon): Docker image for compiling to the bare-metal `mips-unknown-none` target.
-- [`asterisc`](./build/asterisc): Docker image for compiling to the bare-metal `riscv64gc-unknown-none-elf` target.
+- [`asterisc`](./build/asterisc): Docker image for compiling to the bare-metal `riscv64imac-unknown-none-elf` target.
+
**Protocol**
- [`mpt`](./crates/mpt): Utilities for interacting with the Merkle Patricia Trie in the client program.
@@ -83,11 +84,11 @@ getting started with building your own programs, and a reference for the librari
[op-stack]: https://github.com/ethereum-optimism/optimism
[op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon
-[cannon-rs]: https://github.com/anton-rs/cannon-rs
+[cannon-rs]: https://github.com/op-rs/cannon-rs
[badboi-cannon-rs]: https://github.com/BadBoiLabs/cannon-rs
[asterisc]: https://github.com/etheruem-optimism/asterisc
[fpp-specs]: https://specs.optimism.io/experimental/fault-proof/index.html
-[book]: https://anton-rs.github.io/kona/
+[book]: https://op-rs.github.io/kona/
[op-succinct]: https://github.com/succinctlabs/op-succinct
[op-labs]: https://github.com/ethereum-optimism
[bad-boi-labs]: https://github.com/BadBoiLabs
diff --git a/bin/client/justfile b/bin/client/justfile
index 5bd260a295..4964c3aa99 100644
--- a/bin/client/justfile
+++ b/bin/client/justfile
@@ -14,7 +14,7 @@ run-client-asterisc block_number l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc ver
OP_NODE_ADDRESS="{{rollup_node_rpc}}"
HOST_BIN_PATH="./target/release/kona-host"
- CLIENT_BIN_PATH="./target/riscv64gc-unknown-none-elf/release-client-lto/kona"
+ CLIENT_BIN_PATH="./target/riscv64imac-unknown-none-elf/release-client-lto/kona"
STATE_PATH="./state.bin.gz"
CLAIMED_L2_BLOCK_NUMBER={{block_number}}
@@ -140,7 +140,7 @@ run-client-asterisc-offline block_number l2_claim l2_output_root l2_head l1_head
#!/usr/bin/env bash
HOST_BIN_PATH="./target/release/kona-host"
- CLIENT_BIN_PATH="./target/riscv64gc-unknown-none-elf/release-client-lto/kona"
+ CLIENT_BIN_PATH="./target/riscv64imac-unknown-none-elf/release-client-lto/kona"
STATE_PATH="./state.bin.gz"
CLAIMED_L2_BLOCK_NUMBER={{block_number}}
diff --git a/bin/client/src/kona.rs b/bin/client/src/kona.rs
index cf166c1424..2e91cd30e4 100644
--- a/bin/client/src/kona.rs
+++ b/bin/client/src/kona.rs
@@ -39,7 +39,7 @@ fn main() -> Result<(), String> {
.expect("Failed to set tracing subscriber");
}
- kona_proof::block_on(kona_client::run(
+ kona_proof::block_on(kona_client::single::run(
ORACLE_READER,
HINT_WRITER,
Some(precompiles::fpvm_handle_register),
diff --git a/bin/client/src/lib.rs b/bin/client/src/lib.rs
index 83c4c70cd3..c15be9de25 100644
--- a/bin/client/src/lib.rs
+++ b/bin/client/src/lib.rs
@@ -7,173 +7,4 @@
extern crate alloc;
-use alloc::sync::Arc;
-use alloy_consensus::{Header, Sealed};
-use alloy_primitives::B256;
-use core::fmt::Debug;
-use kona_driver::{Driver, DriverError};
-use kona_executor::{ExecutorError, KonaHandleRegister, TrieDBProvider};
-use kona_preimage::{
- CommsClient, HintWriterClient, PreimageKey, PreimageKeyType, PreimageOracleClient,
-};
-use kona_proof::{
- errors::OracleProviderError,
- executor::KonaExecutor,
- l1::{OracleBlobProvider, OracleL1ChainProvider, OraclePipeline},
- l2::OracleL2ChainProvider,
- sync::new_pipeline_cursor,
- BootInfo, CachingOracle, HintType,
-};
-use thiserror::Error;
-use tracing::{error, info, warn};
-
-/// An error that can occur when running the fault proof program.
-#[derive(Error, Debug)]
-pub enum FaultProofProgramError {
- /// The claim is invalid.
- #[error("Invalid claim. Expected {0}, actual {1}")]
- InvalidClaim(B256, B256),
- /// An error occurred in the Oracle provider.
- #[error(transparent)]
- OracleProviderError(#[from] OracleProviderError),
- /// An error occurred in the driver.
- #[error(transparent)]
- Driver(#[from] DriverError),
-}
-
-/// Executes the fault proof program with the given [PreimageOracleClient] and [HintWriterClient].
-#[inline]
-pub async fn run(
- oracle_client: P,
- hint_client: H,
- handle_register: Option<
- KonaHandleRegister<
- OracleL2ChainProvider>,
- OracleL2ChainProvider>,
- >,
- >,
-) -> Result<(), FaultProofProgramError>
-where
- P: PreimageOracleClient + Send + Sync + Debug + Clone,
- H: HintWriterClient + Send + Sync + Debug + Clone,
-{
- const ORACLE_LRU_SIZE: usize = 1024;
-
- ////////////////////////////////////////////////////////////////
- // PROLOGUE //
- ////////////////////////////////////////////////////////////////
-
- let oracle = Arc::new(CachingOracle::new(ORACLE_LRU_SIZE, oracle_client, hint_client));
- let boot = match BootInfo::load(oracle.as_ref()).await {
- Ok(boot) => Arc::new(boot),
- Err(e) => {
- error!(target: "client", "Failed to load boot info: {:?}", e);
- return Err(e.into());
- }
- };
- let mut l1_provider = OracleL1ChainProvider::new(boot.clone(), oracle.clone());
- let mut l2_provider = OracleL2ChainProvider::new(boot.clone(), oracle.clone());
- let beacon = OracleBlobProvider::new(oracle.clone());
-
- // If the claimed L2 block number is less than the safe head of the L2 chain, the claim is
- // invalid.
- let safe_head = fetch_safe_head(oracle.as_ref(), boot.as_ref(), &mut l2_provider).await?;
- if boot.claimed_l2_block_number < safe_head.number {
- error!(
- target: "client",
- "Claimed L2 block number {claimed} is less than the safe head {safe}",
- claimed = boot.claimed_l2_block_number,
- safe = safe_head.number
- );
- return Err(FaultProofProgramError::InvalidClaim(
- boot.agreed_l2_output_root,
- boot.claimed_l2_output_root,
- ));
- }
-
- // In the case where the agreed upon L2 output root is the same as the claimed L2 output root,
- // trace extension is detected and we can skip the derivation and execution steps.
- if boot.agreed_l2_output_root == boot.claimed_l2_output_root {
- info!(
- target: "client",
- "Trace extension detected. State transition is already agreed upon.",
- );
- return Ok(());
- }
-
- ////////////////////////////////////////////////////////////////
- // DERIVATION & EXECUTION //
- ////////////////////////////////////////////////////////////////
-
- // Create a new derivation driver with the given boot information and oracle.
- let cursor = new_pipeline_cursor(&boot, safe_head, &mut l1_provider, &mut l2_provider).await?;
- 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 = KonaExecutor::new(&cfg, l2_provider.clone(), l2_provider, handle_register, None);
- let mut driver = Driver::new(cursor, executor, pipeline);
-
- // Run the derivation pipeline until we are able to produce the output root of the claimed
- // L2 block.
- let (number, output_root) =
- driver.advance_to_target(&boot.rollup_config, Some(boot.claimed_l2_block_number)).await?;
-
- ////////////////////////////////////////////////////////////////
- // EPILOGUE //
- ////////////////////////////////////////////////////////////////
-
- if output_root != boot.claimed_l2_output_root {
- error!(
- target: "client",
- "Failed to validate L2 block #{number} with output root {output_root}",
- number = number,
- output_root = output_root
- );
- return Err(FaultProofProgramError::InvalidClaim(output_root, boot.claimed_l2_output_root));
- }
-
- info!(
- target: "client",
- "Successfully validated L2 block #{number} with output root {output_root}",
- number = number,
- output_root = output_root
- );
-
- Ok(())
-}
-
-/// Fetches the safe head of the L2 chain based on the agreed upon L2 output root in the
-/// [BootInfo].
-async fn fetch_safe_head(
- caching_oracle: &O,
- boot_info: &BootInfo,
- l2_chain_provider: &mut OracleL2ChainProvider,
-) -> Result, OracleProviderError>
-where
- O: CommsClient,
-{
- caching_oracle
- .write(&HintType::StartingL2Output.encode_with(&[boot_info.agreed_l2_output_root.as_ref()]))
- .await
- .map_err(OracleProviderError::Preimage)?;
- let mut output_preimage = [0u8; 128];
- caching_oracle
- .get_exact(
- PreimageKey::new(*boot_info.agreed_l2_output_root, PreimageKeyType::Keccak256),
- &mut output_preimage,
- )
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- let safe_hash =
- output_preimage[96..128].try_into().map_err(OracleProviderError::SliceConversion)?;
- l2_chain_provider
- .header_by_hash(safe_hash)
- .map(|header| Sealed::new_unchecked(header, safe_hash))
-}
+pub mod single;
diff --git a/bin/client/src/precompiles/bls12_g1_add.rs b/bin/client/src/precompiles/bls12_g1_add.rs
new file mode 100644
index 0000000000..17ee6d3f13
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_g1_add.rs
@@ -0,0 +1,81 @@
+//! Contains the accelerated precompile for the BLS12-381 curve G1 Point Addition.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/g1_add.rs
+
+use crate::precompiles::utils::precompile_run;
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The address of the BLS12-381 g1 addition check precompile.
+///
+/// See:
+const BLS12_G1_ADD_CHECK: Address = address!("0x000000000000000000000000000000000000000b");
+
+/// Input length of G1 Addition operation.
+const INPUT_LENGTH: usize = 256;
+
+/// Base gas fee for the BLS12-381 g1 addition operation.
+const G1_ADD_BASE_FEE: u64 = 375;
+
+/// The address of the BLS12-381 g1 addition precompile.
+pub(crate) const FPVM_BLS12_G1_ADD_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_G1_ADD_CHECK, Precompile::Standard(fpvm_bls12_g1_add));
+
+/// Performs an FPVM-accelerated BLS12-381 G1 addition check.
+///
+/// Notice, there is no input size limit for this precompile.
+/// See:
+fn fpvm_bls12_g1_add(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if G1_ADD_BASE_FEE > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ let input_len = input.len();
+ if input_len != INPUT_LENGTH {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G1 addition input length should be multiple of {INPUT_LENGTH}, was {input_len}"
+ ))
+ .into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_G1_ADD_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(G1_ADD_BASE_FEE, result_data.into()))
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_g1_add_input_len() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH + 1]);
+ let err = PrecompileError::Other(alloc::format!(
+ "G1 addition input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ INPUT_LENGTH + 1
+ ));
+ assert_eq!(fpvm_bls12_g1_add(&input, G1_ADD_BASE_FEE), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g1_add_out_of_gas() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH * 2]);
+ assert_eq!(
+ fpvm_bls12_g1_add(&input, G1_ADD_BASE_FEE - 1),
+ Err(PrecompileError::OutOfGas.into())
+ );
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_g1_msm.rs b/bin/client/src/precompiles/bls12_g1_msm.rs
new file mode 100644
index 0000000000..db8106a387
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_g1_msm.rs
@@ -0,0 +1,122 @@
+//! Contains the accelerated precompile for the BLS12-381 curve G1 MSM.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/g1_msm.rs
+
+use crate::precompiles::utils::{msm_required_gas, precompile_run};
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The maximum input size for the BLS12-381 g1 msm operation after the Isthmus Hardfork.
+///
+/// See:
+const BLS12_MAX_G1_MSM_SIZE_ISTHMUS: usize = 513760;
+
+/// The address of the BLS12-381 g1 msm check precompile.
+///
+/// See:
+const BLS12_G1_MSM_CHECK: Address = address!("0x000000000000000000000000000000000000000c");
+
+/// Input length of g1 msm operation.
+const INPUT_LENGTH: usize = 160;
+
+/// Base gas fee for the BLS12-381 g1 msm operation.
+const G1_MSM_BASE_FEE: u64 = 12000;
+
+/// The address of the BLS12-381 g1 msm precompile.
+pub(crate) const FPVM_BLS12_G1_MSM_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_G1_MSM_CHECK, Precompile::Standard(fpvm_bls12_g1_msm_isthmus));
+
+/// Discounts table for G1 MSM as a vector of pairs `[k, discount]`.
+static DISCOUNT_TABLE: [u16; 128] = [
+ 1000, 949, 848, 797, 764, 750, 738, 728, 719, 712, 705, 698, 692, 687, 682, 677, 673, 669, 665,
+ 661, 658, 654, 651, 648, 645, 642, 640, 637, 635, 632, 630, 627, 625, 623, 621, 619, 617, 615,
+ 613, 611, 609, 608, 606, 604, 603, 601, 599, 598, 596, 595, 593, 592, 591, 589, 588, 586, 585,
+ 584, 582, 581, 580, 579, 577, 576, 575, 574, 573, 572, 570, 569, 568, 567, 566, 565, 564, 563,
+ 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 547, 546, 545,
+ 544, 543, 542, 541, 540, 540, 539, 538, 537, 536, 536, 535, 534, 533, 532, 532, 531, 530, 529,
+ 528, 528, 527, 526, 525, 525, 524, 523, 522, 522, 521, 520, 520, 519,
+];
+
+/// Performs an FPVM-accelerated BLS12-381 G1 msm check.
+fn fpvm_bls12_g1_msm(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ let input_len = input.len();
+ if input_len == 0 || input_len % INPUT_LENGTH != 0 {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G1MSM input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ input_len
+ ))
+ .into());
+ }
+
+ let k = input_len / INPUT_LENGTH;
+ let required_gas = msm_required_gas(k, &DISCOUNT_TABLE, G1_MSM_BASE_FEE);
+ if required_gas > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_G1_MSM_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(G1_MSM_BASE_FEE, result_data.into()))
+}
+
+/// Performs an FPVM-accelerated `bls12` g1 msm check precompile call
+/// after the Isthmus Hardfork.
+fn fpvm_bls12_g1_msm_isthmus(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if input.len() > BLS12_MAX_G1_MSM_SIZE_ISTHMUS {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G1MSM input length must be at most {}",
+ BLS12_MAX_G1_MSM_SIZE_ISTHMUS
+ ))
+ .into());
+ }
+
+ fpvm_bls12_g1_msm(input, gas_limit)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_g1_msm_isthmus_max_bytes() {
+ let input = Bytes::from(vec![0u8; BLS12_MAX_G1_MSM_SIZE_ISTHMUS + 1]);
+ let gas_limit = G1_MSM_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "G1MSM input length must be at most {}",
+ BLS12_MAX_G1_MSM_SIZE_ISTHMUS
+ ));
+ assert_eq!(fpvm_bls12_g1_msm_isthmus(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g1_msm_offset() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH + 1]);
+ let gas_limit = G1_MSM_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "G1MSM input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ input.len(),
+ ));
+ assert_eq!(fpvm_bls12_g1_msm(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g1_msm_out_of_gas() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH * 2]);
+ let gas_limit = G1_MSM_BASE_FEE - 1;
+ assert_eq!(fpvm_bls12_g1_msm(&input, gas_limit), Err(PrecompileError::OutOfGas.into()));
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_g2_add.rs b/bin/client/src/precompiles/bls12_g2_add.rs
new file mode 100644
index 0000000000..b6dfdc5a83
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_g2_add.rs
@@ -0,0 +1,81 @@
+//! Contains the accelerated precompile for the BLS12-381 curve G2 Point Addition.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/g2_add.rs
+
+use crate::precompiles::utils::precompile_run;
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The address of the BLS12-381 g2 addition check precompile.
+///
+/// See:
+const BLS12_G2_ADD_CHECK: Address = address!("0x000000000000000000000000000000000000000d");
+
+/// Input length of g2 addition operation.
+const INPUT_LENGTH: usize = 512;
+
+/// Base gas fee for the BLS12-381 g2 addition operation.
+const G2_ADD_BASE_FEE: u64 = 600;
+
+/// The address of the BLS12-381 g2 addition precompile.
+pub(crate) const FPVM_BLS12_G2_ADD_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_G2_ADD_CHECK, Precompile::Standard(fpvm_bls12_g2_add));
+
+/// Performs an FPVM-accelerated BLS12-381 G2 addition check.
+///
+/// Notice, there is no input size limit for this precompile.
+/// See:
+fn fpvm_bls12_g2_add(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if G2_ADD_BASE_FEE > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ let input_len = input.len();
+ if input_len != INPUT_LENGTH {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G2 addition input length should be multiple of {INPUT_LENGTH}, was {input_len}"
+ ))
+ .into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_G2_ADD_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(G2_ADD_BASE_FEE, result_data.into()))
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_g2_add_input_len() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH + 1]);
+ let err = PrecompileError::Other(alloc::format!(
+ "G2 addition input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ INPUT_LENGTH + 1
+ ));
+ assert_eq!(fpvm_bls12_g2_add(&input, G2_ADD_BASE_FEE), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g2_add_out_of_gas() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH * 2]);
+ assert_eq!(
+ fpvm_bls12_g2_add(&input, G2_ADD_BASE_FEE - 1),
+ Err(PrecompileError::OutOfGas.into())
+ );
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_g2_msm.rs b/bin/client/src/precompiles/bls12_g2_msm.rs
new file mode 100644
index 0000000000..059838adee
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_g2_msm.rs
@@ -0,0 +1,122 @@
+//! Contains the accelerated precompile for the BLS12-381 curve G2 MSM.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/g2_msm.rs
+
+use crate::precompiles::utils::{msm_required_gas, precompile_run};
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The maximum input size for the BLS12-381 g2 msm operation after the Isthmus Hardfork.
+///
+/// See:
+const BLS12_MAX_G2_MSM_SIZE_ISTHMUS: usize = 488448;
+
+/// The address of the BLS12-381 g2 msm check precompile.
+///
+/// See:
+const BLS12_G2_MSM_CHECK: Address = address!("0x000000000000000000000000000000000000000e");
+
+/// Input length of g2 msm operation.
+const INPUT_LENGTH: usize = 288;
+
+/// Base gas fee for the BLS12-381 g2 msm operation.
+const G2_MSM_BASE_FEE: u64 = 22500;
+
+/// The address of the BLS12-381 g2 msm precompile.
+pub(crate) const FPVM_BLS12_G2_MSM_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_G2_MSM_CHECK, Precompile::Standard(fpvm_bls12_g2_msm_isthmus));
+
+// Discounts table for G2 MSM as a vector of pairs `[k, discount]`:
+static DISCOUNT_TABLE: [u16; 128] = [
+ 1000, 1000, 923, 884, 855, 832, 812, 796, 782, 770, 759, 749, 740, 732, 724, 717, 711, 704,
+ 699, 693, 688, 683, 679, 674, 670, 666, 663, 659, 655, 652, 649, 646, 643, 640, 637, 634, 632,
+ 629, 627, 624, 622, 620, 618, 615, 613, 611, 609, 607, 606, 604, 602, 600, 598, 597, 595, 593,
+ 592, 590, 589, 587, 586, 584, 583, 582, 580, 579, 578, 576, 575, 574, 573, 571, 570, 569, 568,
+ 567, 566, 565, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 552, 551, 550, 549,
+ 548, 547, 546, 545, 545, 544, 543, 542, 541, 541, 540, 539, 538, 537, 537, 536, 535, 535, 534,
+ 533, 532, 532, 531, 530, 530, 529, 528, 528, 527, 526, 526, 525, 524, 524,
+];
+
+/// Performs an FPVM-accelerated BLS12-381 G2 msm check.
+fn fpvm_bls12_g2_msm(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ let input_len = input.len();
+ if input_len == 0 || input_len % INPUT_LENGTH != 0 {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G2MSM input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ input_len
+ ))
+ .into());
+ }
+
+ let k = input_len / INPUT_LENGTH;
+ let required_gas = msm_required_gas(k, &DISCOUNT_TABLE, G2_MSM_BASE_FEE);
+ if required_gas > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_G2_MSM_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(G2_MSM_BASE_FEE, result_data.into()))
+}
+
+/// Performs an FPVM-accelerated `bls12` g2 msm check precompile call
+/// after the Isthmus Hardfork.
+fn fpvm_bls12_g2_msm_isthmus(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if input.len() > BLS12_MAX_G2_MSM_SIZE_ISTHMUS {
+ return Err(PrecompileError::Other(alloc::format!(
+ "G2MSM input length must be at most {}",
+ BLS12_MAX_G2_MSM_SIZE_ISTHMUS
+ ))
+ .into());
+ }
+
+ fpvm_bls12_g2_msm(input, gas_limit)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_g2_msm_isthmus_max_bytes() {
+ let input = Bytes::from(vec![0u8; BLS12_MAX_G2_MSM_SIZE_ISTHMUS + 1]);
+ let gas_limit = G2_MSM_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "G2MSM input length must be at most {}",
+ BLS12_MAX_G2_MSM_SIZE_ISTHMUS
+ ));
+ assert_eq!(fpvm_bls12_g2_msm_isthmus(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g2_msm_offset() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH + 1]);
+ let gas_limit = G2_MSM_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "G2MSM input length should be multiple of {}, was {}",
+ INPUT_LENGTH,
+ input.len(),
+ ));
+ assert_eq!(fpvm_bls12_g2_msm(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_g2_msm_out_of_gas() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH * 2]);
+ let gas_limit = G2_MSM_BASE_FEE - 1;
+ assert_eq!(fpvm_bls12_g2_msm(&input, gas_limit), Err(PrecompileError::OutOfGas.into()));
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_map_fp.rs b/bin/client/src/precompiles/bls12_map_fp.rs
new file mode 100644
index 0000000000..9a6d3ea9bf
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_map_fp.rs
@@ -0,0 +1,80 @@
+//! Contains the accelerated precompile for the BLS12-381 curve FP to G1 Mapping.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/map_fp_to_g1.rs
+
+use crate::precompiles::utils::precompile_run;
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The address of the BLS12-381 map fp to g1 check precompile.
+///
+/// See:
+const BLS12_MAP_FP_CHECK: Address = address!("0x0000000000000000000000000000000000000010");
+
+/// Base gas fee for the BLS12-381 map fp to g1 operation.
+const MAP_FP_BASE_FEE: u64 = 5500;
+
+/// The padded FP length.
+const PADDED_FP_LENGTH: usize = 64;
+
+/// The address of the BLS12-381 map fp to g1 precompile.
+pub(crate) const FPVM_BLS12_MAP_FP_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_MAP_FP_CHECK, Precompile::Standard(fpvm_bls12_map_fp));
+
+/// Performs an FPVM-accelerated BLS12-381 map fp check.
+///
+/// Notice, there is no input size limit for this precompile.
+/// See:
+fn fpvm_bls12_map_fp(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if MAP_FP_BASE_FEE > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ if input.len() != PADDED_FP_LENGTH {
+ return Err(PrecompileError::Other(alloc::format!(
+ "MAP_FP_TO_G1 input should be {PADDED_FP_LENGTH} bytes, was {}",
+ input.len()
+ ))
+ .into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_MAP_FP_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(MAP_FP_BASE_FEE, result_data.into()))
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_map_fp_offset() {
+ let input = Bytes::from(vec![0u8; PADDED_FP_LENGTH + 1]);
+ let gas_limit = MAP_FP_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "MAP_FP_TO_G1 input should be {} bytes, was {}",
+ PADDED_FP_LENGTH,
+ input.len(),
+ ));
+ assert_eq!(fpvm_bls12_map_fp(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_map_fp_out_of_gas() {
+ let input = Bytes::from(vec![0u8; PADDED_FP_LENGTH]);
+ let gas_limit = MAP_FP_BASE_FEE - 1;
+ assert_eq!(fpvm_bls12_map_fp(&input, gas_limit), Err(PrecompileError::OutOfGas.into()));
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_map_fp2.rs b/bin/client/src/precompiles/bls12_map_fp2.rs
new file mode 100644
index 0000000000..edc3df7305
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_map_fp2.rs
@@ -0,0 +1,80 @@
+//! Contains the accelerated precompile for the BLS12-381 curve FP2 to G2 Mapping.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/map_fp_to_g1.rs
+
+use crate::precompiles::utils::precompile_run;
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The address of the BLS12-381 map fp2 to g2 check precompile.
+///
+/// See:
+const BLS12_MAP_FP2_CHECK: Address = address!("0x0000000000000000000000000000000000000011");
+
+/// Base gas fee for the BLS12-381 map fp2 to g2 operation.
+const MAP_FP2_BASE_FEE: u64 = 23800;
+
+/// The padded FP2 length.
+const PADDED_FP2_LENGTH: usize = 128;
+
+/// The address of the BLS12-381 map fp2 to g2 precompile.
+pub(crate) const FPVM_BLS12_MAP_FP2_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_MAP_FP2_CHECK, Precompile::Standard(fpvm_bls12_map_fp2));
+
+/// Performs an FPVM-accelerated BLS12-381 map fp2 check.
+///
+/// Notice, there is no input size limit for this precompile.
+/// See:
+fn fpvm_bls12_map_fp2(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if MAP_FP2_BASE_FEE > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ if input.len() != PADDED_FP2_LENGTH {
+ return Err(PrecompileError::Other(alloc::format!(
+ "MAP_FP2_TO_G2 input should be {PADDED_FP2_LENGTH} bytes, was {}",
+ input.len()
+ ))
+ .into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_MAP_FP2_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(MAP_FP2_BASE_FEE, result_data.into()))
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_map_fp2_offset() {
+ let input = Bytes::from(vec![0u8; PADDED_FP2_LENGTH + 1]);
+ let gas_limit = MAP_FP2_BASE_FEE;
+ let err = PrecompileError::Other(alloc::format!(
+ "MAP_FP2_TO_G2 input should be {} bytes, was {}",
+ PADDED_FP2_LENGTH,
+ input.len(),
+ ));
+ assert_eq!(fpvm_bls12_map_fp2(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_map_fp_out_of_gas() {
+ let input = Bytes::from(vec![0u8; PADDED_FP2_LENGTH]);
+ let gas_limit = MAP_FP2_BASE_FEE - 1;
+ assert_eq!(fpvm_bls12_map_fp2(&input, gas_limit), Err(PrecompileError::OutOfGas.into()));
+ }
+}
diff --git a/bin/client/src/precompiles/bls12_pairing.rs b/bin/client/src/precompiles/bls12_pairing.rs
new file mode 100644
index 0000000000..0015fcb3b0
--- /dev/null
+++ b/bin/client/src/precompiles/bls12_pairing.rs
@@ -0,0 +1,103 @@
+//! Contains the accelerated precompile for the BLS12-381 curve.
+//!
+//! BLS12-381 is introduced in [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537).
+//!
+//! For constants and logic, see the [revm implementation].
+//!
+//! [revm implementation]: https://github.com/bluealloy/revm/blob/main/crates/precompile/src/bls12_381/pairing.rs
+
+use crate::precompiles::utils::precompile_run;
+use alloc::{string::ToString, vec::Vec};
+use alloy_primitives::{address, keccak256, Address, Bytes};
+use revm::{
+ precompile::{Error as PrecompileError, Precompile, PrecompileResult, PrecompileWithAddress},
+ primitives::PrecompileOutput,
+};
+
+/// The max pairing size for BLS12-381 input given a 20M gas limit.
+const BLS12_MAX_PAIRING_SIZE_ISTHMUS: usize = 235_008;
+
+/// The address of the BLS12-381 pairing check precompile.
+const BLS12_PAIRING_CHECK: Address = address!("0x000000000000000000000000000000000000000f");
+
+/// Input length of pairing operation.
+const INPUT_LENGTH: usize = 384;
+
+/// Multiplier gas fee for BLS12-381 pairing operation.
+const PAIRING_MULTIPLIER_BASE: u64 = 32600;
+
+/// Offset gas fee for BLS12-381 pairing operation.
+const PAIRING_OFFSET_BASE: u64 = 37700;
+
+/// The address of the BLS12-381 pairing precompile.
+pub(crate) const FPVM_BLS12_PAIRING_ISTHMUS: PrecompileWithAddress =
+ PrecompileWithAddress(BLS12_PAIRING_CHECK, Precompile::Standard(fpvm_bls12_pairing_isthmus));
+
+/// Performs an FPVM-accelerated BLS12-381 pairing check.
+fn fpvm_bls12_pairing(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ let input_len = input.len();
+ if input_len % INPUT_LENGTH != 0 {
+ return Err(PrecompileError::Other(alloc::format!(
+ "Pairing input length should be multiple of {INPUT_LENGTH}, was {input_len}"
+ ))
+ .into());
+ }
+
+ let k = input_len / INPUT_LENGTH;
+ let required_gas: u64 = PAIRING_MULTIPLIER_BASE * k as u64 + PAIRING_OFFSET_BASE;
+ if required_gas > gas_limit {
+ return Err(PrecompileError::OutOfGas.into());
+ }
+
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[BLS12_PAIRING_CHECK.as_ref(), input.as_ref()]
+ })
+ .map_err(|e| PrecompileError::Other(e.to_string()))?;
+
+ Ok(PrecompileOutput::new(required_gas, result_data.into()))
+}
+
+/// Performs an FPVM-accelerated `bls12` pairing check precompile call
+/// after the Isthmus Hardfork.
+fn fpvm_bls12_pairing_isthmus(input: &Bytes, gas_limit: u64) -> PrecompileResult {
+ if input.len() > BLS12_MAX_PAIRING_SIZE_ISTHMUS {
+ return Err(PrecompileError::Other(alloc::format!(
+ "Pairing input length must be at most {}",
+ BLS12_MAX_PAIRING_SIZE_ISTHMUS
+ ))
+ .into());
+ }
+
+ fpvm_bls12_pairing(input, gas_limit)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use alloc::vec;
+
+ #[test]
+ fn test_fpvm_bls12_pairing_isthmus_max_bytes() {
+ let input = Bytes::from(vec![0u8; BLS12_MAX_PAIRING_SIZE_ISTHMUS + 1]);
+ let gas_limit = PAIRING_MULTIPLIER_BASE;
+ let err = PrecompileError::Other("Pairing input length must be at most 235008".to_string());
+ assert_eq!(fpvm_bls12_pairing_isthmus(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_offset() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH + 1]);
+ let gas_limit = PAIRING_OFFSET_BASE;
+ let err = PrecompileError::Other(
+ "Pairing input length should be multiple of 384, was 385".to_string(),
+ );
+ assert_eq!(fpvm_bls12_pairing(&input, gas_limit), Err(err.into()));
+ }
+
+ #[test]
+ fn test_fpvm_bls12_out_of_gas() {
+ let input = Bytes::from(vec![0u8; INPUT_LENGTH * 2]);
+ let gas_limit = PAIRING_MULTIPLIER_BASE - 1;
+ assert_eq!(fpvm_bls12_pairing(&input, gas_limit), Err(PrecompileError::OutOfGas.into()));
+ }
+}
diff --git a/bin/client/src/precompiles/bn128_pair.rs b/bin/client/src/precompiles/bn128_pair.rs
index a62eff284f..fce1b9719c 100644
--- a/bin/client/src/precompiles/bn128_pair.rs
+++ b/bin/client/src/precompiles/bn128_pair.rs
@@ -1,13 +1,8 @@
//! Contains the accelerated version of the `ecPairing` precompile.
-use crate::{HINT_WRITER, ORACLE_READER};
+use crate::precompiles::utils::precompile_run;
use alloc::{string::ToString, vec::Vec};
use alloy_primitives::{keccak256, Address, Bytes};
-use kona_preimage::{
- errors::PreimageOracleError, HintWriterClient, PreimageKey, PreimageKeyType,
- PreimageOracleClient,
-};
-use kona_proof::{errors::OracleProviderError, HintType};
use revm::{
precompile::{
bn128::pair::{ISTANBUL_PAIR_BASE, ISTANBUL_PAIR_PER_POINT},
@@ -38,40 +33,8 @@ fn fpvm_ecpairing(input: &Bytes, gas_limit: u64) -> PrecompileResult {
return Err(PrecompileError::Bn128PairLength.into());
}
- let result_data = kona_proof::block_on(async move {
- // Write the hint for the ecrecover precompile run.
- let hint_data = &[ECPAIRING_ADDRESS.as_ref(), input.as_ref()];
- HINT_WRITER
- .write(&HintType::L1Precompile.encode_with(hint_data))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Construct the key hash for the ecrecover precompile run.
- let raw_key_data = hint_data.iter().copied().flatten().copied().collect::>();
- let key_hash = keccak256(&raw_key_data);
-
- // Fetch the result of the ecrecover precompile run from the host.
- let result_data = ORACLE_READER
- .get(PreimageKey::new(*key_hash, PreimageKeyType::Precompile))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Ensure we've received valid result data.
- if result_data.is_empty() {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Invalid result data".to_string(),
- )));
- }
-
- // Ensure we've not received an error from the host.
- if result_data[0] == 0 {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Error executing ecrecover precompile in host".to_string(),
- )));
- }
-
- // Return the result data.
- Ok(result_data[1..].to_vec())
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[ECPAIRING_ADDRESS.as_ref(), input.as_ref()]
})
.map_err(|e| PrecompileError::Other(e.to_string()))?;
diff --git a/bin/client/src/precompiles/ecrecover.rs b/bin/client/src/precompiles/ecrecover.rs
index cf0a78976f..da988f86ae 100644
--- a/bin/client/src/precompiles/ecrecover.rs
+++ b/bin/client/src/precompiles/ecrecover.rs
@@ -1,13 +1,8 @@
//! Contains the accelerated version of the `ecrecover` precompile.
-use crate::{HINT_WRITER, ORACLE_READER};
+use crate::precompiles::utils::precompile_run;
use alloc::{string::ToString, vec::Vec};
use alloy_primitives::{keccak256, Address, Bytes};
-use kona_preimage::{
- errors::PreimageOracleError, HintWriterClient, PreimageKey, PreimageKeyType,
- PreimageOracleClient,
-};
-use kona_proof::{errors::OracleProviderError, HintType};
use revm::{
precompile::{u64_to_address, Error as PrecompileError, PrecompileWithAddress},
primitives::{Precompile, PrecompileOutput, PrecompileResult},
@@ -26,40 +21,8 @@ fn fpvm_ecrecover(input: &Bytes, gas_limit: u64) -> PrecompileResult {
return Err(PrecompileError::OutOfGas.into());
}
- let result_data = kona_proof::block_on(async move {
- // Write the hint for the ecrecover precompile run.
- let hint_data = &[ECRECOVER_ADDRESS.as_ref(), input.as_ref()];
- HINT_WRITER
- .write(&HintType::L1Precompile.encode_with(hint_data))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Construct the key hash for the ecrecover precompile run.
- let raw_key_data = hint_data.iter().copied().flatten().copied().collect::>();
- let key_hash = keccak256(&raw_key_data);
-
- // Fetch the result of the ecrecover precompile run from the host.
- let result_data = ORACLE_READER
- .get(PreimageKey::new(*key_hash, PreimageKeyType::Precompile))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Ensure we've received valid result data.
- if result_data.is_empty() {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Invalid result data".to_string(),
- )));
- }
-
- // Ensure we've not received an error from the host.
- if result_data[0] == 0 {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Error executing ecrecover precompile in host".to_string(),
- )));
- }
-
- // Return the result data.
- Ok(result_data[1..].to_vec())
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[ECRECOVER_ADDRESS.as_ref(), input.as_ref()]
})
.map_err(|e| PrecompileError::Other(e.to_string()))?;
diff --git a/bin/client/src/precompiles/kzg_point_eval.rs b/bin/client/src/precompiles/kzg_point_eval.rs
index 84b04d61b1..ddbc6834f4 100644
--- a/bin/client/src/precompiles/kzg_point_eval.rs
+++ b/bin/client/src/precompiles/kzg_point_eval.rs
@@ -1,13 +1,8 @@
//! Contains the accelerated version of the KZG point evaluation precompile.
-use crate::{HINT_WRITER, ORACLE_READER};
+use crate::precompiles::utils::precompile_run;
use alloc::{string::ToString, vec::Vec};
use alloy_primitives::{keccak256, Address, Bytes};
-use kona_preimage::{
- errors::PreimageOracleError, HintWriterClient, PreimageKey, PreimageKeyType,
- PreimageOracleClient,
-};
-use kona_proof::{errors::OracleProviderError, HintType};
use revm::{
precompile::{u64_to_address, Error as PrecompileError, PrecompileWithAddress},
primitives::{Precompile, PrecompileOutput, PrecompileResult},
@@ -30,40 +25,8 @@ fn fpvm_kzg_point_eval(input: &Bytes, gas_limit: u64) -> PrecompileResult {
return Err(PrecompileError::BlobInvalidInputLength.into());
}
- let result_data = kona_proof::block_on(async move {
- // Write the hint for the ecrecover precompile run.
- let hint_data = &[POINT_EVAL_ADDRESS.as_ref(), input.as_ref()];
- HINT_WRITER
- .write(&HintType::L1Precompile.encode_with(hint_data))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Construct the key hash for the ecrecover precompile run.
- let raw_key_data = hint_data.iter().copied().flatten().copied().collect::>();
- let key_hash = keccak256(&raw_key_data);
-
- // Fetch the result of the ecrecover precompile run from the host.
- let result_data = ORACLE_READER
- .get(PreimageKey::new(*key_hash, PreimageKeyType::Precompile))
- .await
- .map_err(OracleProviderError::Preimage)?;
-
- // Ensure we've received valid result data.
- if result_data.is_empty() {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Invalid result data".to_string(),
- )));
- }
-
- // Ensure we've not received an error from the host.
- if result_data[0] == 0 {
- return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
- "Error executing ecrecover precompile in host".to_string(),
- )));
- }
-
- // Return the result data.
- Ok(result_data[1..].to_vec())
+ let result_data = kona_proof::block_on(precompile_run! {
+ &[POINT_EVAL_ADDRESS.as_ref(), input.as_ref()]
})
.map_err(|e| PrecompileError::Other(e.to_string()))?;
diff --git a/bin/client/src/precompiles/mod.rs b/bin/client/src/precompiles/mod.rs
index 910e343a16..282d6748e4 100644
--- a/bin/client/src/precompiles/mod.rs
+++ b/bin/client/src/precompiles/mod.rs
@@ -14,6 +14,15 @@ use revm::{
mod bn128_pair;
mod ecrecover;
mod kzg_point_eval;
+pub(crate) mod utils;
+
+mod bls12_g1_add;
+mod bls12_g1_msm;
+mod bls12_g2_add;
+mod bls12_g2_msm;
+mod bls12_map_fp;
+mod bls12_map_fp2;
+mod bls12_pairing;
/// The [KonaHandleRegister] function for registering the FPVM-accelerated precompiles.
///
@@ -43,6 +52,16 @@ pub(crate) fn fpvm_handle_register(
ctx_precompiles.extend([bn128_pair::FPVM_ECPAIRING_GRANITE]);
}
+ // if spec_id.is_enabled_in(SpecId::ISTHMUS) {
+ // ctx_precompiles.extend([bls12_g1_add::FPVM_BLS12_G1_ADD_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_g1_msm::FPVM_BLS12_G1_MSM_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_g2_add::FPVM_BLS12_G2_ADD_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_g2_msm::FPVM_BLS12_G2_MSM_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_map_fp::FPVM_BLS12_MAP_FP_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_map_fp2::FPVM_BLS12_MAP_FP2_ISTHMUS]);
+ // ctx_precompiles.extend([bls12_pairing::FPVM_BLS12_PAIRING_ISTHMUS]);
+ // }
+
ctx_precompiles
});
}
diff --git a/bin/client/src/precompiles/utils.rs b/bin/client/src/precompiles/utils.rs
new file mode 100644
index 0000000000..0f2b6c58f0
--- /dev/null
+++ b/bin/client/src/precompiles/utils.rs
@@ -0,0 +1,72 @@
+//! Utility functions for precompiles
+
+// TODO: replace this with revm::precompiles::bls12_381::msm::msm_required_gas
+// once the `msm` module is public. As of v19.4.0 the `msm` module is private.
+/// Implements the gas schedule for G1/G2 Multiscalar-multiplication assuming 30
+/// MGas/second, see also:
+#[inline]
+pub(crate) fn msm_required_gas(k: usize, discount_table: &[u16], multiplication_cost: u64) -> u64 {
+ /// Amount used to calculate the multi-scalar-multiplication discount
+ const MSM_MULTIPLIER: u64 = 1000;
+
+ if k == 0 {
+ return 0;
+ }
+
+ let index = core::cmp::min(k - 1, discount_table.len() - 1);
+ let discount = discount_table[index] as u64;
+
+ (k as u64 * discount * multiplication_cost) / MSM_MULTIPLIER
+}
+
+/// A macro that generates an async block that sends a hint to the host, constructs a key hash
+/// from the hint data, fetches the result of the precompile run from the host, and returns the
+/// result data.
+///
+/// The macro takes the following arguments:
+/// - `hint_data`: The hint data to send to the host.
+#[macro_export]
+macro_rules! precompile_run {
+ ($hint_data:expr) => {
+ async move {
+ use kona_preimage::{
+ errors::PreimageOracleError, PreimageKey, PreimageKeyType, PreimageOracleClient,
+ };
+ use kona_proof::{errors::OracleProviderError, HintType};
+ use $crate::{HINT_WRITER, ORACLE_READER};
+
+ // Write the hint for the precompile run.
+ let hint_data = $hint_data;
+ HintType::L1Precompile.with_data(hint_data).send(&HINT_WRITER).await?;
+
+ // Construct the key hash for the precompile run.
+ let raw_key_data = hint_data.iter().copied().flatten().copied().collect::>();
+ let key_hash = keccak256(&raw_key_data);
+
+ // Fetch the result of the precompile run from the host.
+ let result_data = ORACLE_READER
+ .get(PreimageKey::new(*key_hash, PreimageKeyType::Precompile))
+ .await
+ .map_err(OracleProviderError::Preimage)?;
+
+ // Ensure we've received valid result data.
+ if result_data.is_empty() {
+ return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
+ "Invalid result data".to_string(),
+ )));
+ }
+
+ // Ensure we've not received an error from the host.
+ if result_data[0] == 0 {
+ return Err(OracleProviderError::Preimage(PreimageOracleError::Other(
+ "Error executing precompile in host".to_string(),
+ )));
+ }
+
+ // Return the result data.
+ Ok(result_data[1..].to_vec())
+ }
+ };
+}
+
+pub(crate) use precompile_run;
diff --git a/bin/client/src/single.rs b/bin/client/src/single.rs
new file mode 100644
index 0000000000..b884a406b5
--- /dev/null
+++ b/bin/client/src/single.rs
@@ -0,0 +1,176 @@
+//! Single-chain fault proof program entrypoint.
+
+use alloc::sync::Arc;
+use alloy_consensus::Sealed;
+use alloy_primitives::B256;
+use core::fmt::Debug;
+use kona_driver::{Driver, DriverError};
+use kona_executor::{ExecutorError, KonaHandleRegister, TrieDBProvider};
+use kona_preimage::{CommsClient, HintWriterClient, PreimageKey, PreimageOracleClient};
+use kona_proof::l1::OracleEigenDaProvider;
+use kona_proof::{
+ errors::OracleProviderError,
+ executor::KonaExecutor,
+ l1::{OracleBlobProvider, OracleL1ChainProvider, OraclePipeline},
+ l2::OracleL2ChainProvider,
+ sync::new_pipeline_cursor,
+ BootInfo, CachingOracle, HintType,
+};
+use thiserror::Error;
+use tracing::{error, info};
+
+/// An error that can occur when running the fault proof program.
+#[derive(Error, Debug)]
+pub enum FaultProofProgramError {
+ /// The claim is invalid.
+ #[error("Invalid claim. Expected {0}, actual {1}")]
+ InvalidClaim(B256, B256),
+ /// An error occurred in the Oracle provider.
+ #[error(transparent)]
+ OracleProviderError(#[from] OracleProviderError),
+ /// An error occurred in the driver.
+ #[error(transparent)]
+ Driver(#[from] DriverError),
+}
+
+/// Executes the fault proof program with the given [PreimageOracleClient] and [HintWriterClient].
+#[inline]
+pub async fn run(
+ oracle_client: P,
+ hint_client: H,
+ handle_register: Option<
+ KonaHandleRegister<
+ OracleL2ChainProvider>,
+ OracleL2ChainProvider>,
+ >,
+ >,
+) -> Result<(), FaultProofProgramError>
+where
+ P: PreimageOracleClient + Send + Sync + Debug + Clone,
+ H: HintWriterClient + Send + Sync + Debug + Clone,
+{
+ const ORACLE_LRU_SIZE: usize = 1024;
+
+ ////////////////////////////////////////////////////////////////
+ // PROLOGUE //
+ ////////////////////////////////////////////////////////////////
+
+ let oracle = Arc::new(CachingOracle::new(ORACLE_LRU_SIZE, oracle_client, hint_client));
+ let boot = BootInfo::load(oracle.as_ref()).await?;
+ let rollup_config = Arc::new(boot.rollup_config);
+ let safe_head_hash = fetch_safe_head_hash(oracle.as_ref(), boot.agreed_l2_output_root).await?;
+
+ let mut l1_provider = OracleL1ChainProvider::new(boot.l1_head, oracle.clone());
+ let mut l2_provider =
+ OracleL2ChainProvider::new(safe_head_hash, rollup_config.clone(), oracle.clone());
+ let beacon = OracleBlobProvider::new(oracle.clone());
+ let eigen_da_provider = OracleEigenDaProvider::new(oracle.clone());
+
+ // Fetch the safe head's block header.
+ let safe_head = l2_provider
+ .header_by_hash(safe_head_hash)
+ .map(|header| Sealed::new_unchecked(header, safe_head_hash))?;
+
+ // If the claimed L2 block number is less than the safe head of the L2 chain, the claim is
+ // invalid.
+ if boot.claimed_l2_block_number < safe_head.number {
+ error!(
+ target: "client",
+ "Claimed L2 block number {claimed} is less than the safe head {safe}",
+ claimed = boot.claimed_l2_block_number,
+ safe = safe_head.number
+ );
+ return Err(FaultProofProgramError::InvalidClaim(
+ boot.agreed_l2_output_root,
+ boot.claimed_l2_output_root,
+ ));
+ }
+
+ // In the case where the agreed upon L2 output root is the same as the claimed L2 output root,
+ // trace extension is detected and we can skip the derivation and execution steps.
+ if boot.agreed_l2_output_root == boot.claimed_l2_output_root {
+ info!(
+ target: "client",
+ "Trace extension detected. State transition is already agreed upon.",
+ );
+ return Ok(());
+ }
+
+ ////////////////////////////////////////////////////////////////
+ // DERIVATION & EXECUTION //
+ ////////////////////////////////////////////////////////////////
+
+ // Create a new derivation driver with the given boot information and oracle.
+ let cursor =
+ new_pipeline_cursor(rollup_config.as_ref(), safe_head, &mut l1_provider, &mut l2_provider)
+ .await?;
+ l2_provider.set_cursor(cursor.clone());
+
+ let pipeline = OraclePipeline::new(
+ rollup_config.clone(),
+ cursor.clone(),
+ oracle.clone(),
+ beacon,
+ eigen_da_provider,
+ l1_provider.clone(),
+ l2_provider.clone(),
+ );
+ let executor = KonaExecutor::new(
+ rollup_config.as_ref(),
+ l2_provider.clone(),
+ l2_provider,
+ handle_register,
+ None,
+ );
+ let mut driver = Driver::new(cursor, executor, pipeline);
+
+ // Run the derivation pipeline until we are able to produce the output root of the claimed
+ // L2 block.
+ let (safe_head, output_root) = driver
+ .advance_to_target(rollup_config.as_ref(), Some(boot.claimed_l2_block_number))
+ .await?;
+
+ ////////////////////////////////////////////////////////////////
+ // EPILOGUE //
+ ////////////////////////////////////////////////////////////////
+
+ if output_root != boot.claimed_l2_output_root {
+ error!(
+ target: "client",
+ "Failed to validate L2 block #{number} with output root {output_root}",
+ number = safe_head.block_info.number,
+ output_root = output_root
+ );
+ return Err(FaultProofProgramError::InvalidClaim(output_root, boot.claimed_l2_output_root));
+ }
+
+ info!(
+ target: "client",
+ "Successfully validated L2 block #{number} with output root {output_root}",
+ number = safe_head.block_info.number,
+ output_root = output_root
+ );
+
+ Ok(())
+}
+
+/// Fetches the safe head hash of the L2 chain based on the agreed upon L2 output root in the
+/// [BootInfo].
+pub async fn fetch_safe_head_hash(
+ caching_oracle: &O,
+ agreed_l2_output_root: B256,
+) -> Result
+where
+ O: CommsClient,
+{
+ let mut output_preimage = [0u8; 128];
+ HintType::StartingL2Output
+ .with_data(&[agreed_l2_output_root.as_ref()])
+ .send(caching_oracle)
+ .await?;
+ caching_oracle
+ .get_exact(PreimageKey::new_keccak256(*agreed_l2_output_root), output_preimage.as_mut())
+ .await?;
+
+ output_preimage[96..128].try_into().map_err(OracleProviderError::SliceConversion)
+}
diff --git a/bin/host/Cargo.toml b/bin/host/Cargo.toml
index a512a5ee23..b0df2d0434 100644
--- a/bin/host/Cargo.toml
+++ b/bin/host/Cargo.toml
@@ -19,6 +19,9 @@ kona-std-fpvm.workspace = true
kona-preimage = { workspace = true, features = ["std"] }
kona-proof = { workspace = true, features = ["std"] }
kona-client.workspace = true
+kona-providers-alloy.workspace = true
+eigen-da.workspace = true
+
# Alloy
alloy-rlp.workspace = true
@@ -36,21 +39,39 @@ alloy-rpc-types-beacon.workspace = true
op-alloy-genesis = { workspace = true, features = ["std", "serde"] }
op-alloy-protocol = { workspace = true, features = ["std", "serde"] }
op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] }
+op-alloy-network.workspace = true
# Revm
revm = { workspace = true, features = ["std", "c-kzg", "secp256k1", "portable", "blst"] }
+# Eigenda
+rust-kzg-bn254-prover.workspace = true
+rust-kzg-bn254-primitives.workspace = true
+num.workspace = true
+ark-bn254.workspace = true
+ark-ff.workspace = true
+
+
# General
anyhow.workspace = true
tracing.workspace = true
reqwest.workspace = true
serde_json.workspace = true
async-trait.workspace = true
+rocksdb = { workspace = true, features = ["snappy"] }
tokio = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
-rocksdb = { workspace = true, features = ["snappy"] }
clap = { workspace = true, features = ["derive", "env"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
[dev-dependencies]
proptest.workspace = true
+
+[features]
+default = ["single", "interop"]
+single = []
+interop = ["single"]
+
+[[bin]]
+name = "kona-host"
+path = "src/bin/host.rs"
\ No newline at end of file
diff --git a/bin/host/src/backend/mod.rs b/bin/host/src/backend/mod.rs
new file mode 100644
index 0000000000..7892bd2eb2
--- /dev/null
+++ b/bin/host/src/backend/mod.rs
@@ -0,0 +1,9 @@
+//! Backend for the preimage server.
+
+mod offline;
+pub use offline::OfflineHostBackend;
+
+mod online;
+pub use online::{HintHandler, OnlineHostBackend, OnlineHostBackendCfg};
+
+pub(crate) mod util;
diff --git a/bin/host/src/backend/offline.rs b/bin/host/src/backend/offline.rs
new file mode 100644
index 0000000000..0f97d2e01b
--- /dev/null
+++ b/bin/host/src/backend/offline.rs
@@ -0,0 +1,50 @@
+//! Contains the implementations of the [HintRouter] and [PreimageFetcher] traits.]
+
+use crate::kv::KeyValueStore;
+use async_trait::async_trait;
+use kona_preimage::{
+ errors::{PreimageOracleError, PreimageOracleResult},
+ HintRouter, PreimageFetcher, PreimageKey,
+};
+use std::sync::Arc;
+use tokio::sync::RwLock;
+
+/// A [KeyValueStore]-backed implementation of the [PreimageFetcher] trait.
+#[derive(Debug)]
+pub struct OfflineHostBackend
+where
+ KV: KeyValueStore + ?Sized,
+{
+ inner: Arc>,
+}
+
+impl OfflineHostBackend
+where
+ KV: KeyValueStore + ?Sized,
+{
+ /// Create a new [OfflineHostBackend] from the given [KeyValueStore].
+ pub const fn new(kv_store: Arc>) -> Self {
+ Self { inner: kv_store }
+ }
+}
+
+#[async_trait]
+impl PreimageFetcher for OfflineHostBackend
+where
+ KV: KeyValueStore + Send + Sync + ?Sized,
+{
+ async fn get_preimage(&self, key: PreimageKey) -> PreimageOracleResult> {
+ let kv_store = self.inner.read().await;
+ kv_store.get(key.into()).ok_or(PreimageOracleError::KeyNotFound)
+ }
+}
+
+#[async_trait]
+impl HintRouter for OfflineHostBackend
+where
+ KV: KeyValueStore + Send + Sync + ?Sized,
+{
+ async fn route_hint(&self, _hint: String) -> PreimageOracleResult<()> {
+ Ok(())
+ }
+}
diff --git a/bin/host/src/backend/online.rs b/bin/host/src/backend/online.rs
new file mode 100644
index 0000000000..bf71bb78b3
--- /dev/null
+++ b/bin/host/src/backend/online.rs
@@ -0,0 +1,151 @@
+//! Contains the [OnlineHostBackend] definition.
+
+use crate::SharedKeyValueStore;
+use anyhow::Result;
+use async_trait::async_trait;
+use kona_preimage::{
+ errors::{PreimageOracleError, PreimageOracleResult},
+ HintRouter, PreimageFetcher, PreimageKey,
+};
+use kona_proof::{errors::HintParsingError, Hint};
+use std::{collections::HashSet, hash::Hash, str::FromStr, sync::Arc};
+use tokio::sync::RwLock;
+use tracing::{debug, error, trace};
+
+/// The [OnlineHostBackendCfg] trait is used to define the type configuration for the
+/// [OnlineHostBackend].
+pub trait OnlineHostBackendCfg {
+ /// The hint type describing the range of hints that can be received.
+ type HintType: FromStr + Hash + Eq + PartialEq + Clone + Send + Sync;
+
+ /// The providers that are used to fetch data in response to hints.
+ type Providers: Send + Sync;
+}
+
+/// A [HintHandler] is an interface for receiving hints, fetching remote data, and storing it in the
+/// key-value store.
+#[async_trait]
+pub trait HintHandler {
+ /// The type configuration for the [HintHandler].
+ type Cfg: OnlineHostBackendCfg;
+
+ /// Fetches data in response to a hint.
+ async fn fetch_hint(
+ hint: Hint<::HintType>,
+ cfg: &Self::Cfg,
+ providers: &::Providers,
+ kv: SharedKeyValueStore,
+ ) -> Result<()>;
+}
+
+/// The [OnlineHostBackend] is a [HintRouter] and [PreimageFetcher] that is used to fetch data from
+/// remote sources in response to hints.
+///
+/// [PreimageKey]: kona_preimage::PreimageKey
+#[allow(missing_debug_implementations)]
+pub struct OnlineHostBackend
+where
+ C: OnlineHostBackendCfg,
+ H: HintHandler,
+{
+ /// The configuration that is used to route hints.
+ cfg: C,
+ /// The key-value store that is used to store preimages.
+ kv: SharedKeyValueStore,
+ /// The providers that are used to fetch data in response to hints.
+ providers: C::Providers,
+ /// Hints that should be immediately executed by the host.
+ proactive_hints: HashSet,
+ /// The last hint that was received.
+ last_hint: Arc>>>,
+ /// Phantom marker for the [HintHandler].
+ _hint_handler: std::marker::PhantomData,
+}
+
+impl OnlineHostBackend
+where
+ C: OnlineHostBackendCfg,
+ H: HintHandler,
+{
+ /// Creates a new [HintHandler] with the given configuration, key-value store, providers, and
+ /// external configuration.
+ pub fn new(cfg: C, kv: SharedKeyValueStore, providers: C::Providers, _: H) -> Self {
+ Self {
+ cfg,
+ kv,
+ providers,
+ proactive_hints: HashSet::default(),
+ last_hint: Arc::new(RwLock::new(None)),
+ _hint_handler: std::marker::PhantomData,
+ }
+ }
+
+ /// Adds a new proactive hint to the [OnlineHostBackend].
+ pub fn with_proactive_hint(mut self, hint_type: C::HintType) -> Self {
+ self.proactive_hints.insert(hint_type);
+ self
+ }
+}
+
+#[async_trait]
+impl HintRouter for OnlineHostBackend
+where
+ C: OnlineHostBackendCfg + Send + Sync,
+ H: HintHandler + Send + Sync,
+{
+ /// Set the last hint to be received.
+ async fn route_hint(&self, hint: String) -> PreimageOracleResult<()> {
+ trace!(target: "host-backend", "Received hint: {hint}");
+
+ let parsed_hint =
+ hint.parse::>().map_err(|_| PreimageOracleError::KeyNotFound)?;
+ if self.proactive_hints.contains(&parsed_hint.ty) {
+ debug!(target: "host-backend", "Proactive hint received; Immediately fetching {hint}");
+ H::fetch_hint(parsed_hint, &self.cfg, &self.providers, self.kv.clone())
+ .await
+ .map_err(|e| PreimageOracleError::Other(e.to_string()))?;
+ } else {
+ let mut hint_lock = self.last_hint.write().await;
+ hint_lock.replace(parsed_hint);
+ }
+
+ Ok(())
+ }
+}
+
+#[async_trait]
+impl PreimageFetcher for OnlineHostBackend
+where
+ C: OnlineHostBackendCfg + Send + Sync,
+ H: HintHandler + Send + Sync,
+{
+ /// Get the preimage for the given key.
+ async fn get_preimage(&self, key: PreimageKey) -> PreimageOracleResult> {
+ trace!(target: "host-backend", "Pre-image requested. Key: {key}");
+
+ // Acquire a read lock on the key-value store.
+ let kv_lock = self.kv.read().await;
+ let mut preimage = kv_lock.get(key.into());
+
+ // Drop the read lock before beginning the retry loop.
+ drop(kv_lock);
+
+ // Use a loop to keep retrying the prefetch as long as the key is not found
+ while preimage.is_none() {
+ if let Some(hint) = self.last_hint.read().await.as_ref() {
+ let value =
+ H::fetch_hint(hint.clone(), &self.cfg, &self.providers, self.kv.clone()).await;
+
+ if let Err(e) = value {
+ error!(target: "host-backend", "Failed to prefetch hint: {e}");
+ continue;
+ }
+
+ let kv_lock = self.kv.read().await;
+ preimage = kv_lock.get(key.into());
+ }
+ }
+
+ preimage.ok_or(PreimageOracleError::KeyNotFound)
+ }
+}
diff --git a/bin/host/src/backend/util.rs b/bin/host/src/backend/util.rs
new file mode 100644
index 0000000000..79a3c07a4d
--- /dev/null
+++ b/bin/host/src/backend/util.rs
@@ -0,0 +1,41 @@
+//! Utilities for the preimage server backend.
+
+use crate::KeyValueStore;
+use alloy_consensus::EMPTY_ROOT_HASH;
+use alloy_primitives::keccak256;
+use alloy_rlp::EMPTY_STRING_CODE;
+use anyhow::Result;
+use kona_preimage::{PreimageKey, PreimageKeyType};
+use tokio::sync::RwLock;
+
+/// Constructs a merkle patricia trie from the ordered list passed and stores all encoded
+/// intermediate nodes of the trie in the [KeyValueStore].
+pub(crate) async fn store_ordered_trie>(
+ kv: &RwLock,
+ values: &[T],
+) -> Result<()> {
+ let mut kv_write_lock = kv.write().await;
+
+ // If the list of nodes is empty, store the empty root hash and exit early.
+ // The `HashBuilder` will not push the preimage of the empty root hash to the
+ // `ProofRetainer` in the event that there are no leaves inserted.
+ if values.is_empty() {
+ let empty_key = PreimageKey::new(*EMPTY_ROOT_HASH, PreimageKeyType::Keccak256);
+ return kv_write_lock.set(empty_key.into(), [EMPTY_STRING_CODE].into());
+ }
+
+ let mut hb = kona_mpt::ordered_trie_with_encoder(values, |node, buf| {
+ buf.put_slice(node.as_ref());
+ });
+ hb.root();
+ let intermediates = hb.take_proof_nodes().into_inner();
+
+ for (_, value) in intermediates.into_iter() {
+ let value_hash = keccak256(value.as_ref());
+ let key = PreimageKey::new(*value_hash, PreimageKeyType::Keccak256);
+
+ kv_write_lock.set(key.into(), value.into())?;
+ }
+
+ Ok(())
+}
diff --git a/bin/host/src/bin/host.rs b/bin/host/src/bin/host.rs
new file mode 100644
index 0000000000..c10415b374
--- /dev/null
+++ b/bin/host/src/bin/host.rs
@@ -0,0 +1,55 @@
+//! Main entrypoint for the host binary.
+
+#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+use anyhow::Result;
+use clap::{ArgAction, Parser, Subcommand};
+use kona_host::cli::{cli_styles, init_tracing_subscriber};
+use serde::Serialize;
+use tracing::info;
+
+const ABOUT: &str = "
+kona-host is a CLI application that runs the Kona pre-image server and client program. The host
+can run in two modes: server mode and native mode. In server mode, the host runs the pre-image
+server and waits for the client program in the parent process to request pre-images. In native
+mode, the host runs the client program in a separate thread with the pre-image server in the
+primary thread.
+";
+
+/// The host binary CLI application arguments.
+#[derive(Parser, Serialize, Clone, Debug)]
+#[command(about = ABOUT, version, styles = cli_styles())]
+pub struct HostCli {
+ /// Verbosity level (0-2)
+ #[arg(long, short, action = ArgAction::Count)]
+ pub v: u8,
+ /// Host mode
+ #[clap(subcommand)]
+ pub mode: HostMode,
+}
+
+/// Operation modes for the host binary.
+#[derive(Subcommand, Serialize, Clone, Debug)]
+#[allow(clippy::large_enum_variant)]
+pub enum HostMode {
+ /// Run the host in single-chain mode.
+ #[cfg(feature = "single")]
+ Single(kona_host::single::SingleChainHost),
+}
+
+#[tokio::main(flavor = "multi_thread")]
+async fn main() -> Result<()> {
+ let cfg = HostCli::parse();
+ init_tracing_subscriber(cfg.v)?;
+
+ match cfg.mode {
+ #[cfg(feature = "single")]
+ HostMode::Single(cfg) => {
+ cfg.start().await?;
+ }
+ }
+
+ Ok(())
+}
diff --git a/bin/host/src/cli/mod.rs b/bin/host/src/cli/mod.rs
index 4acdab56b1..d1117753ea 100644
--- a/bin/host/src/cli/mod.rs
+++ b/bin/host/src/cli/mod.rs
@@ -1,204 +1,14 @@
//! This module contains all CLI-specific code for the host binary.
-use crate::{
- blobs::OnlineBlobProvider,
- kv::{
- DiskKeyValueStore, LocalKeyValueStore, MemoryKeyValueStore, SharedKeyValueStore,
- SplitKeyValueStore,
- },
-};
-use alloy_primitives::B256;
-use alloy_provider::ReqwestProvider;
-use alloy_rpc_client::RpcClient;
-use alloy_transport_http::Http;
-use anyhow::{anyhow, Result};
-use clap::{
- builder::styling::{AnsiColor, Color, Style},
- ArgAction, Parser,
-};
-use op_alloy_genesis::RollupConfig;
-use reqwest::Client;
-use serde::Serialize;
-use std::{path::PathBuf, sync::Arc};
-use tokio::sync::RwLock;
+use clap::builder::styling::{AnsiColor, Color, Style};
-mod parser;
-pub(crate) use parser::parse_b256;
+pub mod parser;
mod tracing_util;
pub use tracing_util::init_tracing_subscriber;
-const ABOUT: &str = "
-kona-host is a CLI application that runs the Kona pre-image server and client program. The host
-can run in two modes: server mode and native mode. In server mode, the host runs the pre-image
-server and waits for the client program in the parent process to request pre-images. In native
-mode, the host runs the client program in a separate thread with the pre-image server in the
-primary thread.
-";
-
-/// The host binary CLI application arguments.
-#[derive(Default, Parser, Serialize, Clone, Debug)]
-#[command(about = ABOUT, version, styles = cli_styles())]
-pub struct HostCli {
- /// Verbosity level (0-2)
- #[arg(long, short, action = ArgAction::Count)]
- pub v: u8,
- /// Hash of the L1 head block. Derivation stops after this block is processed.
- #[clap(long, value_parser = parse_b256, env)]
- pub l1_head: B256,
- /// Hash of the agreed upon safe L2 block committed to by `--agreed-l2-output-root`.
- #[clap(long, visible_alias = "l2-head", value_parser = parse_b256, env)]
- pub agreed_l2_head_hash: B256,
- /// Agreed safe L2 Output Root to start derivation from.
- #[clap(long, visible_alias = "l2-output-root", value_parser = parse_b256, env)]
- pub agreed_l2_output_root: B256,
- /// Claimed L2 output root at block # `--claimed-l2-block-number` to validate.
- #[clap(long, visible_alias = "l2-claim", value_parser = parse_b256, env)]
- pub claimed_l2_output_root: B256,
- /// Number of the L2 block that the claimed output root commits to.
- #[clap(long, visible_alias = "l2-block-number", env)]
- pub claimed_l2_block_number: u64,
- /// Address of L2 JSON-RPC endpoint to use (eth and debug namespace required).
- #[clap(
- long,
- visible_alias = "l2",
- requires = "l1_node_address",
- requires = "l1_beacon_address",
- env
- )]
- pub l2_node_address: Option,
- /// Address of L1 JSON-RPC endpoint to use (eth and debug namespace required)
- #[clap(
- long,
- visible_alias = "l1",
- requires = "l2_node_address",
- requires = "l1_beacon_address",
- env
- )]
- pub l1_node_address: Option,
- /// Address of the L1 Beacon API endpoint to use.
- #[clap(
- long,
- visible_alias = "beacon",
- requires = "l1_node_address",
- requires = "l2_node_address",
- env
- )]
- pub l1_beacon_address: Option,
- /// The Data Directory for preimage data storage. Optional if running in online mode,
- /// required if running in offline mode.
- #[clap(
- long,
- visible_alias = "db",
- required_unless_present_all = ["l2_node_address", "l1_node_address", "l1_beacon_address"],
- env
- )]
- pub data_dir: Option,
- /// Run the client program natively.
- #[clap(long, conflicts_with = "server", required_unless_present = "server")]
- pub native: bool,
- /// Run in pre-image server mode without executing any client program. If not provided, the
- /// host will run the client program in the host process.
- #[clap(long, conflicts_with = "native", required_unless_present = "native")]
- pub server: bool,
- /// The L2 chain ID of a supported chain. If provided, the host will look for the corresponding
- /// rollup config in the superchain registry.
- #[clap(
- long,
- conflicts_with = "rollup_config_path",
- required_unless_present = "rollup_config_path",
- env
- )]
- pub l2_chain_id: Option,
- /// Path to rollup config. If provided, the host will use this config instead of attempting to
- /// look up the config in the superchain registry.
- #[clap(
- long,
- alias = "rollup-cfg",
- conflicts_with = "l2_chain_id",
- required_unless_present = "l2_chain_id",
- env
- )]
- pub rollup_config_path: Option,
-}
-
-impl HostCli {
- /// Returns `true` if the host is running in offline mode.
- pub const fn is_offline(&self) -> bool {
- self.l1_node_address.is_none() &&
- self.l2_node_address.is_none() &&
- self.l1_beacon_address.is_none()
- }
-
- /// Returns an HTTP provider for the given URL.
- fn http_provider(url: &str) -> ReqwestProvider {
- let url = url.parse().unwrap();
- let http = Http::::new(url);
- ReqwestProvider::new(RpcClient::new(http, true))
- }
-
- /// Creates the providers associated with the [HostCli] configuration.
- ///
- /// ## Returns
- /// - A [ReqwestProvider] for the L1 node.
- /// - An [OnlineBlobProvider] for the L1 beacon node.
- /// - A [ReqwestProvider] for the L2 node.
- pub async fn create_providers(
- &self,
- ) -> Result<(ReqwestProvider, OnlineBlobProvider, ReqwestProvider)> {
- let blob_provider = OnlineBlobProvider::new_http(
- self.l1_beacon_address.clone().ok_or(anyhow!("Beacon API URL must be set"))?,
- )
- .await
- .map_err(|e| anyhow!("Failed to load blob provider configuration: {e}"))?;
- let l1_provider = Self::http_provider(
- self.l1_node_address.as_ref().ok_or(anyhow!("Provider must be set"))?,
- );
- let l2_provider = Self::http_provider(
- self.l2_node_address.as_ref().ok_or(anyhow!("L2 node address must be set"))?,
- );
-
- Ok((l1_provider, blob_provider, l2_provider))
- }
-
- /// Parses the CLI arguments and returns a new instance of a [SharedKeyValueStore], as it is
- /// configured to be created.
- pub fn construct_kv_store(&self) -> SharedKeyValueStore {
- let local_kv_store = LocalKeyValueStore::new(self.clone());
-
- let kv_store: SharedKeyValueStore = if let Some(ref data_dir) = self.data_dir {
- let disk_kv_store = DiskKeyValueStore::new(data_dir.clone());
- let split_kv_store = SplitKeyValueStore::new(local_kv_store, disk_kv_store);
- Arc::new(RwLock::new(split_kv_store))
- } else {
- let mem_kv_store = MemoryKeyValueStore::new();
- let split_kv_store = SplitKeyValueStore::new(local_kv_store, mem_kv_store);
- Arc::new(RwLock::new(split_kv_store))
- };
-
- kv_store
- }
-
- /// Reads the [RollupConfig] from the file system and returns it as a string.
- pub fn read_rollup_config(&self) -> Result {
- let path = self.rollup_config_path.as_ref().ok_or_else(|| {
- anyhow::anyhow!(
- "No rollup config path provided. Please provide a path to the rollup config."
- )
- })?;
-
- // Read the serialized config from the file system.
- let ser_config = std::fs::read_to_string(path)
- .map_err(|e| anyhow!("Error reading RollupConfig file: {e}"))?;
-
- // Deserialize the config and return it.
- serde_json::from_str(&ser_config)
- .map_err(|e| anyhow!("Error deserializing RollupConfig: {e}"))
- }
-}
-
/// Styles for the CLI application.
-const fn cli_styles() -> clap::builder::Styles {
+pub const fn cli_styles() -> clap::builder::Styles {
clap::builder::Styles::styled()
.usage(Style::new().bold().underline().fg_color(Some(Color::Ansi(AnsiColor::Yellow))))
.header(Style::new().bold().underline().fg_color(Some(Color::Ansi(AnsiColor::Yellow))))
@@ -208,69 +18,3 @@ const fn cli_styles() -> clap::builder::Styles {
.valid(Style::new().bold().underline().fg_color(Some(Color::Ansi(AnsiColor::Green))))
.placeholder(Style::new().fg_color(Some(Color::Ansi(AnsiColor::White))))
}
-
-#[cfg(test)]
-mod test {
- use crate::HostCli;
- use alloy_primitives::B256;
- use clap::Parser;
-
- #[test]
- fn test_flags() {
- let zero_hash_str = &B256::ZERO.to_string();
- let default_flags = [
- "host",
- "--l1-head",
- zero_hash_str,
- "--l2-head",
- zero_hash_str,
- "--l2-output-root",
- zero_hash_str,
- "--l2-claim",
- zero_hash_str,
- "--l2-block-number",
- "0",
- ];
-
- let cases = [
- // valid
- (["--server", "--l2-chain-id", "0", "--data-dir", "dummy"].as_slice(), true),
- (["--server", "--rollup-config-path", "dummy", "--data-dir", "dummy"].as_slice(), true),
- (["--native", "--l2-chain-id", "0", "--data-dir", "dummy"].as_slice(), true),
- (["--native", "--rollup-config-path", "dummy", "--data-dir", "dummy"].as_slice(), true),
- (
- [
- "--l1-node-address",
- "dummy",
- "--l2-node-address",
- "dummy",
- "--l1-beacon-address",
- "dummy",
- "--server",
- "--l2-chain-id",
- "0",
- ]
- .as_slice(),
- true,
- ),
- // invalid
- (["--server", "--native", "--l2-chain-id", "0"].as_slice(), false),
- (["--l2-chain-id", "0", "--rollup-config-path", "dummy", "--server"].as_slice(), false),
- (["--server"].as_slice(), false),
- (["--native"].as_slice(), false),
- (["--rollup-config-path", "dummy"].as_slice(), false),
- (["--l2-chain-id", "0"].as_slice(), false),
- (["--l1-node-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
- (["--l2-node-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
- (["--l1-beacon-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
- ([].as_slice(), false),
- ];
-
- for (args_ext, valid) in cases.into_iter() {
- let args = default_flags.iter().chain(args_ext.iter()).cloned().collect::>();
-
- let parsed = HostCli::try_parse_from(args);
- assert_eq!(parsed.is_ok(), valid);
- }
- }
-}
diff --git a/bin/host/src/cli/parser.rs b/bin/host/src/cli/parser.rs
index a83ba55993..93ea29b279 100644
--- a/bin/host/src/cli/parser.rs
+++ b/bin/host/src/cli/parser.rs
@@ -1,13 +1,14 @@
-use alloy_primitives::B256;
+//! Parser functions for CLI arguments.
+
+use alloy_primitives::{hex, Bytes, B256};
use std::str::FromStr;
-/// Parse string slices into alloy_primitives bytes
-///
-/// # Arguments
-/// * `s` - string slice
-///
-/// # Returns
-/// * `Result` - Ok if successful, Err otherwise.
-pub(crate) fn parse_b256(s: &str) -> Result {
+/// Parse a string slice into [B256].
+pub fn parse_b256(s: &str) -> Result {
B256::from_str(s).map_err(|_| format!("Invalid B256 value: {}", s))
}
+
+/// Parse a string slice into [Bytes].
+pub fn parse_bytes(s: &str) -> Result {
+ hex::decode(s).map_err(|e| format!("Invalid hex string: {}", e)).map(Bytes::from)
+}
diff --git a/bin/host/src/eth/mod.rs b/bin/host/src/eth/mod.rs
new file mode 100644
index 0000000000..fbb1e1c919
--- /dev/null
+++ b/bin/host/src/eth/mod.rs
@@ -0,0 +1,16 @@
+//! Ethereum utilities for the host binary.
+
+use alloy_provider::{Network, RootProvider};
+use alloy_rpc_client::RpcClient;
+use alloy_transport_http::Http;
+use reqwest::Client;
+
+mod precompiles;
+pub(crate) use precompiles::execute;
+
+/// Returns an HTTP provider for the given URL.
+pub fn http_provider(url: &str) -> RootProvider {
+ let url = url.parse().unwrap();
+ let http = Http::::new(url);
+ RootProvider::new(RpcClient::new(http, true))
+}
diff --git a/bin/host/src/fetcher/precompiles.rs b/bin/host/src/eth/precompiles.rs
similarity index 67%
rename from bin/host/src/fetcher/precompiles.rs
rename to bin/host/src/eth/precompiles.rs
index e6c3bf1ba7..3950e90d49 100644
--- a/bin/host/src/fetcher/precompiles.rs
+++ b/bin/host/src/eth/precompiles.rs
@@ -9,8 +9,16 @@ use revm::{
/// List of precompiles that are accelerated by the host program.
pub(crate) const ACCELERATED_PRECOMPILES: &[PrecompileWithAddress] = &[
- precompile::secp256k1::ECRECOVER, // ecRecover
- precompile::bn128::pair::ISTANBUL, // ecPairing
+ precompile::secp256k1::ECRECOVER, // ecRecover
+ precompile::bn128::pair::ISTANBUL, // ecPairing
+ precompile::bls12_381::g1_add::PRECOMPILE, // BLS12-381 G1 Point Addition
+ precompile::bls12_381::g1_msm::PRECOMPILE, /* BLS12-381 G1 Point Multi-scalar
+ * Multiplication */
+ precompile::bls12_381::g2_add::PRECOMPILE, // BLS12-381 G2 Point Addition
+ precompile::bls12_381::g2_msm::PRECOMPILE, // BLS12-381 G2 Point Multi-scalar Multiplication
+ precompile::bls12_381::map_fp2_to_g2::PRECOMPILE, // BLS12-381 FP2 to G2 Point Mapping
+ precompile::bls12_381::map_fp_to_g1::PRECOMPILE, // BLS12-381 FP to G1 Point Mapping
+ precompile::bls12_381::pairing::PRECOMPILE, // BLS12-381 pairing
precompile::kzg_point_evaluation::POINT_EVALUATION, // KZG point evaluation
];
diff --git a/bin/host/src/fetcher/mod.rs b/bin/host/src/fetcher/mod.rs
deleted file mode 100644
index 75a87a801b..0000000000
--- a/bin/host/src/fetcher/mod.rs
+++ /dev/null
@@ -1,596 +0,0 @@
-//! This module contains the [Fetcher] struct, which is responsible for fetching preimages from a
-//! remote source.
-
-use crate::{blobs::OnlineBlobProvider, kv::KeyValueStore};
-use alloy_consensus::{Header, TxEnvelope, EMPTY_ROOT_HASH};
-use alloy_eips::{
- eip2718::Encodable2718,
- eip4844::{IndexedBlobHash, FIELD_ELEMENTS_PER_BLOB},
- BlockId,
-};
-use alloy_primitives::{address, keccak256, map::HashMap, Address, Bytes, B256};
-use alloy_provider::{Provider, ReqwestProvider};
-use alloy_rlp::{Decodable, EMPTY_STRING_CODE};
-use alloy_rpc_types::{
- debug::ExecutionWitness, Block, BlockNumberOrTag, BlockTransactions, BlockTransactionsKind,
- Transaction,
-};
-use anyhow::{anyhow, Result};
-use kona_preimage::{PreimageKey, PreimageKeyType};
-use kona_proof::{Hint, HintType};
-use op_alloy_protocol::BlockInfo;
-use op_alloy_rpc_types_engine::OpPayloadAttributes;
-use std::sync::Arc;
-use tokio::sync::RwLock;
-use tracing::{error, trace, warn};
-
-mod precompiles;
-
-/// The [Fetcher] struct is responsible for fetching preimages from a remote source.
-#[derive(Debug)]
-pub struct Fetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- /// Key-value store for preimages.
- kv_store: Arc>,
- /// L1 chain provider.
- l1_provider: ReqwestProvider,
- /// The blob provider
- blob_provider: OnlineBlobProvider,
- /// L2 chain provider.
- l2_provider: ReqwestProvider,
- /// L2 head
- l2_head: B256,
- /// The last hint that was received. [None] if no hint has been received yet.
- last_hint: Option,
-}
-
-impl Fetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- /// Create a new [Fetcher] with the given [KeyValueStore].
- pub const fn new(
- kv_store: Arc>,
- l1_provider: ReqwestProvider,
- blob_provider: OnlineBlobProvider,
- l2_provider: ReqwestProvider,
- l2_head: B256,
- ) -> Self {
- Self { kv_store, l1_provider, blob_provider, l2_provider, l2_head, last_hint: None }
- }
-
- /// Set the last hint to be received.
- pub fn hint(&mut self, hint: &str) {
- trace!(target: "fetcher", "Received hint: {hint}");
- self.last_hint = Some(hint.to_string());
- }
-
- /// Get the preimage for the given key.
- pub async fn get_preimage(&self, key: B256) -> Result> {
- trace!(target: "fetcher", "Pre-image requested. Key: {key}");
-
- // Acquire a read lock on the key-value store.
- let kv_lock = self.kv_store.read().await;
- let mut preimage = kv_lock.get(key);
-
- // Drop the read lock before beginning the retry loop.
- drop(kv_lock);
-
- // Use a loop to keep retrying the prefetch as long as the key is not found
- while preimage.is_none() && self.last_hint.is_some() {
- let hint = self.last_hint.as_ref().expect("Cannot be None");
-
- if let Err(e) = self.prefetch(hint).await {
- error!(target: "fetcher", "Failed to prefetch hint: {e}");
- warn!(target: "fetcher", "Retrying hint fetch: {hint}");
- continue;
- }
-
- let kv_lock = self.kv_store.read().await;
- preimage = kv_lock.get(key);
- }
-
- preimage.ok_or_else(|| anyhow!("Preimage not found."))
- }
-
- /// Fetch the preimage for the given hint and insert it into the key-value store.
- async fn prefetch(&self, hint: &str) -> Result<()> {
- let hint = Hint::parse(hint)?;
- let (hint_type, hint_data) = hint.split();
- trace!(target: "fetcher", "Fetching hint: {hint_type} {hint_data}");
-
- match hint_type {
- HintType::L1BlockHeader => {
- // Validate the hint data length.
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the raw header from the L1 chain provider.
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let raw_header: Bytes = self
- .l1_provider
- .client()
- .request("debug_getRawHeader", [hash])
- .await
- .map_err(|e| anyhow!(e))?;
-
- // Acquire a lock on the key-value store and set the preimage.
- let mut kv_lock = self.kv_store.write().await;
- kv_lock.set(
- PreimageKey::new(*hash, PreimageKeyType::Keccak256).into(),
- raw_header.into(),
- )?;
- }
- HintType::L1Transactions => {
- // Validate the hint data length.
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the block from the L1 chain provider and store the transactions within its
- // body in the key-value store.
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let Block { transactions, .. } = self
- .l1_provider
- .get_block_by_hash(hash, BlockTransactionsKind::Full)
- .await
- .map_err(|e| anyhow!("Failed to fetch block: {e}"))?
- .ok_or(anyhow!("Block not found."))?;
- self.store_transactions(transactions).await?;
- }
- HintType::L1Receipts => {
- // Validate the hint data length.
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the receipts from the L1 chain provider and store the receipts within the
- // key-value store.
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let raw_receipts: Vec = self
- .l1_provider
- .client()
- .request("debug_getRawReceipts", [hash])
- .await
- .map_err(|e| anyhow!(e))?;
- self.store_trie_nodes(raw_receipts.as_slice()).await?;
- }
- HintType::L1Blob => {
- if hint_data.len() != 48 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- let hash_data_bytes: [u8; 32] = hint_data[0..32]
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let index_data_bytes: [u8; 8] = hint_data[32..40]
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to u64: {e}"))?;
- let timestamp_data_bytes: [u8; 8] = hint_data[40..48]
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to u64: {e}"))?;
-
- let hash: B256 = hash_data_bytes.into();
- let index = u64::from_be_bytes(index_data_bytes);
- let timestamp = u64::from_be_bytes(timestamp_data_bytes);
-
- let partial_block_ref = BlockInfo { timestamp, ..Default::default() };
- let indexed_hash = IndexedBlobHash { index, hash };
-
- // Fetch the blob sidecar from the blob provider.
- let mut sidecars = self
- .blob_provider
- .fetch_filtered_sidecars(&partial_block_ref, &[indexed_hash])
- .await
- .map_err(|e| anyhow!("Failed to fetch blob sidecars: {e}"))?;
- if sidecars.len() != 1 {
- anyhow::bail!("Expected 1 sidecar, got {}", sidecars.len());
- }
- let sidecar = sidecars.remove(0);
-
- // Acquire a lock on the key-value store and set the preimages.
- let mut kv_write_lock = self.kv_store.write().await;
-
- // Set the preimage for the blob commitment.
- kv_write_lock.set(
- PreimageKey::new(*hash, PreimageKeyType::Sha256).into(),
- sidecar.kzg_commitment.to_vec(),
- )?;
-
- // Write all the field elements to the key-value store. There should be 4096.
- // The preimage oracle key for each field element is the keccak256 hash of
- // `abi.encodePacked(sidecar.KZGCommitment, uint256(i))`
- let mut blob_key = [0u8; 80];
- blob_key[..48].copy_from_slice(sidecar.kzg_commitment.as_ref());
- for i in 0..FIELD_ELEMENTS_PER_BLOB {
- blob_key[72..].copy_from_slice(i.to_be_bytes().as_ref());
- let blob_key_hash = keccak256(blob_key.as_ref());
-
- kv_write_lock.set(
- PreimageKey::new(*blob_key_hash, PreimageKeyType::Keccak256).into(),
- blob_key.into(),
- )?;
- kv_write_lock.set(
- PreimageKey::new(*blob_key_hash, PreimageKeyType::Blob).into(),
- sidecar.blob[(i as usize) << 5..(i as usize + 1) << 5].to_vec(),
- )?;
- }
-
- // Write the KZG Proof as the 4096th element.
- blob_key[72..].copy_from_slice((FIELD_ELEMENTS_PER_BLOB).to_be_bytes().as_ref());
- let blob_key_hash = keccak256(blob_key.as_ref());
-
- kv_write_lock.set(
- PreimageKey::new(*blob_key_hash, PreimageKeyType::Keccak256).into(),
- blob_key.into(),
- )?;
- kv_write_lock.set(
- PreimageKey::new(*blob_key_hash, PreimageKeyType::Blob).into(),
- sidecar.kzg_proof.to_vec(),
- )?;
- }
- HintType::L1Precompile => {
- // Validate the hint data length.
- if hint_data.len() < 20 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the precompile address from the hint data.
- let precompile_address = Address::from_slice(&hint_data.as_ref()[..20]);
- let precompile_input = hint_data[20..].to_vec();
- let input_hash = keccak256(hint_data.as_ref());
-
- let result = precompiles::execute(precompile_address, precompile_input)
- .map_or_else(
- |_| vec![0u8; 1],
- |raw_res| {
- let mut res = Vec::with_capacity(1 + raw_res.len());
- res.push(0x01);
- res.extend_from_slice(&raw_res);
- res
- },
- );
-
- // Acquire a lock on the key-value store and set the preimages.
- let mut kv_lock = self.kv_store.write().await;
- kv_lock.set(
- PreimageKey::new(*input_hash, PreimageKeyType::Keccak256).into(),
- hint_data.into(),
- )?;
- kv_lock.set(
- PreimageKey::new(*input_hash, PreimageKeyType::Precompile).into(),
- result,
- )?;
- }
- HintType::L2BlockHeader => {
- // Validate the hint data length.
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the raw header from the L2 chain provider.
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let raw_header: Bytes = self
- .l2_provider
- .client()
- .request("debug_getRawHeader", [hash])
- .await
- .map_err(|e| anyhow!(e))?;
-
- // Acquire a lock on the key-value store and set the preimage.
- let mut kv_lock = self.kv_store.write().await;
- kv_lock.set(
- PreimageKey::new(*hash, PreimageKeyType::Keccak256).into(),
- raw_header.into(),
- )?;
- }
- HintType::L2Transactions => {
- // Validate the hint data length.
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the block from the L2 chain provider and store the transactions within its
- // body in the key-value store.
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
- let Block { transactions, .. } = self
- .l2_provider
- .get_block_by_hash(hash, BlockTransactionsKind::Hashes)
- .await
- .map_err(|e| anyhow!("Failed to fetch block: {e}"))?
- .ok_or(anyhow!("Block not found."))?;
-
- match transactions {
- BlockTransactions::Hashes(transactions) => {
- let mut encoded_transactions = Vec::with_capacity(transactions.len());
- for tx_hash in transactions {
- let tx = self
- .l2_provider
- .client()
- .request::<&[B256; 1], Bytes>("debug_getRawTransaction", &[tx_hash])
- .await
- .map_err(|e| anyhow!("Error fetching transaction: {e}"))?;
- encoded_transactions.push(tx);
- }
-
- self.store_trie_nodes(encoded_transactions.as_slice()).await?;
- }
- _ => anyhow::bail!("Only BlockTransactions::Hashes are supported."),
- };
- }
- HintType::L2Code => {
- // geth hashdb scheme code hash key prefix
- const CODE_PREFIX: u8 = b'c';
-
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
-
- // Attempt to fetch the code from the L2 chain provider.
- let code_hash = [&[CODE_PREFIX], hash.as_slice()].concat();
- let code = self
- .l2_provider
- .client()
- .request::<&[Bytes; 1], Bytes>("debug_dbGet", &[code_hash.into()])
- .await;
-
- // Check if the first attempt to fetch the code failed. If it did, try fetching the
- // code hash preimage without the geth hashdb scheme prefix.
- let code = match code {
- Ok(code) => code,
- Err(_) => self
- .l2_provider
- .client()
- .request::<&[B256; 1], Bytes>("debug_dbGet", &[hash])
- .await
- .map_err(|e| anyhow!("Error fetching code hash preimage: {e}"))?,
- };
-
- let mut kv_write_lock = self.kv_store.write().await;
- kv_write_lock
- .set(PreimageKey::new(*hash, PreimageKeyType::Keccak256).into(), code.into())?;
- }
- HintType::StartingL2Output => {
- const OUTPUT_ROOT_VERSION: u8 = 0;
- const L2_TO_L1_MESSAGE_PASSER_ADDRESS: Address =
- address!("4200000000000000000000000000000000000016");
-
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- // Fetch the header for the L2 head block.
- let raw_header: Bytes = self
- .l2_provider
- .client()
- .request("debug_getRawHeader", &[self.l2_head])
- .await
- .map_err(|e| anyhow!("Failed to fetch header RLP: {e}"))?;
- let header = Header::decode(&mut raw_header.as_ref())
- .map_err(|e| anyhow!("Failed to decode header: {e}"))?;
-
- // Fetch the storage root for the L2 head block.
- let l2_to_l1_message_passer = self
- .l2_provider
- .get_proof(L2_TO_L1_MESSAGE_PASSER_ADDRESS, Default::default())
- .block_id(BlockId::Hash(self.l2_head.into()))
- .await
- .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?;
-
- let mut raw_output = [0u8; 128];
- raw_output[31] = OUTPUT_ROOT_VERSION;
- raw_output[32..64].copy_from_slice(header.state_root.as_ref());
- raw_output[64..96].copy_from_slice(l2_to_l1_message_passer.storage_hash.as_ref());
- raw_output[96..128].copy_from_slice(self.l2_head.as_ref());
- let output_root = keccak256(raw_output);
-
- if output_root.as_slice() != hint_data.as_ref() {
- anyhow::bail!("Output root does not match L2 head.");
- }
-
- let mut kv_write_lock = self.kv_store.write().await;
- kv_write_lock.set(
- PreimageKey::new(*output_root, PreimageKeyType::Keccak256).into(),
- raw_output.into(),
- )?;
- }
- HintType::L2StateNode => {
- if hint_data.len() != 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- let hash: B256 = hint_data
- .as_ref()
- .try_into()
- .map_err(|e| anyhow!("Failed to convert bytes to B256: {e}"))?;
-
- // Fetch the preimage from the L2 chain provider.
- let preimage: Bytes = self
- .l2_provider
- .client()
- .request("debug_dbGet", &[hash])
- .await
- .map_err(|e| anyhow!("Failed to fetch preimage: {e}"))?;
-
- let mut kv_write_lock = self.kv_store.write().await;
- kv_write_lock.set(
- PreimageKey::new(*hash, PreimageKeyType::Keccak256).into(),
- preimage.into(),
- )?;
- }
- HintType::L2AccountProof => {
- if hint_data.len() != 8 + 20 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- let block_number = u64::from_be_bytes(
- hint_data.as_ref()[..8]
- .try_into()
- .map_err(|e| anyhow!("Error converting hint data to u64: {e}"))?,
- );
- let address = Address::from_slice(&hint_data.as_ref()[8..28]);
-
- let proof_response = self
- .l2_provider
- .get_proof(address, Default::default())
- .block_id(BlockId::Number(BlockNumberOrTag::Number(block_number)))
- .await
- .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?;
-
- let mut kv_write_lock = self.kv_store.write().await;
-
- // Write the account proof nodes to the key-value store.
- proof_response.account_proof.into_iter().try_for_each(|node| {
- let node_hash = keccak256(node.as_ref());
- let key = PreimageKey::new(*node_hash, PreimageKeyType::Keccak256);
- kv_write_lock.set(key.into(), node.into())?;
- Ok::<(), anyhow::Error>(())
- })?;
- }
- HintType::L2AccountStorageProof => {
- if hint_data.len() != 8 + 20 + 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
-
- let block_number = u64::from_be_bytes(
- hint_data.as_ref()[..8]
- .try_into()
- .map_err(|e| anyhow!("Error converting hint data to u64: {e}"))?,
- );
- let address = Address::from_slice(&hint_data.as_ref()[8..28]);
- let slot = B256::from_slice(&hint_data.as_ref()[28..]);
-
- let mut proof_response = self
- .l2_provider
- .get_proof(address, vec![slot])
- .block_id(BlockId::Number(BlockNumberOrTag::Number(block_number)))
- .await
- .map_err(|e| anyhow!("Failed to fetch account proof: {e}"))?;
-
- let mut kv_write_lock = self.kv_store.write().await;
-
- // Write the account proof nodes to the key-value store.
- proof_response.account_proof.into_iter().try_for_each(|node| {
- let node_hash = keccak256(node.as_ref());
- let key = PreimageKey::new(*node_hash, PreimageKeyType::Keccak256);
- kv_write_lock.set(key.into(), node.into())?;
- Ok::<(), anyhow::Error>(())
- })?;
-
- // Write the storage proof nodes to the key-value store.
- let storage_proof = proof_response.storage_proof.remove(0);
- storage_proof.proof.into_iter().try_for_each(|node| {
- let node_hash = keccak256(node.as_ref());
- let key = PreimageKey::new(*node_hash, PreimageKeyType::Keccak256);
- kv_write_lock.set(key.into(), node.into())?;
- Ok::<(), anyhow::Error>(())
- })?;
- }
- HintType::L2PayloadWitness => {
- if hint_data.len() < 32 {
- anyhow::bail!("Invalid hint data length: {}", hint_data.len());
- }
- let parent_block_hash = B256::from_slice(&hint_data.as_ref()[..32]);
- let payload_attributes: OpPayloadAttributes =
- serde_json::from_slice(&hint_data[32..])?;
-
- let execute_payload_response: ExecutionWitness = self
- .l2_provider
- .client()
- .request::<(B256, OpPayloadAttributes), ExecutionWitness>(
- "debug_executePayload",
- (parent_block_hash, payload_attributes),
- )
- .await
- .map_err(|e| anyhow!("Failed to fetch preimage: {e}"))?;
-
- let mut merged = HashMap::::default();
- merged.extend(execute_payload_response.state);
- merged.extend(execute_payload_response.codes);
- merged.extend(execute_payload_response.keys);
-
- let mut kv_write_lock = self.kv_store.write().await;
- for (hash, preimage) in merged.into_iter() {
- let computed_hash = keccak256(preimage.as_ref());
- assert_eq!(computed_hash, hash, "Preimage hash does not match expected hash");
-
- let key = PreimageKey::new(*hash, PreimageKeyType::Keccak256);
- kv_write_lock.set(key.into(), preimage.into())?;
- }
- }
- }
-
- Ok(())
- }
-
- /// Stores a list of [BlockTransactions] in the key-value store.
- async fn store_transactions(&self, transactions: BlockTransactions) -> Result<()> {
- match transactions {
- BlockTransactions::Full(transactions) => {
- let encoded_transactions = transactions
- .into_iter()
- .map(|tx| {
- let envelope: TxEnvelope = tx.into();
-
- Ok::<_, anyhow::Error>(envelope.encoded_2718())
- })
- .collect::>>()?;
-
- self.store_trie_nodes(encoded_transactions.as_slice()).await
- }
- _ => anyhow::bail!("Only BlockTransactions::Full are supported."),
- }
- }
-
- /// Stores intermediate trie nodes in the key-value store. Assumes that all nodes passed are
- /// raw, RLP encoded trie nodes.
- async fn store_trie_nodes>(&self, nodes: &[T]) -> Result<()> {
- let mut kv_write_lock = self.kv_store.write().await;
-
- // If the list of nodes is empty, store the empty root hash and exit early.
- // The `HashBuilder` will not push the preimage of the empty root hash to the
- // `ProofRetainer` in the event that there are no leaves inserted.
- if nodes.is_empty() {
- let empty_key = PreimageKey::new(*EMPTY_ROOT_HASH, PreimageKeyType::Keccak256);
- return kv_write_lock.set(empty_key.into(), [EMPTY_STRING_CODE].into());
- }
-
- let mut hb = kona_mpt::ordered_trie_with_encoder(nodes, |node, buf| {
- buf.put_slice(node.as_ref());
- });
- hb.root();
- let intermediates = hb.take_proof_nodes().into_inner();
-
- for (_, value) in intermediates.into_iter() {
- let value_hash = keccak256(value.as_ref());
- let key = PreimageKey::new(*value_hash, PreimageKeyType::Keccak256);
-
- kv_write_lock.set(key.into(), value.into())?;
- }
-
- Ok(())
- }
-}
diff --git a/bin/host/src/kv/mod.rs b/bin/host/src/kv/mod.rs
index 78ef8c4fa4..65f41bce35 100644
--- a/bin/host/src/kv/mod.rs
+++ b/bin/host/src/kv/mod.rs
@@ -14,9 +14,6 @@ pub use disk::DiskKeyValueStore;
mod split;
pub use split::SplitKeyValueStore;
-mod local;
-pub use local::LocalKeyValueStore;
-
/// A type alias for a shared key-value store.
pub type SharedKeyValueStore = Arc>;
diff --git a/bin/host/src/lib.rs b/bin/host/src/lib.rs
index 0337777c91..e68d6416e9 100644
--- a/bin/host/src/lib.rs
+++ b/bin/host/src/lib.rs
@@ -1,122 +1,22 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
-#![cfg_attr(not(test), warn(unused_crate_dependencies))]
-pub mod blobs;
-pub mod cli;
-pub use cli::{init_tracing_subscriber, HostCli};
-
-pub mod fetcher;
-pub mod kv;
-pub mod preimage;
-pub mod server;
+mod server;
+pub use server::PreimageServer;
-use anyhow::Result;
-use fetcher::Fetcher;
-use kona_preimage::{
- BidirectionalChannel, HintReader, HintWriter, NativeChannel, OracleReader, OracleServer,
+mod kv;
+pub use kv::{
+ DiskKeyValueStore, KeyValueStore, MemoryKeyValueStore, SharedKeyValueStore, SplitKeyValueStore,
};
-use kona_std_fpvm::{FileChannel, FileDescriptor};
-use kv::KeyValueStore;
-use server::PreimageServer;
-use std::sync::Arc;
-use tokio::{sync::RwLock, task};
-use tracing::info;
-
-/// Starts the [PreimageServer] in the primary thread. In this mode, the host program has been
-/// invoked by the Fault Proof VM and the client program is running in the parent process.
-pub async fn start_server(cfg: HostCli) -> Result<()> {
- let (preimage_chan, hint_chan) = (
- FileChannel::new(FileDescriptor::PreimageRead, FileDescriptor::PreimageWrite),
- FileChannel::new(FileDescriptor::HintRead, FileDescriptor::HintWrite),
- );
- let oracle_server = OracleServer::new(preimage_chan);
- let hint_reader = HintReader::new(hint_chan);
- let kv_store = cfg.construct_kv_store();
- let fetcher = if !cfg.is_offline() {
- let (l1_provider, blob_provider, l2_provider) = cfg.create_providers().await?;
- Some(Arc::new(RwLock::new(Fetcher::new(
- kv_store.clone(),
- l1_provider,
- blob_provider,
- l2_provider,
- cfg.agreed_l2_head_hash,
- ))))
- } else {
- None
- };
-
- // Start the server and wait for it to complete.
- info!("Starting preimage server.");
- PreimageServer::new(oracle_server, hint_reader, kv_store, fetcher).start().await?;
- info!("Preimage server has exited.");
-
- Ok(())
-}
-/// Starts the [PreimageServer] and the client program in separate threads. The client program is
-/// ran natively in this mode.
-///
-/// ## Takes
-/// - `cfg`: The host configuration.
-///
-/// ## Returns
-/// - `Ok(exit_code)` if the client program exits successfully.
-/// - `Err(_)` if the client program failed to execute, was killed by a signal, or the host program
-/// exited first.
-pub async fn start_server_and_native_client(cfg: HostCli) -> Result {
- let hint_chan = BidirectionalChannel::new()?;
- let preimage_chan = BidirectionalChannel::new()?;
- let kv_store = cfg.construct_kv_store();
- let fetcher = if !cfg.is_offline() {
- let (l1_provider, blob_provider, l2_provider) = cfg.create_providers().await?;
- Some(Arc::new(RwLock::new(Fetcher::new(
- kv_store.clone(),
- l1_provider,
- blob_provider,
- l2_provider,
- cfg.agreed_l2_head_hash,
- ))))
- } else {
- None
- };
+mod backend;
+pub use backend::{HintHandler, OfflineHostBackend, OnlineHostBackend, OnlineHostBackendCfg};
- // Create the server and start it.
- let server_task = task::spawn(start_native_preimage_server(
- kv_store,
- fetcher,
- hint_chan.host,
- preimage_chan.host,
- ));
-
- // Start the client program in a separate child process.
- let program_task = task::spawn(kona_client::run(
- OracleReader::new(preimage_chan.client),
- HintWriter::new(hint_chan.client),
- None,
- ));
-
- // Execute both tasks and wait for them to complete.
- info!("Starting preimage server and client program.");
- let (_, client_result) = tokio::try_join!(server_task, program_task,)?;
- info!(target: "kona_host", "Preimage server and client program have joined.");
-
- Ok(client_result.is_err() as i32)
-}
+pub mod cli;
-/// Starts the preimage server in a separate thread. The client program is ran natively in this
-/// mode.
-pub async fn start_native_preimage_server(
- kv_store: Arc>,
- fetcher: Option>>>,
- hint_chan: NativeChannel,
- preimage_chan: NativeChannel,
-) -> Result<()>
-where
- KV: KeyValueStore + Send + Sync + ?Sized + 'static,
-{
- let hint_reader = HintReader::new(hint_chan);
- let oracle_server = OracleServer::new(preimage_chan);
+pub mod eth;
- PreimageServer::new(oracle_server, hint_reader, kv_store, fetcher).start().await
-}
+#[cfg(feature = "single")]
+pub mod single;
+mod witness;
+pub use witness::{EigenDABlobWitness};
diff --git a/bin/host/src/main.rs b/bin/host/src/main.rs
deleted file mode 100644
index d6992589f1..0000000000
--- a/bin/host/src/main.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-//! Main entrypoint for the host binary.
-
-use anyhow::Result;
-use clap::Parser;
-use kona_host::{init_tracing_subscriber, start_server, start_server_and_native_client, HostCli};
-use tracing::{error, info};
-
-#[tokio::main(flavor = "multi_thread")]
-async fn main() -> Result<()> {
- let cfg = HostCli::parse();
- init_tracing_subscriber(cfg.v)?;
-
- if cfg.server {
- start_server(cfg).await?;
- } else {
- let status = match start_server_and_native_client(cfg).await {
- Ok(status) => status,
- Err(e) => {
- error!(target: "kona_host", "Exited with an error: {:?}", e);
- panic!("{e}");
- }
- };
-
- // Bubble up the exit status of the client program.
- std::process::exit(status as i32);
- }
-
- info!("Exiting host program.");
- Ok(())
-}
diff --git a/bin/host/src/preimage.rs b/bin/host/src/preimage.rs
deleted file mode 100644
index d184016f25..0000000000
--- a/bin/host/src/preimage.rs
+++ /dev/null
@@ -1,115 +0,0 @@
-//! Contains the implementations of the [HintRouter] and [PreimageFetcher] traits.]
-
-use crate::{fetcher::Fetcher, kv::KeyValueStore};
-use async_trait::async_trait;
-use kona_preimage::{
- errors::{PreimageOracleError, PreimageOracleResult},
- HintRouter, PreimageFetcher, PreimageKey,
-};
-use std::sync::Arc;
-use tokio::sync::RwLock;
-
-/// A [Fetcher]-backed implementation of the [PreimageFetcher] trait.
-#[derive(Debug)]
-pub struct OnlinePreimageFetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- inner: Arc>>,
-}
-
-#[async_trait]
-impl PreimageFetcher for OnlinePreimageFetcher
-where
- KV: KeyValueStore + Send + Sync + ?Sized,
-{
- async fn get_preimage(&self, key: PreimageKey) -> PreimageOracleResult> {
- let fetcher = self.inner.read().await;
- fetcher
- .get_preimage(key.into())
- .await
- .map_err(|e| PreimageOracleError::Other(e.to_string()))
- }
-}
-
-impl OnlinePreimageFetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- /// Create a new [OnlinePreimageFetcher] from the given [Fetcher].
- pub const fn new(fetcher: Arc>>) -> Self {
- Self { inner: fetcher }
- }
-}
-
-/// A [KeyValueStore]-backed implementation of the [PreimageFetcher] trait.
-#[derive(Debug)]
-pub struct OfflinePreimageFetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- inner: Arc>,
-}
-
-#[async_trait]
-impl PreimageFetcher for OfflinePreimageFetcher
-where
- KV: KeyValueStore + Send + Sync + ?Sized,
-{
- async fn get_preimage(&self, key: PreimageKey) -> PreimageOracleResult> {
- let kv_store = self.inner.read().await;
- kv_store.get(key.into()).ok_or(PreimageOracleError::KeyNotFound)
- }
-}
-
-impl OfflinePreimageFetcher
-where
- KV: KeyValueStore + ?Sized,
-{
- /// Create a new [OfflinePreimageFetcher] from the given [KeyValueStore].
- pub const fn new(kv_store: Arc>) -> Self {
- Self { inner: kv_store }
- }
-}
-
-/// A [Fetcher]-backed implementation of the [HintRouter] trait.
-#[derive(Debug)]
-pub struct OnlineHintRouter
-where
- KV: KeyValueStore + ?Sized,
-{
- inner: Arc>>,
-}
-
-#[async_trait]
-impl HintRouter for OnlineHintRouter
-where
- KV: KeyValueStore + Send + Sync + ?Sized,
-{
- async fn route_hint(&self, hint: String) -> PreimageOracleResult<()> {
- let mut fetcher = self.inner.write().await;
- fetcher.hint(&hint);
- Ok(())
- }
-}
-
-impl OnlineHintRouter
-where
- KV: KeyValueStore + ?Sized,
-{
- /// Create a new [OnlineHintRouter] from the given [Fetcher].
- pub const fn new(fetcher: Arc>>) -> Self {
- Self { inner: fetcher }
- }
-}
-
-/// An [OfflineHintRouter] is a [HintRouter] that does nothing.
-#[derive(Debug)]
-pub struct OfflineHintRouter;
-
-#[async_trait]
-impl HintRouter for OfflineHintRouter {
- async fn route_hint(&self, _hint: String) -> PreimageOracleResult<()> {
- Ok(())
- }
-}
diff --git a/bin/host/src/server.rs b/bin/host/src/server.rs
index 5d857676be..f1601bbd9b 100644
--- a/bin/host/src/server.rs
+++ b/bin/host/src/server.rs
@@ -1,70 +1,44 @@
//! This module contains the [PreimageServer] struct and its implementation.
-use crate::{
- fetcher::Fetcher,
- kv::KeyValueStore,
- preimage::{
- OfflineHintRouter, OfflinePreimageFetcher, OnlineHintRouter, OnlinePreimageFetcher,
- },
-};
use anyhow::{anyhow, Result};
use kona_preimage::{
- errors::PreimageOracleError, HintReaderServer, HintRouter, PreimageFetcher,
- PreimageOracleServer,
+ errors::PreimageOracleError, HintReaderServer, PreimageOracleServer, PreimageServerBackend,
};
use std::sync::Arc;
-use tokio::{spawn, sync::RwLock};
+use tokio::spawn;
use tracing::{error, info};
/// The [PreimageServer] is responsible for waiting for incoming preimage requests and
/// serving them to the client.
#[derive(Debug)]
-pub struct PreimageServer
-where
- P: PreimageOracleServer,
- H: HintReaderServer,
- KV: KeyValueStore + ?Sized,
-{
+pub struct PreimageServer
{
/// The oracle server.
oracle_server: P,
/// The hint router.
hint_reader: H,
- /// Key-value store for preimages.
- kv_store: Arc>,
- /// The fetcher for fetching preimages from a remote source. If [None], the server will only
- /// serve preimages that are already in the key-value store.
- fetcher: Option>>>,
+ /// [PreimageServerBackend] that routes hints and retrieves preimages.
+ backend: Arc,
}
-impl PreimageServer
+impl
PreimageServer
where
P: PreimageOracleServer + Send + Sync + 'static,
H: HintReaderServer + Send + Sync + 'static,
- KV: KeyValueStore + Send + Sync + ?Sized + 'static,
+ B: PreimageServerBackend + Send + Sync + 'static,
{
/// Create a new [PreimageServer] with the given [PreimageOracleServer],
- /// [HintReaderServer], and [KeyValueStore]. Holds onto the file descriptors for the pipes
- /// that are created, so that the pipes are not closed until the server is dropped.
- pub const fn new(
- oracle_server: P,
- hint_reader: H,
- kv_store: Arc>,
- fetcher: Option>>>,
- ) -> Self {
- Self { oracle_server, hint_reader, kv_store, fetcher }
+ /// [HintReaderServer], and [PreimageServerBackend].
+ pub const fn new(oracle_server: P, hint_reader: H, backend: Arc) -> Self {
+ Self { oracle_server, hint_reader, backend }
}
/// Starts the [PreimageServer] and waits for incoming requests.
pub async fn start(self) -> Result<()> {
// Create the futures for the oracle server and hint router.
- let server = spawn(Self::start_oracle_server(
- self.kv_store.clone(),
- self.fetcher.clone(),
- self.oracle_server,
- ));
- let hint_router = spawn(Self::start_hint_router(self.hint_reader, self.fetcher));
+ let server = spawn(Self::start_oracle_server(self.oracle_server, self.backend.clone()));
+ let hint_router = spawn(Self::start_hint_router(self.hint_reader, self.backend.clone()));
- // Spawn tasks for the futures and wait for them to complete.
+ // Race the two futures to completion, returning the result of the first one to finish.
tokio::select! {
s = server => s.map_err(|e| anyhow!(e))?,
h = hint_router => h.map_err(|e| anyhow!(e))?,
@@ -73,66 +47,37 @@ where
/// Starts the oracle server, which waits for incoming preimage requests and serves them to the
/// client.
- async fn start_oracle_server(
- kv_store: Arc>,
- fetcher: Option>>>,
- oracle_server: P,
- ) -> Result<()> {
- #[inline(always)]
- async fn do_loop(fetcher: &F, server: &P) -> Result<()>
- where
- F: PreimageFetcher + Send + Sync,
- P: PreimageOracleServer,
- {
- loop {
- match server.next_preimage_request(fetcher).await {
- Ok(_) => continue,
- Err(PreimageOracleError::IOError(_)) => return Ok(()),
- Err(e) => {
- error!("Failed to serve preimage request: {e}");
- return Err(anyhow!("Failed to serve preimage request: {e}"));
- }
+ async fn start_oracle_server(oracle_server: P, backend: Arc) -> Result<()> {
+ info!(target: "host-server", "Starting oracle server");
+ loop {
+ // Serve the next preimage request. This `await` will yield to the runtime
+ // if no progress can be made.
+ match oracle_server.next_preimage_request(backend.as_ref()).await {
+ Ok(_) => continue,
+ Err(PreimageOracleError::IOError(_)) => return Ok(()),
+ Err(e) => {
+ error!("Failed to serve preimage request: {e}");
+ return Err(anyhow!("Failed to serve preimage request: {e}"));
}
}
}
-
- info!("Starting oracle server");
- if let Some(fetcher) = fetcher.as_ref() {
- do_loop(&OnlinePreimageFetcher::new(Arc::clone(fetcher)), &oracle_server).await
- } else {
- do_loop(&OfflinePreimageFetcher::new(Arc::clone(&kv_store)), &oracle_server).await
- }
}
/// Starts the hint router, which waits for incoming hints and routes them to the appropriate
/// handler.
- async fn start_hint_router(
- hint_reader: H,
- fetcher: Option>>>,
- ) -> Result<()> {
- #[inline(always)]
- async fn do_loop(router: &R, server: &H) -> Result<()>
- where
- R: HintRouter + Send + Sync,
- H: HintReaderServer,
- {
- loop {
- match server.next_hint(router).await {
- Ok(_) => continue,
- Err(PreimageOracleError::IOError(_)) => return Ok(()),
- Err(e) => {
- error!("Failed to serve route hint: {e}");
- return Err(anyhow!("Failed to route hint: {e}"));
- }
+ async fn start_hint_router(hint_reader: H, backend: Arc) -> Result<()> {
+ info!(target: "host-server", "Starting hint router");
+ loop {
+ // Route the next hint. This `await` will yield to the runtime if no progress can be
+ // made.
+ match hint_reader.next_hint(backend.as_ref()).await {
+ Ok(_) => continue,
+ Err(PreimageOracleError::IOError(_)) => return Ok(()),
+ Err(e) => {
+ error!("Failed to serve route hint: {e}");
+ return Err(anyhow!("Failed to route hint: {e}"));
}
}
}
-
- info!("Starting hint router");
- if let Some(fetcher) = fetcher.as_ref() {
- do_loop(&OnlineHintRouter::new(Arc::clone(fetcher)), &hint_reader).await
- } else {
- do_loop(&OfflineHintRouter, &hint_reader).await
- }
}
}
diff --git a/bin/host/src/single/cfg.rs b/bin/host/src/single/cfg.rs
new file mode 100644
index 0000000000..0ca4f36cb9
--- /dev/null
+++ b/bin/host/src/single/cfg.rs
@@ -0,0 +1,389 @@
+//! This module contains all CLI-specific code for the single chain entrypoint.
+
+use super::{SingleChainHintHandler, SingleChainLocalInputs};
+use crate::{
+ cli::{cli_styles, parser::parse_b256},
+ eth::http_provider,
+ DiskKeyValueStore, MemoryKeyValueStore, OfflineHostBackend, OnlineHostBackend,
+ OnlineHostBackendCfg, PreimageServer, SharedKeyValueStore, SplitKeyValueStore,
+};
+use alloy_primitives::B256;
+use alloy_provider::RootProvider;
+use anyhow::{anyhow, Result};
+use clap::Parser;
+use eigen_da::EigenDaConfig;
+use kona_preimage::{
+ BidirectionalChannel, Channel, HintReader, HintWriter, OracleReader, OracleServer,
+};
+use kona_proof::HintType;
+use kona_providers_alloy::{
+ EigenDaProxy, OnlineBeaconClient, OnlineBlobProvider, OnlineEigenDaProvider,
+};
+use kona_std_fpvm::{FileChannel, FileDescriptor};
+use op_alloy_genesis::RollupConfig;
+use op_alloy_network::Optimism;
+use serde::Serialize;
+use std::time::Duration;
+use std::{path::PathBuf, sync::Arc};
+use tokio::{
+ sync::RwLock,
+ task::{self, JoinHandle},
+};
+
+/// The host binary CLI application arguments.
+#[derive(Default, Parser, Serialize, Clone, Debug)]
+#[command(styles = cli_styles())]
+pub struct SingleChainHost {
+ /// Hash of the L1 head block. Derivation stops after this block is processed.
+ #[clap(long, value_parser = parse_b256, env)]
+ pub l1_head: B256,
+ /// Hash of the agreed upon safe L2 block committed to by `--agreed-l2-output-root`.
+ #[clap(long, visible_alias = "l2-head", value_parser = parse_b256, env)]
+ pub agreed_l2_head_hash: B256,
+ /// Agreed safe L2 Output Root to start derivation from.
+ #[clap(long, visible_alias = "l2-output-root", value_parser = parse_b256, env)]
+ pub agreed_l2_output_root: B256,
+ /// Claimed L2 output root at block # `--claimed-l2-block-number` to validate.
+ #[clap(long, visible_alias = "l2-claim", value_parser = parse_b256, env)]
+ pub claimed_l2_output_root: B256,
+ /// Number of the L2 block that the claimed output root commits to.
+ #[clap(long, visible_alias = "l2-block-number", env)]
+ pub claimed_l2_block_number: u64,
+ /// Address of L2 JSON-RPC endpoint to use (eth and debug namespace required).
+ #[clap(
+ long,
+ visible_alias = "l2",
+ requires = "l1_node_address",
+ requires = "l1_beacon_address",
+ env
+ )]
+ pub l2_node_address: Option,
+ /// Address of L1 JSON-RPC endpoint to use (eth and debug namespace required)
+ #[clap(
+ long,
+ visible_alias = "l1",
+ requires = "l2_node_address",
+ requires = "l1_beacon_address",
+ env
+ )]
+ pub l1_node_address: Option,
+ /// Address of the L1 Beacon API endpoint to use.
+ #[clap(
+ long,
+ visible_alias = "beacon",
+ requires = "l1_node_address",
+ requires = "l2_node_address",
+ env
+ )]
+ pub l1_beacon_address: Option,
+ /// The Data Directory for preimage data storage. Optional if running in online mode,
+ /// required if running in offline mode.
+ #[clap(
+ long,
+ visible_alias = "db",
+ required_unless_present_all = ["l2_node_address", "l1_node_address", "l1_beacon_address"],
+ env
+ )]
+ pub data_dir: Option,
+ /// Run the client program natively.
+ #[clap(long, conflicts_with = "server", required_unless_present = "server")]
+ pub native: bool,
+ /// Run in pre-image server mode without executing any client program. If not provided, the
+ /// host will run the client program in the host process.
+ #[clap(long, conflicts_with = "native", required_unless_present = "native")]
+ pub server: bool,
+ /// The L2 chain ID of a supported chain. If provided, the host will look for the corresponding
+ /// rollup config in the superchain registry.
+ #[clap(
+ long,
+ conflicts_with = "rollup_config_path",
+ required_unless_present = "rollup_config_path",
+ env
+ )]
+ pub l2_chain_id: Option,
+ /// Path to rollup config. If provided, the host will use this config instead of attempting to
+ /// look up the config in the superchain registry.
+ #[clap(
+ long,
+ alias = "rollup-cfg",
+ conflicts_with = "l2_chain_id",
+ required_unless_present = "l2_chain_id",
+ env
+ )]
+ pub rollup_config_path: Option,
+ /// The url of Mantle da indexer.
+ #[clap(long, alias = "da-indexer-url", env)]
+ pub mantle_da_indexer_url: Option,
+ /// The url of EigenDA Proxy service
+ #[clap(
+ long,
+ alias = "proxy-url",
+ conflicts_with = "mantle_da_indexer_url",
+ required_unless_present = "mantle_da_indexer_url",
+ env
+ )]
+ pub proxy_url: Option,
+ /// EigenDA Disperser RPC URL
+ /// does not need to be configured in derive.
+ #[clap(long, alias = "disperse-url", conflicts_with = "mantle_da_indexer_url", env)]
+ pub disperse_url: Option,
+ /// The total amount of time that the batcher will spend waiting for EigenDA to disperse a blob
+ /// does not need to be configured in derive.
+ #[clap(long,
+ alias = "disperse-timeout",
+ conflicts_with = "mantle_da_indexer_url",
+ default_value = "120",
+ value_parser = parse_duration,
+ env
+ )]
+ pub disperse_timeout: Duration,
+ /// The total amount of time that the batcher will spend waiting for EigenDA to retrieve a blob
+ #[clap(long,
+ alias = "retrieve-timeout",
+ conflicts_with = "mantle_da_indexer_url",
+ default_value = "120",
+ value_parser = parse_duration,
+ env
+ )]
+ pub retrieve_timeout: Duration,
+}
+
+fn parse_duration(input: &str) -> Result {
+ input
+ .parse::()
+ .map(Duration::from_secs)
+ .map_err(|e| format!("Failed to parse duration: {}", e))
+}
+
+impl SingleChainHost {
+ /// Starts the [SingleChainHost] application.
+ pub async fn start(self) -> Result<()> {
+ if self.server {
+ let hint = FileChannel::new(FileDescriptor::HintRead, FileDescriptor::HintWrite);
+ let preimage =
+ FileChannel::new(FileDescriptor::PreimageRead, FileDescriptor::PreimageWrite);
+
+ self.start_server(hint, preimage).await?.await?
+ } else {
+ self.start_native().await
+ }
+ }
+
+ /// Starts the preimage server, communicating with the client over the provided channels.
+ pub async fn start_server(&self, hint: C, preimage: C) -> Result>>
+ where
+ C: Channel + Send + Sync + 'static,
+ {
+ let kv_store = self.create_key_value_store()?;
+
+ let task_handle = if self.is_offline() {
+ task::spawn(
+ PreimageServer::new(
+ OracleServer::new(preimage),
+ HintReader::new(hint),
+ Arc::new(OfflineHostBackend::new(kv_store)),
+ )
+ .start(),
+ )
+ } else {
+ let providers = self.create_providers().await?;
+ let backend = OnlineHostBackend::new(
+ self.clone(),
+ kv_store.clone(),
+ providers,
+ SingleChainHintHandler,
+ );
+
+ task::spawn(
+ PreimageServer::new(
+ OracleServer::new(preimage),
+ HintReader::new(hint),
+ Arc::new(backend),
+ )
+ .start(),
+ )
+ };
+
+ Ok(task_handle)
+ }
+
+ /// Starts the host in native mode, running both the client and preimage server in the same
+ /// process.
+ async fn start_native(&self) -> Result<()> {
+ let hint = BidirectionalChannel::new()?;
+ let preimage = BidirectionalChannel::new()?;
+
+ let server_task = self.start_server(hint.host, preimage.host).await?;
+ let client_task = task::spawn(kona_client::single::run(
+ OracleReader::new(preimage.client),
+ HintWriter::new(hint.client),
+ None,
+ ));
+
+ let (_, client_result) = tokio::try_join!(server_task, client_task)?;
+
+ // Bubble up the exit status of the client program if execution completes.
+ std::process::exit(client_result.is_err() as i32)
+ }
+
+ /// Returns `true` if the host is running in offline mode.
+ pub const fn is_offline(&self) -> bool {
+ self.l1_node_address.is_none()
+ && self.l2_node_address.is_none()
+ && self.l1_beacon_address.is_none()
+ && self.data_dir.is_some()
+ }
+
+ /// Reads the [RollupConfig] from the file system and returns it as a string.
+ pub fn read_rollup_config(&self) -> Result {
+ let path = self.rollup_config_path.as_ref().ok_or_else(|| {
+ anyhow::anyhow!(
+ "No rollup config path provided. Please provide a path to the rollup config."
+ )
+ })?;
+
+ // Read the serialized config from the file system.
+ let ser_config = std::fs::read_to_string(path)
+ .map_err(|e| anyhow!("Error reading RollupConfig file: {e}"))?;
+
+ // Deserialize the config and return it.
+ serde_json::from_str(&ser_config)
+ .map_err(|e| anyhow!("Error deserializing RollupConfig: {e}"))
+ }
+
+ /// Creates the key-value store for the host backend.
+ fn create_key_value_store(&self) -> Result {
+ let local_kv_store = SingleChainLocalInputs::new(self.clone());
+
+ let kv_store: SharedKeyValueStore = if let Some(ref data_dir) = self.data_dir {
+ let disk_kv_store = DiskKeyValueStore::new(data_dir.clone());
+ let split_kv_store = SplitKeyValueStore::new(local_kv_store, disk_kv_store);
+ Arc::new(RwLock::new(split_kv_store))
+ } else {
+ let mem_kv_store = MemoryKeyValueStore::new();
+ let split_kv_store = SplitKeyValueStore::new(local_kv_store, mem_kv_store);
+ Arc::new(RwLock::new(split_kv_store))
+ };
+
+ Ok(kv_store)
+ }
+
+ /// Creates the providers required for the host backend.
+ async fn create_providers(&self) -> Result {
+ let l1_provider =
+ http_provider(self.l1_node_address.as_ref().ok_or(anyhow!("Provider must be set"))?);
+ let blob_provider = OnlineBlobProvider::init(OnlineBeaconClient::new_http(
+ self.l1_beacon_address.clone().ok_or(anyhow!("Beacon API URL must be set"))?,
+ ))
+ .await;
+ let l2_provider = http_provider::(
+ self.l2_node_address.as_ref().ok_or(anyhow!("L2 node address must be set"))?,
+ );
+
+ let mut eigen_da_config = EigenDaConfig::default();
+ let mut eigen_proxy_url = "".to_string();
+ let da_indexer_url = "".to_string();
+ let mantle_da_indexer = false;
+
+ if da_indexer_url.is_empty() {
+ eigen_proxy_url =
+ self.proxy_url.clone().ok_or(anyhow!("EigenDA Proxy URL must be set"))?;
+ }
+ eigen_da_config.proxy_url = eigen_proxy_url;
+ eigen_da_config.retrieve_blob_timeout = self.retrieve_timeout;
+ let eigen_da_provider = EigenDaProxy::new(eigen_da_config);
+ let eigen_da =
+ OnlineEigenDaProvider::new(eigen_da_provider, da_indexer_url, mantle_da_indexer);
+
+ Ok(SingleChainProviders {
+ l1: l1_provider,
+ blobs: blob_provider,
+ l2: l2_provider,
+ eigen_da,
+ })
+ }
+}
+
+impl OnlineHostBackendCfg for SingleChainHost {
+ type HintType = HintType;
+ type Providers = SingleChainProviders;
+}
+
+/// The providers required for the single chain host.
+#[derive(Debug, Clone)]
+pub struct SingleChainProviders {
+ /// The L1 EL provider.
+ pub l1: RootProvider,
+ /// The L1 beacon node provider.
+ pub blobs: OnlineBlobProvider,
+ /// The L2 EL provider.
+ pub l2: RootProvider,
+ /// The EigenDa provider.
+ pub eigen_da: OnlineEigenDaProvider,
+}
+
+#[cfg(test)]
+mod test {
+ use crate::single::SingleChainHost;
+ use alloy_primitives::B256;
+ use clap::Parser;
+
+ #[test]
+ fn test_flags() {
+ let zero_hash_str = &B256::ZERO.to_string();
+ let default_flags = [
+ "single",
+ "--l1-head",
+ zero_hash_str,
+ "--l2-head",
+ zero_hash_str,
+ "--l2-output-root",
+ zero_hash_str,
+ "--l2-claim",
+ zero_hash_str,
+ "--l2-block-number",
+ "0",
+ ];
+
+ let cases = [
+ // valid
+ (["--server", "--l2-chain-id", "0", "--data-dir", "dummy"].as_slice(), true),
+ (["--server", "--rollup-config-path", "dummy", "--data-dir", "dummy"].as_slice(), true),
+ (["--native", "--l2-chain-id", "0", "--data-dir", "dummy"].as_slice(), true),
+ (["--native", "--rollup-config-path", "dummy", "--data-dir", "dummy"].as_slice(), true),
+ (
+ [
+ "--l1-node-address",
+ "dummy",
+ "--l2-node-address",
+ "dummy",
+ "--l1-beacon-address",
+ "dummy",
+ "--server",
+ "--l2-chain-id",
+ "0",
+ ]
+ .as_slice(),
+ true,
+ ),
+ // invalid
+ (["--server", "--native", "--l2-chain-id", "0"].as_slice(), false),
+ (["--l2-chain-id", "0", "--rollup-config-path", "dummy", "--server"].as_slice(), false),
+ (["--server"].as_slice(), false),
+ (["--native"].as_slice(), false),
+ (["--rollup-config-path", "dummy"].as_slice(), false),
+ (["--l2-chain-id", "0"].as_slice(), false),
+ (["--l1-node-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
+ (["--l2-node-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
+ (["--l1-beacon-address", "dummy", "--server", "--l2-chain-id", "0"].as_slice(), false),
+ ([].as_slice(), false),
+ ];
+
+ for (args_ext, valid) in cases.into_iter() {
+ let args = default_flags.iter().chain(args_ext.iter()).cloned().collect::>();
+
+ let parsed = SingleChainHost::try_parse_from(args);
+ assert_eq!(parsed.is_ok(), valid);
+ }
+ }
+}
diff --git a/bin/host/src/single/handler.rs b/bin/host/src/single/handler.rs
new file mode 100644
index 0000000000..0c798888b2
--- /dev/null
+++ b/bin/host/src/single/handler.rs
@@ -0,0 +1,483 @@
+//! [HintHandler] for the [SingleChainHost].
+
+use crate::{
+ backend::util::store_ordered_trie, kv::SharedKeyValueStore, single::cfg::SingleChainHost,
+ EigenDABlobWitness, HintHandler, OnlineHostBackendCfg,
+};
+use alloy_consensus::Header;
+use alloy_eips::{
+ eip2718::Encodable2718,
+ eip4844::{IndexedBlobHash, FIELD_ELEMENTS_PER_BLOB},
+};
+use alloy_primitives::{address, keccak256, Address, Bytes, B256};
+use alloy_provider::Provider;
+use alloy_rlp::Decodable;
+use alloy_rpc_types::{debug::ExecutionWitness, Block, BlockTransactionsKind};
+use anyhow::{anyhow, ensure, Result};
+use async_trait::async_trait;
+use eigen_da::{BlobInfo, EigenDABlobData, BYTES_PER_FIELD_ELEMENT};
+use kona_preimage::{PreimageKey, PreimageKeyType};
+use kona_proof::{Hint, HintType};
+use op_alloy_protocol::BlockInfo;
+use op_alloy_rpc_types_engine::OpPayloadAttributes;
+use std::collections::HashMap;
+use tracing::{debug, info};
+
+/// The [HintHandler] for the [SingleChainHost].
+#[derive(Debug, Clone, Copy)]
+pub struct SingleChainHintHandler;
+
+#[async_trait]
+impl HintHandler for SingleChainHintHandler {
+ type Cfg = SingleChainHost;
+
+ async fn fetch_hint(
+ hint: Hint<::HintType>,
+ cfg: &Self::Cfg,
+ providers: &::Providers,
+ kv: SharedKeyValueStore,
+ ) -> Result<()> {
+ match hint.ty {
+ HintType::L1BlockHeader => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+ let raw_header: Bytes =
+ providers.l1.client().request("debug_getRawHeader", [hash]).await?;
+
+ let mut kv_lock = kv.write().await;
+ kv_lock.set(PreimageKey::new_keccak256(*hash).into(), raw_header.into())?;
+ }
+ HintType::L1Transactions => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+ let Block { transactions, .. } = providers
+ .l1
+ .get_block_by_hash(hash, BlockTransactionsKind::Full)
+ .await?
+ .ok_or(anyhow!("Block not found"))?;
+ let encoded_transactions = transactions
+ .into_transactions()
+ .map(|tx| tx.inner.encoded_2718())
+ .collect::>();
+
+ store_ordered_trie(kv.as_ref(), encoded_transactions.as_slice()).await?;
+ }
+ HintType::L1Receipts => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+ let raw_receipts: Vec =
+ providers.l1.client().request("debug_getRawReceipts", [hash]).await?;
+
+ store_ordered_trie(kv.as_ref(), raw_receipts.as_slice()).await?;
+ }
+ HintType::L1Blob => {
+ ensure!(hint.data.len() == 48, "Invalid hint data length");
+
+ let hash_data_bytes: [u8; 32] = hint.data[0..32].try_into()?;
+ let index_data_bytes: [u8; 8] = hint.data[32..40].try_into()?;
+ let timestamp_data_bytes: [u8; 8] = hint.data[40..48].try_into()?;
+
+ let hash: B256 = hash_data_bytes.into();
+ let index = u64::from_be_bytes(index_data_bytes);
+ let timestamp = u64::from_be_bytes(timestamp_data_bytes);
+
+ let partial_block_ref = BlockInfo { timestamp, ..Default::default() };
+ let indexed_hash = IndexedBlobHash { index, hash };
+
+ // Fetch the blob sidecar from the blob provider.
+ let mut sidecars = providers
+ .blobs
+ .fetch_filtered_sidecars(&partial_block_ref, &[indexed_hash])
+ .await
+ .map_err(|e| anyhow!("Failed to fetch blob sidecars: {e}"))?;
+ if sidecars.len() != 1 {
+ anyhow::bail!("Expected 1 sidecar, got {}", sidecars.len());
+ }
+ let sidecar = sidecars.remove(0);
+
+ // Acquire a lock on the key-value store and set the preimages.
+ let mut kv_lock = kv.write().await;
+
+ // Set the preimage for the blob commitment.
+ kv_lock.set(
+ PreimageKey::new(*hash, PreimageKeyType::Sha256).into(),
+ sidecar.kzg_commitment.to_vec(),
+ )?;
+
+ // Write all the field elements to the key-value store. There should be 4096.
+ // The preimage oracle key for each field element is the keccak256 hash of
+ // `abi.encodePacked(sidecar.KZGCommitment, uint256(i))`
+ let mut blob_key = [0u8; 80];
+ blob_key[..48].copy_from_slice(sidecar.kzg_commitment.as_ref());
+ for i in 0..FIELD_ELEMENTS_PER_BLOB {
+ blob_key[72..].copy_from_slice(i.to_be_bytes().as_ref());
+ let blob_key_hash = keccak256(blob_key.as_ref());
+
+ kv_lock
+ .set(PreimageKey::new_keccak256(*blob_key_hash).into(), blob_key.into())?;
+ kv_lock.set(
+ PreimageKey::new(*blob_key_hash, PreimageKeyType::Blob).into(),
+ sidecar.blob[(i as usize) << 5..(i as usize + 1) << 5].to_vec(),
+ )?;
+ }
+
+ // Write the KZG Proof as the 4096th element.
+ blob_key[72..].copy_from_slice((FIELD_ELEMENTS_PER_BLOB).to_be_bytes().as_ref());
+ let blob_key_hash = keccak256(blob_key.as_ref());
+ kv_lock.set(PreimageKey::new_keccak256(*blob_key_hash).into(), blob_key.into())?;
+ kv_lock.set(
+ PreimageKey::new(*blob_key_hash, PreimageKeyType::Blob).into(),
+ sidecar.kzg_proof.to_vec(),
+ )?;
+ }
+ HintType::L1Precompile => {
+ ensure!(hint.data.len() >= 20, "Invalid hint data length");
+
+ let address = Address::from_slice(&hint.data.as_ref()[..20]);
+ let input = hint.data[20..].to_vec();
+ let input_hash = keccak256(hint.data.as_ref());
+
+ let result = crate::eth::execute(address, input).map_or_else(
+ |_| vec![0u8; 1],
+ |raw_res| {
+ let mut res = Vec::with_capacity(1 + raw_res.len());
+ res.push(0x01);
+ res.extend_from_slice(&raw_res);
+ res
+ },
+ );
+
+ let mut kv_lock = kv.write().await;
+ kv_lock.set(PreimageKey::new_keccak256(*input_hash).into(), hint.data.into())?;
+ kv_lock.set(
+ PreimageKey::new(*input_hash, PreimageKeyType::Precompile).into(),
+ result,
+ )?;
+ }
+ HintType::L2BlockHeader => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ // Fetch the raw header from the L2 chain provider.
+ let hash: B256 = hint.data.as_ref().try_into()?;
+ let raw_header: Bytes =
+ providers.l2.client().request("debug_getRawHeader", [hash]).await?;
+
+ // Acquire a lock on the key-value store and set the preimage.
+ let mut kv_lock = kv.write().await;
+ kv_lock.set(PreimageKey::new_keccak256(*hash).into(), raw_header.into())?;
+ }
+ HintType::L2Transactions => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+ let Block { transactions, .. } = providers
+ .l2
+ .get_block_by_hash(hash, BlockTransactionsKind::Full)
+ .await?
+ .ok_or(anyhow!("Block not found."))?;
+
+ let encoded_transactions = transactions
+ .into_transactions()
+ .map(|tx| tx.inner.inner.encoded_2718())
+ .collect::>();
+ store_ordered_trie(kv.as_ref(), encoded_transactions.as_slice()).await?;
+ }
+ HintType::StartingL2Output => {
+ const OUTPUT_ROOT_VERSION: u8 = 0;
+ const L2_TO_L1_MESSAGE_PASSER_ADDRESS: Address =
+ address!("4200000000000000000000000000000000000016");
+
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ // Fetch the header for the L2 head block.
+ let raw_header: Bytes = providers
+ .l2
+ .client()
+ .request("debug_getRawHeader", &[cfg.agreed_l2_head_hash])
+ .await?;
+ let header = Header::decode(&mut raw_header.as_ref())?;
+
+ // Fetch the storage root for the L2 head block.
+ let l2_to_l1_message_passer = providers
+ .l2
+ .get_proof(L2_TO_L1_MESSAGE_PASSER_ADDRESS, Default::default())
+ .block_id(cfg.agreed_l2_head_hash.into())
+ .await?;
+
+ let mut raw_output = [0u8; 128];
+ raw_output[31] = OUTPUT_ROOT_VERSION;
+ raw_output[32..64].copy_from_slice(header.state_root.as_ref());
+ raw_output[64..96].copy_from_slice(l2_to_l1_message_passer.storage_hash.as_ref());
+ raw_output[96..128].copy_from_slice(cfg.agreed_l2_head_hash.as_ref());
+ let output_root = keccak256(raw_output);
+
+ ensure!(
+ output_root == cfg.agreed_l2_output_root,
+ "Output root does not match L2 head."
+ );
+
+ let mut kv_write_lock = kv.write().await;
+ kv_write_lock
+ .set(PreimageKey::new_keccak256(*output_root).into(), raw_output.into())?;
+ }
+ HintType::L2Code => {
+ // geth hashdb scheme code hash key prefix
+ const CODE_PREFIX: u8 = b'c';
+
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+
+ // Attempt to fetch the code from the L2 chain provider.
+ let code_key = [&[CODE_PREFIX], hash.as_slice()].concat();
+ let code = providers
+ .l2
+ .client()
+ .request::<&[Bytes; 1], Bytes>("debug_dbGet", &[code_key.into()])
+ .await;
+
+ // Check if the first attempt to fetch the code failed. If it did, try fetching the
+ // code hash preimage without the geth hashdb scheme prefix.
+ let code = match code {
+ Ok(code) => code,
+ Err(_) => providers
+ .l2
+ .client()
+ .request::<&[B256; 1], Bytes>("debug_dbGet", &[hash])
+ .await
+ .map_err(|e| anyhow!("Error fetching code hash preimage: {e}"))?,
+ };
+
+ let mut kv_lock = kv.write().await;
+ kv_lock.set(PreimageKey::new_keccak256(*hash).into(), code.into())?;
+ }
+ HintType::L2StateNode => {
+ ensure!(hint.data.len() == 32, "Invalid hint data length");
+
+ let hash: B256 = hint.data.as_ref().try_into()?;
+
+ // Fetch the preimage from the L2 chain provider.
+ let preimage: Bytes = providers.l2.client().request("debug_dbGet", &[hash]).await?;
+
+ let mut kv_write_lock = kv.write().await;
+ kv_write_lock.set(PreimageKey::new_keccak256(*hash).into(), preimage.into())?;
+ }
+ HintType::L2AccountProof => {
+ ensure!(hint.data.len() == 8 + 20, "Invalid hint data length");
+
+ let block_number = u64::from_be_bytes(hint.data.as_ref()[..8].try_into()?);
+ let address = Address::from_slice(&hint.data.as_ref()[8..28]);
+
+ let proof_response = providers
+ .l2
+ .get_proof(address, Default::default())
+ .block_id(block_number.into())
+ .await?;
+
+ // Write the account proof nodes to the key-value store.
+ let mut kv_lock = kv.write().await;
+ proof_response.account_proof.into_iter().try_for_each(|node| {
+ let node_hash = keccak256(node.as_ref());
+ let key = PreimageKey::new_keccak256(*node_hash);
+ kv_lock.set(key.into(), node.into())?;
+ Ok::<(), anyhow::Error>(())
+ })?;
+ }
+ HintType::L2AccountStorageProof => {
+ ensure!(hint.data.len() == 8 + 20 + 32, "Invalid hint data length");
+
+ let block_number = u64::from_be_bytes(hint.data.as_ref()[..8].try_into()?);
+ let address = Address::from_slice(&hint.data.as_ref()[8..28]);
+ let slot = B256::from_slice(&hint.data.as_ref()[28..]);
+
+ let mut proof_response = providers
+ .l2
+ .get_proof(address, vec![slot])
+ .block_id(block_number.into())
+ .await?;
+
+ let mut kv_lock = kv.write().await;
+
+ // Write the account proof nodes to the key-value store.
+ proof_response.account_proof.into_iter().try_for_each(|node| {
+ let node_hash = keccak256(node.as_ref());
+ let key = PreimageKey::new_keccak256(*node_hash);
+ kv_lock.set(key.into(), node.into())?;
+ Ok::<(), anyhow::Error>(())
+ })?;
+
+ // Write the storage proof nodes to the key-value store.
+ let storage_proof = proof_response.storage_proof.remove(0);
+ storage_proof.proof.into_iter().try_for_each(|node| {
+ let node_hash = keccak256(node.as_ref());
+ let key = PreimageKey::new_keccak256(*node_hash);
+ kv_lock.set(key.into(), node.into())?;
+ Ok::<(), anyhow::Error>(())
+ })?;
+ }
+ HintType::L2PayloadWitness => {
+ ensure!(hint.data.len() >= 32, "Invalid hint data length");
+
+ let parent_block_hash = B256::from_slice(&hint.data.as_ref()[..32]);
+ let payload_attributes: OpPayloadAttributes =
+ serde_json::from_slice(&hint.data[32..])?;
+
+ let execute_payload_response: ExecutionWitness = providers
+ .l2
+ .client()
+ .request::<(B256, OpPayloadAttributes), ExecutionWitness>(
+ "debug_executePayload",
+ (parent_block_hash, payload_attributes),
+ )
+ .await
+ .map_err(|e| anyhow!("Failed to fetch preimage: {e}"))?;
+
+ let mut merged = HashMap::::default();
+ merged.extend(execute_payload_response.state);
+ merged.extend(execute_payload_response.codes);
+ merged.extend(execute_payload_response.keys);
+
+ let mut kv_lock = kv.write().await;
+ for (hash, preimage) in merged.into_iter() {
+ let computed_hash = keccak256(preimage.as_ref());
+ assert_eq!(computed_hash, hash, "Preimage hash does not match expected hash");
+
+ let key = PreimageKey::new_keccak256(*hash);
+ kv_lock.set(key.into(), preimage.into())?;
+ }
+ }
+ HintType::EigenDa => {
+ ensure!(hint.data.len() > 32, "Invalid hint data length");
+
+ let commitment = hint.data.to_vec();
+ // Fetch the blob from the eigen da provider.
+ let blob = providers
+ .eigen_da
+ .get_blob(&commitment)
+ .await
+ .map_err(|e| anyhow!("Failed to fetch blob: {e}"))?;
+ let mut kv_lock = kv.write().await;
+
+ // the fourth because 0x01010000 in the beginning is metadata
+ let cert_blob_info = BlobInfo::decode(&mut &commitment[3..])
+ .map_err(|e| anyhow!("Failed to decode blob info: {e}"))?;
+ // Proxy should return a cert whose data_length measured in symbol (i.e. 32 Bytes)
+ let blob_length = cert_blob_info.blob_header.data_length as u64;
+
+ let eigenda_blob = EigenDABlobData::encode(blob.as_ref());
+
+ assert_eq!(
+ eigenda_blob.blob.len() < blob_length as usize * BYTES_PER_FIELD_ELEMENT,
+ true,
+ "data size from cert is smaller than the reconstructed data"
+ );
+
+ //
+ // Write all the field elements to the key-value store.
+ // The preimage oracle key for each field element is the keccak256 hash of
+ // `abi.encodePacked(cert.KZGCommitment, uint256(i))`
+
+ // TODO figure out the key size, most likely dependent on smart contract parsing
+ let mut blob_key = [0u8; 96];
+ blob_key[..32].copy_from_slice(cert_blob_info.blob_header.commitment.x.as_ref());
+ blob_key[32..64].copy_from_slice(cert_blob_info.blob_header.commitment.y.as_ref());
+
+ for i in 0..blob_length {
+ blob_key[88..].copy_from_slice(i.to_be_bytes().as_ref());
+ let blob_key_hash = keccak256(blob_key.as_ref());
+
+ kv_lock.set(
+ PreimageKey::new(*blob_key_hash, PreimageKeyType::Keccak256).into(),
+ blob_key.into(),
+ )?;
+ debug!("save block key, hash {:?}", blob_key_hash);
+ let start = (i as usize) << 5;
+ let end = start + 32;
+ let actual_end = eigenda_blob.blob.len().min(end);
+ let data_slice = if start >= eigenda_blob.blob.len() {
+ vec![0u8; 32]
+ } else {
+ let mut padded_data = vec![0u8; 32];
+ padded_data[..(actual_end - start)]
+ .copy_from_slice(&eigenda_blob.blob[start..actual_end]);
+ padded_data
+ };
+ kv_lock.set(
+ PreimageKey::new(*blob_key_hash, PreimageKeyType::GlobalGeneric).into(),
+ data_slice.into(),
+ )?;
+ debug!("save blob slice, hash {:?}", blob_key_hash);
+ }
+
+ // proof is at the random point
+ //TODO
+ // Because the blob_length in EigenDA is variable-length, KZG proofs cannot be cached at the position corresponding to blob_length
+ // For now, they are placed at the position corresponding to commit x y. Further optimization will follow the EigenLayer approach
+ let mut kzg_proof_key = [0u8; 64];
+ kzg_proof_key[..64].copy_from_slice(blob_key[..64].as_ref());
+ let kzg_proof_key_hash = keccak256(kzg_proof_key.as_ref());
+
+ //TODO
+ // In fact, the calculation result following the EigenLayer approach is not the same as the cert blob info.
+ // need to save the real commitment x y
+ let mut kzg_commitment_key = [0u8; 65];
+ kzg_commitment_key[..64].copy_from_slice(blob_key[..64].as_ref());
+ kzg_commitment_key[64] = 0u8;
+ let kzg_commitment_key_hash = keccak256(kzg_commitment_key.as_ref());
+
+ let mut witness = EigenDABlobWitness::new();
+
+ let _ = witness
+ .push_witness(&blob)
+ .map_err(|e| anyhow!("eigen da blob push witness error {e}"))?;
+
+ // let last_commitment = witness.commitments.last().unwrap();
+
+ // make sure locally computed proof equals to returned proof from the provider
+ // TODO In fact, the calculation result following the EigenLayer approach is not the same as the cert blob info.
+ // if last_commitment[..32] != cert_blob_info.blob_header.commitment.x[..]
+ // || last_commitment[32..64] != cert_blob_info.blob_header.commitment.y[..]
+ // {
+ // return Err(
+ // anyhow!("proxy commitment is different from computed commitment proxy",
+ // ));
+ // };
+ let proof: Vec =
+ witness.proofs.iter().flat_map(|x| x.as_ref().iter().copied()).collect();
+
+ kv_lock.set(
+ PreimageKey::new(*kzg_proof_key_hash, PreimageKeyType::Keccak256).into(),
+ kzg_proof_key.into(),
+ )?;
+ debug!("save proof key, hash {:?}", kzg_proof_key_hash);
+ // proof to be done
+ kv_lock.set(
+ PreimageKey::new(*kzg_proof_key_hash, PreimageKeyType::GlobalGeneric).into(),
+ proof.into(),
+ )?;
+ debug!("save proof value, hash {:?}", kzg_proof_key_hash);
+
+ let commitment: Vec =
+ witness.commitments.iter().flat_map(|x| x.as_ref().iter().copied()).collect();
+ kv_lock.set(
+ PreimageKey::new(*kzg_commitment_key_hash, PreimageKeyType::Keccak256).into(),
+ kzg_commitment_key.into(),
+ )?;
+ debug!("save commitment key, hash {:?}", kzg_commitment_key_hash);
+
+ // proof to be done
+ kv_lock.set(
+ PreimageKey::new(*kzg_commitment_key_hash, PreimageKeyType::GlobalGeneric)
+ .into(),
+ commitment.into(),
+ )?;
+ debug!("save commitment value, hash {:?}", kzg_commitment_key_hash);
+ }
+ }
+
+ Ok(())
+ }
+}
diff --git a/bin/host/src/kv/local.rs b/bin/host/src/single/local_kv.rs
similarity index 71%
rename from bin/host/src/kv/local.rs
rename to bin/host/src/single/local_kv.rs
index ace48fbefc..1f565b3f16 100644
--- a/bin/host/src/kv/local.rs
+++ b/bin/host/src/single/local_kv.rs
@@ -1,7 +1,8 @@
-//! Contains a concrete implementation of the [KeyValueStore] trait that stores data on disk.
+//! Contains a concrete implementation of the [KeyValueStore] trait that stores data on disk,
+//! using the [SingleChainHost] config.
-use super::KeyValueStore;
-use crate::cli::HostCli;
+use super::SingleChainHost;
+use crate::KeyValueStore;
use alloy_primitives::B256;
use anyhow::Result;
use kona_preimage::PreimageKey;
@@ -10,23 +11,20 @@ use kona_proof::boot::{
L2_ROLLUP_CONFIG_KEY,
};
-/// The default chain ID to use if none is provided.
-const DEFAULT_CHAIN_ID: u64 = 0xbeefbabe;
-
-/// A simple, synchronous key-value store that returns data from a [HostCli] config.
+/// A simple, synchronous key-value store that returns data from a [SingleChainHost] config.
#[derive(Debug)]
-pub struct LocalKeyValueStore {
- cfg: HostCli,
+pub struct SingleChainLocalInputs {
+ cfg: SingleChainHost,
}
-impl LocalKeyValueStore {
- /// Create a new [LocalKeyValueStore] with the given [HostCli] config.
- pub const fn new(cfg: HostCli) -> Self {
+impl SingleChainLocalInputs {
+ /// Create a new [SingleChainLocalInputs] with the given [SingleChainHost] config.
+ pub const fn new(cfg: SingleChainHost) -> Self {
Self { cfg }
}
}
-impl KeyValueStore for LocalKeyValueStore {
+impl KeyValueStore for SingleChainLocalInputs {
fn get(&self, key: B256) -> Option> {
let preimage_key = PreimageKey::try_from(*key).ok()?;
match preimage_key.key_value() {
@@ -37,7 +35,7 @@ impl KeyValueStore for LocalKeyValueStore {
Some(self.cfg.claimed_l2_block_number.to_be_bytes().to_vec())
}
L2_CHAIN_ID_KEY => {
- Some(self.cfg.l2_chain_id.unwrap_or(DEFAULT_CHAIN_ID).to_be_bytes().to_vec())
+ Some(self.cfg.l2_chain_id.unwrap_or_default().to_be_bytes().to_vec())
}
L2_ROLLUP_CONFIG_KEY => {
let rollup_config = self.cfg.read_rollup_config().ok()?;
diff --git a/bin/host/src/single/mod.rs b/bin/host/src/single/mod.rs
new file mode 100644
index 0000000000..186d85b3a3
--- /dev/null
+++ b/bin/host/src/single/mod.rs
@@ -0,0 +1,10 @@
+//! This module contains the single-chain mode for the host.
+
+mod cfg;
+pub use cfg::{SingleChainHost, SingleChainProviders};
+
+mod local_kv;
+pub use local_kv::SingleChainLocalInputs;
+
+mod handler;
+pub use handler::SingleChainHintHandler;
diff --git a/bin/host/src/witness/mod.rs b/bin/host/src/witness/mod.rs
new file mode 100644
index 0000000000..53ffdc6fcc
--- /dev/null
+++ b/bin/host/src/witness/mod.rs
@@ -0,0 +1,2 @@
+mod witness;
+pub use witness::*;
\ No newline at end of file
diff --git a/bin/host/src/witness/witness.rs b/bin/host/src/witness/witness.rs
new file mode 100644
index 0000000000..2b88fd16be
--- /dev/null
+++ b/bin/host/src/witness/witness.rs
@@ -0,0 +1,91 @@
+extern crate alloc;
+use alloc::vec::Vec;
+use alloy_primitives::Bytes;
+use ark_bn254::{Fq, G1Affine};
+use ark_ff::PrimeField;
+use num::BigUint;
+use rust_kzg_bn254_primitives::blob::Blob;
+use rust_kzg_bn254_primitives::errors::KzgError;
+use rust_kzg_bn254_prover::kzg::KZG;
+use rust_kzg_bn254_prover::srs::SRS;
+use tracing::info;
+
+/// stores
+#[derive(Debug, Clone, Default)]
+pub struct EigenDABlobWitness {
+ pub eigenda_blobs: Vec,
+ pub commitments: Vec,
+ pub proofs: Vec,
+}
+
+///
+impl EigenDABlobWitness {
+ pub fn new() -> Self {
+ EigenDABlobWitness {
+ eigenda_blobs: Vec::new(),
+ commitments: Vec::new(),
+ proofs: Vec::new(),
+ }
+ }
+
+ /// This function computes a witness for a eigenDA blob
+ /// nitro code https://github.com/Layr-Labs/nitro/blob/14f09745b74321f91d1f702c3e7bb5eb7d0e49ce/arbitrator/prover/src/kzgbn254.rs#L141
+ /// could refactor in the future, such that both host and client can compute the proof
+ pub fn push_witness(&mut self, blob: &[u8]) -> Result<(), KzgError> {
+ // TODO remove the need for G2 access
+ // Add command line to specify where are g1 and g2 path
+ // In the future, it might make sense to let the proxy to return such
+ // value, instead of local computation
+ let srs = SRS::new("resources/g1.point", 268435456, 1000000).unwrap();
+ let mut kzg = KZG::new();
+
+ let input = Blob::new(blob);
+ let input_poly = input.to_polynomial_eval_form();
+
+ kzg.calculate_and_store_roots_of_unity(blob.len() as u64).unwrap();
+
+ let mut commitment_bytes = vec![0u8; 0];
+
+ let commitment = kzg.commit_eval_form(&input_poly, &srs)?;
+
+ // TODO the library should have returned the bytes, or provide a helper
+ // for conversion. For both proof and commitment
+ let commitment_x_bigint: BigUint = commitment.x.into();
+ let commitment_y_bigint: BigUint = commitment.y.into();
+
+ append_left_padded_biguint_be(&mut commitment_bytes, &commitment_x_bigint);
+ append_left_padded_biguint_be(&mut commitment_bytes, &commitment_y_bigint);
+
+ let mut proof_bytes = vec![0u8; 0];
+
+ let proof = kzg.compute_blob_proof(&input, &commitment, &srs)?;
+ let proof_x_bigint: BigUint = proof.x.into();
+ let proof_y_bigint: BigUint = proof.y.into();
+
+ append_left_padded_biguint_be(&mut proof_bytes, &proof_x_bigint);
+ append_left_padded_biguint_be(&mut proof_bytes, &proof_y_bigint);
+
+ // push data into witness
+ self.write(
+ Bytes::copy_from_slice(blob),
+ Bytes::copy_from_slice(&commitment_bytes),
+ proof_bytes.into(),
+ );
+
+ Ok(())
+ }
+
+ pub fn write(&mut self, blob: Bytes, commitment: Bytes, proof: Bytes) {
+ self.eigenda_blobs.push(blob);
+ self.commitments.push(commitment);
+ self.proofs.push(proof);
+ }
+}
+
+/// This function convert a BigUint into 32Bytes vector in big endian format
+pub fn append_left_padded_biguint_be(vec: &mut Vec, biguint: &BigUint) {
+ let bytes = biguint.to_bytes_be();
+ let padding = 32 - bytes.len();
+ vec.extend(std::iter::repeat(0).take(padding));
+ vec.extend_from_slice(&bytes);
+}
diff --git a/book/README.md b/book/README.md
index 0269e8d686..88b80daadb 100644
--- a/book/README.md
+++ b/book/README.md
@@ -1,6 +1,6 @@
# `kona-book`
-This repository contains the source code for the Kona book, which is available at [anton-rs.github.io/kona](https://anton-rs.github.io/kona/).
+This repository contains the source code for the Kona book, which is available at [op-rs.github.io/kona](https://op-rs.github.io/kona/).
## Contributing
diff --git a/book/book.toml b/book/book.toml
index c6541b7639..cf226755ef 100644
--- a/book/book.toml
+++ b/book/book.toml
@@ -13,7 +13,7 @@ command = "mdbook-mermaid"
[output.html]
default-theme = "ferra"
preferred-dark-theme = "ferra"
-git-repository-url = "https://github.com/anton-rs/kona"
-edit-url-template = "https://github.com/anton-rs/kona/edit/main/book/{path}"
+git-repository-url = "https://github.com/op-rs/kona"
+edit-url-template = "https://github.com/op-rs/kona/edit/main/book/{path}"
additional-css = ["custom.css"]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
diff --git a/book/src/CONTRIBUTING.md b/book/src/CONTRIBUTING.md
index d522cc9ef6..c7e9397df6 100644
--- a/book/src/CONTRIBUTING.md
+++ b/book/src/CONTRIBUTING.md
@@ -20,7 +20,7 @@ Before working with this repository locally, you'll need to install several depe
## Pull Request Process
-1. Before anything, [create an issue](https://github.com/anton-rs/kona/issues/new) to discuss the change you're
+1. Before anything, [create an issue](https://github.com/op-rs/kona/issues/new) to discuss the change you're
wanting to make, if it is significant or changes functionality. Feel free to skip this step for trivial changes.
1. Once your change is implemented, ensure that all checks are passing before creating a PR. The full CI pipeline can
be run locally via the `justfile`s in the repository.
diff --git a/book/src/intro.md b/book/src/intro.md
index 294637bceb..a2ebecc9e3 100644
--- a/book/src/intro.md
+++ b/book/src/intro.md
@@ -2,7 +2,7 @@
_Documentation for the Kona project._
-
+
> 📖 `kona` is in active development, and is not yet ready for use in production. During development, this book will evolve quickly and may contain inaccuracies.
>
diff --git a/book/src/links.md b/book/src/links.md
index 9d68ad149c..424fb4c78a 100644
--- a/book/src/links.md
+++ b/book/src/links.md
@@ -3,7 +3,7 @@
[op-stack]: https://github.com/ethereum-optimism/optimism
[op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon
-[cannon-rs]: https://github.com/anton-rs/cannon-rs
+[cannon-rs]: https://github.com/op-rs/cannon-rs
[asterisc]: https://github.com/ethereum-optimism/asterisc
[fp-specs]: https://specs.optimism.io/experimental/fault-proof/index.html
[fpp-specs]: https://specs.optimism.io/experimental/fault-proof/index.html#fault-proof-program
@@ -15,11 +15,11 @@
-[kona]: https://github.com/anton-rs/kona
-[book]: https://anton-rs.github.io/kona/
-[issues]: https://github.com/anton-rs/kona/issues
-[new-issue]: https://github.com/anton-rs/kona/issues/new
-[contributing]: https://github.com/anton-rs/kona/tree/main/CONTRIBUTING.md
+[kona]: https://github.com/op-rs/kona
+[book]: https://op-rs.github.io/kona/
+[issues]: https://github.com/op-rs/kona/issues
+[new-issue]: https://github.com/op-rs/kona/issues/new
+[contributing]: https://github.com/op-rs/kona/tree/main/CONTRIBUTING.md
diff --git a/book/src/sdk/custom-backend.md b/book/src/sdk/custom-backend.md
index ffafdaf99f..7cb7431384 100644
--- a/book/src/sdk/custom-backend.md
+++ b/book/src/sdk/custom-backend.md
@@ -85,7 +85,7 @@ let pipeline = PipelineBuilder::new()
```
From here, a custom derivation driver is needed to produce the desired execution payload(s). An example of this for
-`kona-client` can be found in the [DerivationDriver](https://github.com/anton-rs/kona/blob/main/bin/client/src/l1/driver.rs#L77).
+`kona-client` can be found in the [DerivationDriver](https://github.com/op-rs/kona/blob/main/bin/client/src/l1/driver.rs#L77).
### `kona-mpt` / `kona-executor` sources
@@ -113,7 +113,7 @@ let header = executor.execute_payload(...).expect("Failed execution");
### Bringing it Together
Once your custom backend traits for both `kona-derive` and `kona-executor` have been implemented,
-your final binary may look something like [that of `kona-client`'s](https://github.com/anton-rs/kona/blob/main/bin/client/src/kona.rs).
+your final binary may look something like [that of `kona-client`'s](https://github.com/op-rs/kona/blob/main/bin/client/src/kona.rs).
Alternatively, if you're looking to prove a wider range of blocks, [`op-succinct`'s `range` program](https://github.com/succinctlabs/op-succinct/tree/main/programs/range)
offers a good example of running the pipeline and executor across a string of contiguous blocks.
diff --git a/book/src/sdk/exec-ext.md b/book/src/sdk/exec-ext.md
index fef15caa9b..8709356347 100644
--- a/book/src/sdk/exec-ext.md
+++ b/book/src/sdk/exec-ext.md
@@ -46,7 +46,7 @@ let cfg = RollupConfig::default();
let provider = ...;
let hinter = ...;
-let executor = StatelessL2BlcokExecutor::builder(&cfg, provider, hinter)
+let executor = StatelessL2BlockExecutor::builder(&cfg, provider, hinter)
.with_parent_header(...)
.with_handle_register(custom_handle_register)
.build();
diff --git a/book/src/sdk/fpvm-backend.md b/book/src/sdk/fpvm-backend.md
index d1fc6725c4..64c08fe253 100644
--- a/book/src/sdk/fpvm-backend.md
+++ b/book/src/sdk/fpvm-backend.md
@@ -100,7 +100,7 @@ Finally, in `kona-proof`, implementations of data source traits from `kona-deriv
to pull in untyped data from the host by `PreimageKey`. These data source traits are covered in more detail within
the [Custom Backend](./custom-backend.md) section, but we'll quickly gloss over them here to build intuition.
-Let's take, for example, [`OracleL1ChainProvider`](https://github.com/anton-rs/kona/blob/40a8d7ec3def4a1eeb26492a1e4338d8b032e428/bin/client/src/l1/chain_provider.rs#L16-L23).
+Let's take, for example, [`OracleL1ChainProvider`](https://github.com/op-rs/kona/blob/40a8d7ec3def4a1eeb26492a1e4338d8b032e428/bin/client/src/l1/chain_provider.rs#L16-L23).
The [`ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/traits/trait.ChainProvider.html) trait in `kona-derive`
defines a simple interface for fetching information about the L1 chain. In the `OracleL1ChainProvider`, this information
is pulled in over the [PreimageOracle ABI][preimage-specs]. There are many other examples of these data source traits,
diff --git a/book/src/sdk/pipeline/intro.md b/book/src/sdk/pipeline/intro.md
index 146aae8cf8..c88519262b 100644
--- a/book/src/sdk/pipeline/intro.md
+++ b/book/src/sdk/pipeline/intro.md
@@ -182,7 +182,7 @@ use core::iter::Iterator;
let l2_safe_head = L2BlockInfo::default();
loop {
if matches!(pipeline.step(l2_safe_head).await, StepResult::PreparedAttributes) {
- // The pipeline has succesfully prepared payload attributes, break the loop.
+ // The pipeline has successfully prepared payload attributes, break the loop.
break;
}
}
@@ -285,12 +285,12 @@ So, [@clabby][clabby] and [@refcell][refcell] stood up [kona][kona] in a few mon
-[driver]: https://github.com/anton-rs/kona/blob/main/bin/client/src/l1/driver.rs#L74
+[driver]: https://github.com/op-rs/kona/blob/main/bin/client/src/l1/driver.rs#L74
[next]: https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#tymethod.next
[builder]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.PipelineBuilder.html
[alloy]: https://github.com/alloy-rs/alloy
[ethers-rs]: https://github.com/gakonst/ethers-rs
-[kona]: https://github.com/anton-rs/kona
+[kona]: https://github.com/op-rs/kona
[clabby]: https://github.com/clabby
[refcell]: https://github.com/refcell
[go]: https://go.dev/
diff --git a/build/README.md b/build/README.md
index a8b70973b9..f8c50cc658 100644
--- a/build/README.md
+++ b/build/README.md
@@ -18,7 +18,7 @@ docker run \
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
- ghcr.io/anton-rs/kona/cannon-builder:main cargo build --release -Zbuild-std=core,alloc
+ ghcr.io/op-rs/kona/cannon-builder:main cargo build --release -Zbuild-std=core,alloc
```
**asterisc**
@@ -29,5 +29,5 @@ docker run \
--platform linux/amd64 \
-v `pwd`/:/workdir \
-w="/workdir" \
- ghcr.io/anton-rs/kona/asterisc-builder:main cargo build --release -Zbuild-std=core,alloc
+ ghcr.io/op-rs/kona/asterisc-builder:main cargo build --release -Zbuild-std=core,alloc
```
diff --git a/build/asterisc/asterisc-repro.dockerfile b/build/asterisc/asterisc-repro.dockerfile
index a644df1739..38cc432afd 100644
--- a/build/asterisc/asterisc-repro.dockerfile
+++ b/build/asterisc/asterisc-repro.dockerfile
@@ -29,7 +29,7 @@ RUN git clone https://github.com/ethereum-optimism/asterisc && \
# Build kona-client @ `CLIENT_TAG` #
################################################################
-FROM ghcr.io/anton-rs/kona/asterisc-builder@sha256:523f0455b25b28917a8e7d02cd3ecb8c8af93e5e5b85ec7d7bcf2df4458e65a5 AS client-build
+FROM ghcr.io/op-rs/kona/asterisc-builder@sha256:56c57453ebe09875e96df527d3734d781e987dbdc1e0ce9e813e1e88590036bd AS client-build
SHELL ["/bin/bash", "-c"]
ARG CLIENT_TAG
@@ -47,7 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends git
# Build kona-client on the selected tag
RUN git checkout $CLIENT_TAG && \
cargo build -Zbuild-std=core,alloc --workspace --bin kona --locked --profile release-client-lto --exclude kona-host --exclude kona-derive-alloy && \
- mv ./target/riscv64gc-unknown-none-elf/release-client-lto/kona /kona-client-elf
+ mv ./target/riscv64imac-unknown-none-elf/release-client-lto/kona /kona-client-elf
################################################################
# Build kona-host @ `CLIENT_TAG` #
diff --git a/build/asterisc/asterisc.dockerfile b/build/asterisc/asterisc.dockerfile
index 5e8e4a4c5b..2499758359 100644
--- a/build/asterisc/asterisc.dockerfile
+++ b/build/asterisc/asterisc.dockerfile
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install --assume-yes --no-install-recommends \
clang \
make \
cmake \
- git
+ git
# Install Rustup and Rust
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain ${RUST_VERSION} --component rust-src
@@ -28,6 +28,6 @@ ENV PATH="/root/.cargo/bin:${PATH}"
ENV CC_riscv64_unknown_none_elf=riscv64-linux-gnu-gcc \
CXX_riscv64_unknown_none_elf=riscv64-linux-gnu-g++ \
CARGO_TARGET_RISCV64_UNKNOWN_NONE_ELF_LINKER=riscv64-linux-gnu-gcc \
- RUSTFLAGS="-Clink-arg=-e_start -Ctarget-feature=-c" \
- CARGO_BUILD_TARGET="riscv64gc-unknown-none-elf" \
+ RUSTFLAGS="-Clink-arg=-e_start -Ctarget-feature=-c,-zicsr,-zifencei,-zicntr,zihpm" \
+ CARGO_BUILD_TARGET="riscv64imac-unknown-none-elf" \
RUSTUP_TOOLCHAIN=${RUST_VERSION}
diff --git a/crates/derive/CHANGELOG.md b/crates/derive/CHANGELOG.md
index 30f89fab4b..f85f5e242a 100644
--- a/crates/derive/CHANGELOG.md
+++ b/crates/derive/CHANGELOG.md
@@ -6,248 +6,248 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
-## [0.2.0](https://github.com/anton-rs/kona/compare/kona-derive-v0.1.0...kona-derive-v0.2.0) - 2024-12-03
+## [0.2.0](https://github.com/op-rs/kona/compare/kona-derive-v0.1.0...kona-derive-v0.2.0) - 2024-12-03
### Added
-- *(workspace)* Isolate FPVM-specific platform code ([#821](https://github.com/anton-rs/kona/pull/821))
+- *(workspace)* Isolate FPVM-specific platform code ([#821](https://github.com/op-rs/kona/pull/821))
### Fixed
-- bump ([#855](https://github.com/anton-rs/kona/pull/855))
-- nightly lint ([#858](https://github.com/anton-rs/kona/pull/858))
+- bump ([#855](https://github.com/op-rs/kona/pull/855))
+- nightly lint ([#858](https://github.com/op-rs/kona/pull/858))
### Other
-- *(derive)* remove indexed blob hash ([#847](https://github.com/anton-rs/kona/pull/847))
+- *(derive)* remove indexed blob hash ([#847](https://github.com/op-rs/kona/pull/847))
-## [0.0.7](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.6...kona-derive-v0.0.7) - 2024-11-20
+## [0.0.7](https://github.com/op-rs/kona/compare/kona-derive-v0.0.6...kona-derive-v0.0.7) - 2024-11-20
### Added
-- *(driver)* Abstract, Default Pipeline ([#796](https://github.com/anton-rs/kona/pull/796))
+- *(driver)* Abstract, Default Pipeline ([#796](https://github.com/op-rs/kona/pull/796))
### Other
-- *(derive)* remove batch reader ([#826](https://github.com/anton-rs/kona/pull/826))
-- op-alloy 0.6.8 ([#830](https://github.com/anton-rs/kona/pull/830))
-- *(driver)* use tracing macros ([#823](https://github.com/anton-rs/kona/pull/823))
-- *(deps)* op-alloy 0.6.7 ([#824](https://github.com/anton-rs/kona/pull/824))
-- v0.6.6 op-alloy ([#804](https://github.com/anton-rs/kona/pull/804))
-- *(workspace)* Migrate back to `thiserror` v2 ([#811](https://github.com/anton-rs/kona/pull/811))
-- *(derive)* Re-export types ([#790](https://github.com/anton-rs/kona/pull/790))
-- Revert "chore: bump alloy deps ([#788](https://github.com/anton-rs/kona/pull/788))" ([#791](https://github.com/anton-rs/kona/pull/791))
+- *(derive)* remove batch reader ([#826](https://github.com/op-rs/kona/pull/826))
+- op-alloy 0.6.8 ([#830](https://github.com/op-rs/kona/pull/830))
+- *(driver)* use tracing macros ([#823](https://github.com/op-rs/kona/pull/823))
+- *(deps)* op-alloy 0.6.7 ([#824](https://github.com/op-rs/kona/pull/824))
+- v0.6.6 op-alloy ([#804](https://github.com/op-rs/kona/pull/804))
+- *(workspace)* Migrate back to `thiserror` v2 ([#811](https://github.com/op-rs/kona/pull/811))
+- *(derive)* Re-export types ([#790](https://github.com/op-rs/kona/pull/790))
+- Revert "chore: bump alloy deps ([#788](https://github.com/op-rs/kona/pull/788))" ([#791](https://github.com/op-rs/kona/pull/791))
-## [0.0.6](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.5...kona-derive-v0.0.6) - 2024-11-06
+## [0.0.6](https://github.com/op-rs/kona/compare/kona-derive-v0.0.5...kona-derive-v0.0.6) - 2024-11-06
### Added
-- *(derive)* `From for PipelineErrorKind` ([#780](https://github.com/anton-rs/kona/pull/780))
-- *(client)* Remove `anyhow` ([#779](https://github.com/anton-rs/kona/pull/779))
-- *(derive)* sources docs ([#754](https://github.com/anton-rs/kona/pull/754))
+- *(derive)* `From for PipelineErrorKind` ([#780](https://github.com/op-rs/kona/pull/780))
+- *(client)* Remove `anyhow` ([#779](https://github.com/op-rs/kona/pull/779))
+- *(derive)* sources docs ([#754](https://github.com/op-rs/kona/pull/754))
### Fixed
-- *(derive)* Data Availability Provider Abstraction ([#782](https://github.com/anton-rs/kona/pull/782))
-- *(derive)* hoist types out of traits ([#781](https://github.com/anton-rs/kona/pull/781))
-- *(client)* Trace extension support ([#778](https://github.com/anton-rs/kona/pull/778))
-- *(derive)* use signal value updated with system config. ([#776](https://github.com/anton-rs/kona/pull/776))
+- *(derive)* Data Availability Provider Abstraction ([#782](https://github.com/op-rs/kona/pull/782))
+- *(derive)* hoist types out of traits ([#781](https://github.com/op-rs/kona/pull/781))
+- *(client)* Trace extension support ([#778](https://github.com/op-rs/kona/pull/778))
+- *(derive)* use signal value updated with system config. ([#776](https://github.com/op-rs/kona/pull/776))
### Other
-- bump alloy deps ([#788](https://github.com/anton-rs/kona/pull/788))
-- *(derive)* pipeline error test coverage ([#784](https://github.com/anton-rs/kona/pull/784))
-- Only fill blob data when there is no calldata ([#764](https://github.com/anton-rs/kona/pull/764))
-- *(derive)* touchup kona-derive readme ([#762](https://github.com/anton-rs/kona/pull/762))
-- *(derive)* Error Exports ([#758](https://github.com/anton-rs/kona/pull/758))
-- *(derive)* Cleanup Exports ([#757](https://github.com/anton-rs/kona/pull/757))
+- bump alloy deps ([#788](https://github.com/op-rs/kona/pull/788))
+- *(derive)* pipeline error test coverage ([#784](https://github.com/op-rs/kona/pull/784))
+- Only fill blob data when there is no calldata ([#764](https://github.com/op-rs/kona/pull/764))
+- *(derive)* touchup kona-derive readme ([#762](https://github.com/op-rs/kona/pull/762))
+- *(derive)* Error Exports ([#758](https://github.com/op-rs/kona/pull/758))
+- *(derive)* Cleanup Exports ([#757](https://github.com/op-rs/kona/pull/757))
-## [0.0.5](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.4...kona-derive-v0.0.5) - 2024-10-29
+## [0.0.5](https://github.com/op-rs/kona/compare/kona-derive-v0.0.4...kona-derive-v0.0.5) - 2024-10-29
### Added
-- *(derive)* use upstream op-alloy batch types ([#746](https://github.com/anton-rs/kona/pull/746))
-- *(derive)* Remove metrics ([#743](https://github.com/anton-rs/kona/pull/743))
-- *(derive)* sys config accessor ([#722](https://github.com/anton-rs/kona/pull/722))
+- *(derive)* use upstream op-alloy batch types ([#746](https://github.com/op-rs/kona/pull/746))
+- *(derive)* Remove metrics ([#743](https://github.com/op-rs/kona/pull/743))
+- *(derive)* sys config accessor ([#722](https://github.com/op-rs/kona/pull/722))
### Fixed
-- tracing_subscriber problem in `kona-derive` tests ([#741](https://github.com/anton-rs/kona/pull/741))
-- *(derive)* Holocene action tests / fixes ([#733](https://github.com/anton-rs/kona/pull/733))
+- tracing_subscriber problem in `kona-derive` tests ([#741](https://github.com/op-rs/kona/pull/741))
+- *(derive)* Holocene action tests / fixes ([#733](https://github.com/op-rs/kona/pull/733))
### Other
-- *(derive)* import hygiene ([#744](https://github.com/anton-rs/kona/pull/744))
+- *(derive)* import hygiene ([#744](https://github.com/op-rs/kona/pull/744))
-## [0.0.4](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.3...kona-derive-v0.0.4) - 2024-10-25
+## [0.0.4](https://github.com/op-rs/kona/compare/kona-derive-v0.0.3...kona-derive-v0.0.4) - 2024-10-25
### Added
-- remove thiserror ([#735](https://github.com/anton-rs/kona/pull/735))
-- *(derive)* `BatchProvider` multiplexed stage ([#726](https://github.com/anton-rs/kona/pull/726))
-- *(derive)* hoist stage traits ([#723](https://github.com/anton-rs/kona/pull/723))
-- frame queue test asserter ([#619](https://github.com/anton-rs/kona/pull/619))
-- *(workspace)* Distribute pipeline, not providers ([#717](https://github.com/anton-rs/kona/pull/717))
-- *(derive)* `BatchValidator` stage ([#703](https://github.com/anton-rs/kona/pull/703))
-- *(derive)* Add `ChannelAssembler` size limitation ([#700](https://github.com/anton-rs/kona/pull/700))
-- *(derive)* signal receiver logic ([#696](https://github.com/anton-rs/kona/pull/696))
-- *(derive)* Stage multiplexer ([#693](https://github.com/anton-rs/kona/pull/693))
-- *(derive)* `Past` batch validity variant ([#684](https://github.com/anton-rs/kona/pull/684))
-- codecov sources ([#657](https://github.com/anton-rs/kona/pull/657))
-- frame queue tests ([#613](https://github.com/anton-rs/kona/pull/613))
-- *(derive)* Holocene flush signal ([#612](https://github.com/anton-rs/kona/pull/612))
-- *(derive)* Add `Signal` API ([#611](https://github.com/anton-rs/kona/pull/611))
-- *(derive)* BatchQueue Update [Holocene] ([#601](https://github.com/anton-rs/kona/pull/601))
-- *(derive)* bump op-alloy dep ([#605](https://github.com/anton-rs/kona/pull/605))
-- kona-providers ([#596](https://github.com/anton-rs/kona/pull/596))
-- *(derive)* Span batch prefix checks ([#592](https://github.com/anton-rs/kona/pull/592))
-- *(derive)* `BatchStream` buffering ([#590](https://github.com/anton-rs/kona/pull/590))
-- *(derive)* BatchStreamProvider ([#591](https://github.com/anton-rs/kona/pull/591))
-- *(derive)* Refactor out Online Providers ([#569](https://github.com/anton-rs/kona/pull/569))
-- *(derive)* interleaved channel tests ([#585](https://github.com/anton-rs/kona/pull/585))
-- *(derive)* Holocene Buffer Flushing ([#575](https://github.com/anton-rs/kona/pull/575))
-- *(derive)* Holocene Channel Bank Checks ([#572](https://github.com/anton-rs/kona/pull/572))
-- *(derive)* Holocene Frame Queue ([#579](https://github.com/anton-rs/kona/pull/579))
-- *(derive)* Holocene Activation ([#574](https://github.com/anton-rs/kona/pull/574))
-- *(derive)* wire up the batch span stage ([#567](https://github.com/anton-rs/kona/pull/567))
-- *(derive)* New BatchStream Stage for Holocene ([#566](https://github.com/anton-rs/kona/pull/566))
-- *(derive)* Hoist AttributesBuilder ([#571](https://github.com/anton-rs/kona/pull/571))
-- *(derive)* Touchup Docs ([#555](https://github.com/anton-rs/kona/pull/555))
-- *(derive)* Latest BN ([#521](https://github.com/anton-rs/kona/pull/521))
-- Remove L2 Execution Payload ([#542](https://github.com/anton-rs/kona/pull/542))
-- *(derive)* Typed error handling ([#540](https://github.com/anton-rs/kona/pull/540))
-- *(primitives)* Remove Attributes ([#529](https://github.com/anton-rs/kona/pull/529))
-- large dependency update ([#528](https://github.com/anton-rs/kona/pull/528))
-- *(primitives)* reuse op-alloy-protocol channel and block types ([#499](https://github.com/anton-rs/kona/pull/499))
+- remove thiserror ([#735](https://github.com/op-rs/kona/pull/735))
+- *(derive)* `BatchProvider` multiplexed stage ([#726](https://github.com/op-rs/kona/pull/726))
+- *(derive)* hoist stage traits ([#723](https://github.com/op-rs/kona/pull/723))
+- frame queue test asserter ([#619](https://github.com/op-rs/kona/pull/619))
+- *(workspace)* Distribute pipeline, not providers ([#717](https://github.com/op-rs/kona/pull/717))
+- *(derive)* `BatchValidator` stage ([#703](https://github.com/op-rs/kona/pull/703))
+- *(derive)* Add `ChannelAssembler` size limitation ([#700](https://github.com/op-rs/kona/pull/700))
+- *(derive)* signal receiver logic ([#696](https://github.com/op-rs/kona/pull/696))
+- *(derive)* Stage multiplexer ([#693](https://github.com/op-rs/kona/pull/693))
+- *(derive)* `Past` batch validity variant ([#684](https://github.com/op-rs/kona/pull/684))
+- codecov sources ([#657](https://github.com/op-rs/kona/pull/657))
+- frame queue tests ([#613](https://github.com/op-rs/kona/pull/613))
+- *(derive)* Holocene flush signal ([#612](https://github.com/op-rs/kona/pull/612))
+- *(derive)* Add `Signal` API ([#611](https://github.com/op-rs/kona/pull/611))
+- *(derive)* BatchQueue Update [Holocene] ([#601](https://github.com/op-rs/kona/pull/601))
+- *(derive)* bump op-alloy dep ([#605](https://github.com/op-rs/kona/pull/605))
+- kona-providers ([#596](https://github.com/op-rs/kona/pull/596))
+- *(derive)* Span batch prefix checks ([#592](https://github.com/op-rs/kona/pull/592))
+- *(derive)* `BatchStream` buffering ([#590](https://github.com/op-rs/kona/pull/590))
+- *(derive)* BatchStreamProvider ([#591](https://github.com/op-rs/kona/pull/591))
+- *(derive)* Refactor out Online Providers ([#569](https://github.com/op-rs/kona/pull/569))
+- *(derive)* interleaved channel tests ([#585](https://github.com/op-rs/kona/pull/585))
+- *(derive)* Holocene Buffer Flushing ([#575](https://github.com/op-rs/kona/pull/575))
+- *(derive)* Holocene Channel Bank Checks ([#572](https://github.com/op-rs/kona/pull/572))
+- *(derive)* Holocene Frame Queue ([#579](https://github.com/op-rs/kona/pull/579))
+- *(derive)* Holocene Activation ([#574](https://github.com/op-rs/kona/pull/574))
+- *(derive)* wire up the batch span stage ([#567](https://github.com/op-rs/kona/pull/567))
+- *(derive)* New BatchStream Stage for Holocene ([#566](https://github.com/op-rs/kona/pull/566))
+- *(derive)* Hoist AttributesBuilder ([#571](https://github.com/op-rs/kona/pull/571))
+- *(derive)* Touchup Docs ([#555](https://github.com/op-rs/kona/pull/555))
+- *(derive)* Latest BN ([#521](https://github.com/op-rs/kona/pull/521))
+- Remove L2 Execution Payload ([#542](https://github.com/op-rs/kona/pull/542))
+- *(derive)* Typed error handling ([#540](https://github.com/op-rs/kona/pull/540))
+- *(primitives)* Remove Attributes ([#529](https://github.com/op-rs/kona/pull/529))
+- large dependency update ([#528](https://github.com/op-rs/kona/pull/528))
+- *(primitives)* reuse op-alloy-protocol channel and block types ([#499](https://github.com/op-rs/kona/pull/499))
### Fixed
-- hashmap ([#732](https://github.com/anton-rs/kona/pull/732))
-- *(derive)* SpanBatch element limit + channel RLP size limit ([#692](https://github.com/anton-rs/kona/pull/692))
-- *(derive)* Holocene `SpanBatch` prefix checks ([#688](https://github.com/anton-rs/kona/pull/688))
-- *(derive)* Retain L1 blocks ([#683](https://github.com/anton-rs/kona/pull/683))
-- *(executor)* Holocene EIP-1559 params in Header ([#622](https://github.com/anton-rs/kona/pull/622))
-- derive pipeline params ([#587](https://github.com/anton-rs/kona/pull/587))
-- *(workspace)* hoist and fix lints ([#577](https://github.com/anton-rs/kona/pull/577))
-- *(derive)* move attributes builder trait ([#570](https://github.com/anton-rs/kona/pull/570))
-- *(client)* Channel reader error handling ([#539](https://github.com/anton-rs/kona/pull/539))
-- *(derive)* Sequence window expiry ([#532](https://github.com/anton-rs/kona/pull/532))
-- *(primitives)* use consensus hardforks ([#497](https://github.com/anton-rs/kona/pull/497))
-- *(primitives)* re-use op-alloy frame type ([#492](https://github.com/anton-rs/kona/pull/492))
+- hashmap ([#732](https://github.com/op-rs/kona/pull/732))
+- *(derive)* SpanBatch element limit + channel RLP size limit ([#692](https://github.com/op-rs/kona/pull/692))
+- *(derive)* Holocene `SpanBatch` prefix checks ([#688](https://github.com/op-rs/kona/pull/688))
+- *(derive)* Retain L1 blocks ([#683](https://github.com/op-rs/kona/pull/683))
+- *(executor)* Holocene EIP-1559 params in Header ([#622](https://github.com/op-rs/kona/pull/622))
+- derive pipeline params ([#587](https://github.com/op-rs/kona/pull/587))
+- *(workspace)* hoist and fix lints ([#577](https://github.com/op-rs/kona/pull/577))
+- *(derive)* move attributes builder trait ([#570](https://github.com/op-rs/kona/pull/570))
+- *(client)* Channel reader error handling ([#539](https://github.com/op-rs/kona/pull/539))
+- *(derive)* Sequence window expiry ([#532](https://github.com/op-rs/kona/pull/532))
+- *(primitives)* use consensus hardforks ([#497](https://github.com/op-rs/kona/pull/497))
+- *(primitives)* re-use op-alloy frame type ([#492](https://github.com/op-rs/kona/pull/492))
### Other
-- re-org imports ([#711](https://github.com/anton-rs/kona/pull/711))
-- hoist trait test utilities ([#708](https://github.com/anton-rs/kona/pull/708))
-- *(workspace)* Removes Primitives ([#638](https://github.com/anton-rs/kona/pull/638))
-- *(derive)* Add tracing to `ChannelAssembler` ([#701](https://github.com/anton-rs/kona/pull/701))
-- *(derive)* remove span batch todo comments ([#682](https://github.com/anton-rs/kona/pull/682))
-- refactor test utils ([#677](https://github.com/anton-rs/kona/pull/677))
-- *(derive)* stage coverage ([#673](https://github.com/anton-rs/kona/pull/673))
-- *(executor)* Use Upstreamed op-alloy Methods ([#651](https://github.com/anton-rs/kona/pull/651))
-- *(derive)* Test and Clean Batch Types ([#670](https://github.com/anton-rs/kona/pull/670))
-- *(derive)* Test Stage Resets and Flushes ([#669](https://github.com/anton-rs/kona/pull/669))
-- *(derive)* Batch Timestamp Tests ([#664](https://github.com/anton-rs/kona/pull/664))
-- *(derive)* test channel reader flushing ([#661](https://github.com/anton-rs/kona/pull/661))
-- *(derive)* adds more channel bank coverage ([#659](https://github.com/anton-rs/kona/pull/659))
-- *(derive)* test channel reader resets ([#660](https://github.com/anton-rs/kona/pull/660))
-- *(derive)* test channel bank reset ([#658](https://github.com/anton-rs/kona/pull/658))
-- *(derive)* hoist attributes queue test utils ([#654](https://github.com/anton-rs/kona/pull/654))
-- *(derive)* Pipeline Core Test Coverage ([#642](https://github.com/anton-rs/kona/pull/642))
-- *(derive)* Single Batch Test Coverage ([#643](https://github.com/anton-rs/kona/pull/643))
-- *(derive)* Blob Source Test Coverage ([#631](https://github.com/anton-rs/kona/pull/631))
-- refactor test providers ([#623](https://github.com/anton-rs/kona/pull/623))
-- doc logos ([#609](https://github.com/anton-rs/kona/pull/609))
-- use alloy primitives map ([#586](https://github.com/anton-rs/kona/pull/586))
-- *(derive)* [Holocene] Drain previous channel in one iteration ([#583](https://github.com/anton-rs/kona/pull/583))
-- channel reader docs ([#568](https://github.com/anton-rs/kona/pull/568))
-- Bumps Dependency Versions ([#520](https://github.com/anton-rs/kona/pull/520))
-- *(primitives)* rm RawTransaction ([#505](https://github.com/anton-rs/kona/pull/505))
-
-## [0.0.3](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.2...kona-derive-v0.0.3) - 2024-09-04
+- re-org imports ([#711](https://github.com/op-rs/kona/pull/711))
+- hoist trait test utilities ([#708](https://github.com/op-rs/kona/pull/708))
+- *(workspace)* Removes Primitives ([#638](https://github.com/op-rs/kona/pull/638))
+- *(derive)* Add tracing to `ChannelAssembler` ([#701](https://github.com/op-rs/kona/pull/701))
+- *(derive)* remove span batch todo comments ([#682](https://github.com/op-rs/kona/pull/682))
+- refactor test utils ([#677](https://github.com/op-rs/kona/pull/677))
+- *(derive)* stage coverage ([#673](https://github.com/op-rs/kona/pull/673))
+- *(executor)* Use Upstreamed op-alloy Methods ([#651](https://github.com/op-rs/kona/pull/651))
+- *(derive)* Test and Clean Batch Types ([#670](https://github.com/op-rs/kona/pull/670))
+- *(derive)* Test Stage Resets and Flushes ([#669](https://github.com/op-rs/kona/pull/669))
+- *(derive)* Batch Timestamp Tests ([#664](https://github.com/op-rs/kona/pull/664))
+- *(derive)* test channel reader flushing ([#661](https://github.com/op-rs/kona/pull/661))
+- *(derive)* adds more channel bank coverage ([#659](https://github.com/op-rs/kona/pull/659))
+- *(derive)* test channel reader resets ([#660](https://github.com/op-rs/kona/pull/660))
+- *(derive)* test channel bank reset ([#658](https://github.com/op-rs/kona/pull/658))
+- *(derive)* hoist attributes queue test utils ([#654](https://github.com/op-rs/kona/pull/654))
+- *(derive)* Pipeline Core Test Coverage ([#642](https://github.com/op-rs/kona/pull/642))
+- *(derive)* Single Batch Test Coverage ([#643](https://github.com/op-rs/kona/pull/643))
+- *(derive)* Blob Source Test Coverage ([#631](https://github.com/op-rs/kona/pull/631))
+- refactor test providers ([#623](https://github.com/op-rs/kona/pull/623))
+- doc logos ([#609](https://github.com/op-rs/kona/pull/609))
+- use alloy primitives map ([#586](https://github.com/op-rs/kona/pull/586))
+- *(derive)* [Holocene] Drain previous channel in one iteration ([#583](https://github.com/op-rs/kona/pull/583))
+- channel reader docs ([#568](https://github.com/op-rs/kona/pull/568))
+- Bumps Dependency Versions ([#520](https://github.com/op-rs/kona/pull/520))
+- *(primitives)* rm RawTransaction ([#505](https://github.com/op-rs/kona/pull/505))
+
+## [0.0.3](https://github.com/op-rs/kona/compare/kona-derive-v0.0.2...kona-derive-v0.0.3) - 2024-09-04
### Added
-- Run cargo hack against workspace ([#485](https://github.com/anton-rs/kona/pull/485))
-- *(workspace)* Workspace Re-exports ([#468](https://github.com/anton-rs/kona/pull/468))
-- *(ci)* Add scheduled FPP differential tests ([#408](https://github.com/anton-rs/kona/pull/408))
-- *(derive+trusted-sync)* online blob provider with fallback ([#410](https://github.com/anton-rs/kona/pull/410))
-- increase granularity ([#365](https://github.com/anton-rs/kona/pull/365))
-- *(derive)* histogram for number of channels for given frame counts ([#337](https://github.com/anton-rs/kona/pull/337))
-- *(derive)* track the current channel size ([#331](https://github.com/anton-rs/kona/pull/331))
-- *(derive)* more stage metrics ([#326](https://github.com/anton-rs/kona/pull/326))
-- *(derive)* Granular Provider Metrics ([#325](https://github.com/anton-rs/kona/pull/325))
-- *(derive)* Stage Level Metrics ([#309](https://github.com/anton-rs/kona/pull/309))
-- *(examples)* Trusted Sync Metrics ([#308](https://github.com/anton-rs/kona/pull/308))
+- Run cargo hack against workspace ([#485](https://github.com/op-rs/kona/pull/485))
+- *(workspace)* Workspace Re-exports ([#468](https://github.com/op-rs/kona/pull/468))
+- *(ci)* Add scheduled FPP differential tests ([#408](https://github.com/op-rs/kona/pull/408))
+- *(derive+trusted-sync)* online blob provider with fallback ([#410](https://github.com/op-rs/kona/pull/410))
+- increase granularity ([#365](https://github.com/op-rs/kona/pull/365))
+- *(derive)* histogram for number of channels for given frame counts ([#337](https://github.com/op-rs/kona/pull/337))
+- *(derive)* track the current channel size ([#331](https://github.com/op-rs/kona/pull/331))
+- *(derive)* more stage metrics ([#326](https://github.com/op-rs/kona/pull/326))
+- *(derive)* Granular Provider Metrics ([#325](https://github.com/op-rs/kona/pull/325))
+- *(derive)* Stage Level Metrics ([#309](https://github.com/op-rs/kona/pull/309))
+- *(examples)* Trusted Sync Metrics ([#308](https://github.com/op-rs/kona/pull/308))
### Fixed
-- downgrade for release plz ([#458](https://github.com/anton-rs/kona/pull/458))
-- *(workspace)* Add Unused Dependency Lint ([#453](https://github.com/anton-rs/kona/pull/453))
-- *(derive)* remove fpvm tests ([#447](https://github.com/anton-rs/kona/pull/447))
-- *(derive)* Granite Hardfork Support ([#420](https://github.com/anton-rs/kona/pull/420))
-- remove data iter option ([#405](https://github.com/anton-rs/kona/pull/405))
-- *(deps)* Bump Alloy Dependencies ([#409](https://github.com/anton-rs/kona/pull/409))
-- *(kona-derive)* Remove SignedRecoverable Shim ([#400](https://github.com/anton-rs/kona/pull/400))
-- *(derive)* Pipeline Reset ([#383](https://github.com/anton-rs/kona/pull/383))
-- *(examples)* Start N Blocks Back from Tip ([#349](https://github.com/anton-rs/kona/pull/349))
-- *(derive)* Unused var w/o `metrics` feature ([#345](https://github.com/anton-rs/kona/pull/345))
-- *(derive)* bind the Pipeline trait to Iterator ([#334](https://github.com/anton-rs/kona/pull/334))
-- *(derive)* prefix all metric names ([#330](https://github.com/anton-rs/kona/pull/330))
-- *(examples)* don't panic on validation fetch failure ([#327](https://github.com/anton-rs/kona/pull/327))
-- *(derive)* Warnings with metrics macro ([#322](https://github.com/anton-rs/kona/pull/322))
+- downgrade for release plz ([#458](https://github.com/op-rs/kona/pull/458))
+- *(workspace)* Add Unused Dependency Lint ([#453](https://github.com/op-rs/kona/pull/453))
+- *(derive)* remove fpvm tests ([#447](https://github.com/op-rs/kona/pull/447))
+- *(derive)* Granite Hardfork Support ([#420](https://github.com/op-rs/kona/pull/420))
+- remove data iter option ([#405](https://github.com/op-rs/kona/pull/405))
+- *(deps)* Bump Alloy Dependencies ([#409](https://github.com/op-rs/kona/pull/409))
+- *(kona-derive)* Remove SignedRecoverable Shim ([#400](https://github.com/op-rs/kona/pull/400))
+- *(derive)* Pipeline Reset ([#383](https://github.com/op-rs/kona/pull/383))
+- *(examples)* Start N Blocks Back from Tip ([#349](https://github.com/op-rs/kona/pull/349))
+- *(derive)* Unused var w/o `metrics` feature ([#345](https://github.com/op-rs/kona/pull/345))
+- *(derive)* bind the Pipeline trait to Iterator ([#334](https://github.com/op-rs/kona/pull/334))
+- *(derive)* prefix all metric names ([#330](https://github.com/op-rs/kona/pull/330))
+- *(examples)* don't panic on validation fetch failure ([#327](https://github.com/op-rs/kona/pull/327))
+- *(derive)* Warnings with metrics macro ([#322](https://github.com/op-rs/kona/pull/322))
### Other
-- *(workspace)* Alloy Version Bumps ([#467](https://github.com/anton-rs/kona/pull/467))
-- *(workspace)* Update for `anton-rs` org transfer ([#474](https://github.com/anton-rs/kona/pull/474))
-- *(workspace)* Hoist Dependencies ([#466](https://github.com/anton-rs/kona/pull/466))
-- *(derive)* reset docs ([#464](https://github.com/anton-rs/kona/pull/464))
-- *(derive)* Remove udeps ([#462](https://github.com/anton-rs/kona/pull/462))
-- *(bin)* Remove `kt` ([#461](https://github.com/anton-rs/kona/pull/461))
-- refactor types out of kona-derive ([#454](https://github.com/anton-rs/kona/pull/454))
-- *(derive)* Channel timeout ([#437](https://github.com/anton-rs/kona/pull/437))
-- *(derive)* remove previous stage trait ([#423](https://github.com/anton-rs/kona/pull/423))
-- *(examples)* Add logs to trusted-sync ([#415](https://github.com/anton-rs/kona/pull/415))
-- *(derive)* refine channel frame count buckets ([#378](https://github.com/anton-rs/kona/pull/378))
-- *(derive)* Remove noisy batch logs ([#329](https://github.com/anton-rs/kona/pull/329))
-- clean up trusted sync loop ([#318](https://github.com/anton-rs/kona/pull/318))
-- *(docs)* Label Cleanup ([#307](https://github.com/anton-rs/kona/pull/307))
-- *(derive)* add targets to stage logs ([#310](https://github.com/anton-rs/kona/pull/310))
-
-## [0.0.2](https://github.com/anton-rs/kona/compare/kona-derive-v0.0.1...kona-derive-v0.0.2) - 2024-06-22
+- *(workspace)* Alloy Version Bumps ([#467](https://github.com/op-rs/kona/pull/467))
+- *(workspace)* Update for `op-rs` org transfer ([#474](https://github.com/op-rs/kona/pull/474))
+- *(workspace)* Hoist Dependencies ([#466](https://github.com/op-rs/kona/pull/466))
+- *(derive)* reset docs ([#464](https://github.com/op-rs/kona/pull/464))
+- *(derive)* Remove udeps ([#462](https://github.com/op-rs/kona/pull/462))
+- *(bin)* Remove `kt` ([#461](https://github.com/op-rs/kona/pull/461))
+- refactor types out of kona-derive ([#454](https://github.com/op-rs/kona/pull/454))
+- *(derive)* Channel timeout ([#437](https://github.com/op-rs/kona/pull/437))
+- *(derive)* remove previous stage trait ([#423](https://github.com/op-rs/kona/pull/423))
+- *(examples)* Add logs to trusted-sync ([#415](https://github.com/op-rs/kona/pull/415))
+- *(derive)* refine channel frame count buckets ([#378](https://github.com/op-rs/kona/pull/378))
+- *(derive)* Remove noisy batch logs ([#329](https://github.com/op-rs/kona/pull/329))
+- clean up trusted sync loop ([#318](https://github.com/op-rs/kona/pull/318))
+- *(docs)* Label Cleanup ([#307](https://github.com/op-rs/kona/pull/307))
+- *(derive)* add targets to stage logs ([#310](https://github.com/op-rs/kona/pull/310))
+
+## [0.0.2](https://github.com/op-rs/kona/compare/kona-derive-v0.0.1...kona-derive-v0.0.2) - 2024-06-22
### Added
-- *(fjord)* fjord parameter changes ([#284](https://github.com/anton-rs/kona/pull/284))
-- *(client/host)* Oracle-backed Blob fetcher ([#255](https://github.com/anton-rs/kona/pull/255))
-- *(kona-derive)* Towards Derivation ([#243](https://github.com/anton-rs/kona/pull/243))
-- *(kona-derive)* Updated interface ([#230](https://github.com/anton-rs/kona/pull/230))
-- *(ci)* Dependabot config ([#236](https://github.com/anton-rs/kona/pull/236))
-- *(client)* `StatelessL2BlockExecutor` ([#210](https://github.com/anton-rs/kona/pull/210))
-- Pipeline Builder ([#217](https://github.com/anton-rs/kona/pull/217))
-- Minimal ResetProvider Implementation ([#208](https://github.com/anton-rs/kona/pull/208))
-- refactor the pipeline builder ([#209](https://github.com/anton-rs/kona/pull/209))
-- refactor reset provider ([#207](https://github.com/anton-rs/kona/pull/207))
-- *(preimage)* Async server components ([#183](https://github.com/anton-rs/kona/pull/183))
-- *(workspace)* Client programs in workspace ([#178](https://github.com/anton-rs/kona/pull/178))
-- *(primitives)* move attributes into primitives ([#163](https://github.com/anton-rs/kona/pull/163))
-- *(derive)* return the concrete online attributes queue type from the online stack constructor ([#158](https://github.com/anton-rs/kona/pull/158))
-- *(derive)* Abstract Alt DA out of `kona-derive` ([#156](https://github.com/anton-rs/kona/pull/156))
-- *(derive)* Online Data Source Factory Wiring ([#150](https://github.com/anton-rs/kona/pull/150))
-- *(plasma)* Implements Plasma Support for kona derive ([#152](https://github.com/anton-rs/kona/pull/152))
-- *(derive)* Pipeline Builder ([#127](https://github.com/anton-rs/kona/pull/127))
-- *(primitives)* kona-derive type refactor ([#135](https://github.com/anton-rs/kona/pull/135))
-- *(derive)* Span Batch Validation ([#121](https://github.com/anton-rs/kona/pull/121))
-- *(derive)* Use `L2ChainProvider` for system config fetching in attributes builder ([#123](https://github.com/anton-rs/kona/pull/123))
-- *(derive)* Online Blob Provider ([#117](https://github.com/anton-rs/kona/pull/117))
-- *(derive)* payload builder tests ([#106](https://github.com/anton-rs/kona/pull/106))
-- *(derive)* deposit derivation testing ([#115](https://github.com/anton-rs/kona/pull/115))
-- *(derive)* Build `L1BlockInfoTx` in payload builder ([#102](https://github.com/anton-rs/kona/pull/102))
-- *(derive)* `L2ChainProvider` w/ `op-alloy-consensus` ([#98](https://github.com/anton-rs/kona/pull/98))
-- *(derive)* Add `L1BlockInfoTx` ([#100](https://github.com/anton-rs/kona/pull/100))
-- *(derive)* Payload Attribute Building ([#92](https://github.com/anton-rs/kona/pull/92))
-- *(derive)* Online `ChainProvider` ([#93](https://github.com/anton-rs/kona/pull/93))
-- *(derive)* Move to `tracing` for telemetry ([#94](https://github.com/anton-rs/kona/pull/94))
-- *(derive)* Batch Queue Logging ([#86](https://github.com/anton-rs/kona/pull/86))
-- *(derive)* Add `ecrecover` trait + features ([#90](https://github.com/anton-rs/kona/pull/90))
-- *(derive)* Use upstream alloy ([#89](https://github.com/anton-rs/kona/pull/89))
+- *(fjord)* fjord parameter changes ([#284](https://github.com/op-rs/kona/pull/284))
+- *(client/host)* Oracle-backed Blob fetcher ([#255](https://github.com/op-rs/kona/pull/255))
+- *(kona-derive)* Towards Derivation ([#243](https://github.com/op-rs/kona/pull/243))
+- *(kona-derive)* Updated interface ([#230](https://github.com/op-rs/kona/pull/230))
+- *(ci)* Dependabot config ([#236](https://github.com/op-rs/kona/pull/236))
+- *(client)* `StatelessL2BlockExecutor` ([#210](https://github.com/op-rs/kona/pull/210))
+- Pipeline Builder ([#217](https://github.com/op-rs/kona/pull/217))
+- Minimal ResetProvider Implementation ([#208](https://github.com/op-rs/kona/pull/208))
+- refactor the pipeline builder ([#209](https://github.com/op-rs/kona/pull/209))
+- refactor reset provider ([#207](https://github.com/op-rs/kona/pull/207))
+- *(preimage)* Async server components ([#183](https://github.com/op-rs/kona/pull/183))
+- *(workspace)* Client programs in workspace ([#178](https://github.com/op-rs/kona/pull/178))
+- *(primitives)* move attributes into primitives ([#163](https://github.com/op-rs/kona/pull/163))
+- *(derive)* return the concrete online attributes queue type from the online stack constructor ([#158](https://github.com/op-rs/kona/pull/158))
+- *(derive)* Abstract Alt DA out of `kona-derive` ([#156](https://github.com/op-rs/kona/pull/156))
+- *(derive)* Online Data Source Factory Wiring ([#150](https://github.com/op-rs/kona/pull/150))
+- *(plasma)* Implements Plasma Support for kona derive ([#152](https://github.com/op-rs/kona/pull/152))
+- *(derive)* Pipeline Builder ([#127](https://github.com/op-rs/kona/pull/127))
+- *(primitives)* kona-derive type refactor ([#135](https://github.com/op-rs/kona/pull/135))
+- *(derive)* Span Batch Validation ([#121](https://github.com/op-rs/kona/pull/121))
+- *(derive)* Use `L2ChainProvider` for system config fetching in attributes builder ([#123](https://github.com/op-rs/kona/pull/123))
+- *(derive)* Online Blob Provider ([#117](https://github.com/op-rs/kona/pull/117))
+- *(derive)* payload builder tests ([#106](https://github.com/op-rs/kona/pull/106))
+- *(derive)* deposit derivation testing ([#115](https://github.com/op-rs/kona/pull/115))
+- *(derive)* Build `L1BlockInfoTx` in payload builder ([#102](https://github.com/op-rs/kona/pull/102))
+- *(derive)* `L2ChainProvider` w/ `op-alloy-consensus` ([#98](https://github.com/op-rs/kona/pull/98))
+- *(derive)* Add `L1BlockInfoTx` ([#100](https://github.com/op-rs/kona/pull/100))
+- *(derive)* Payload Attribute Building ([#92](https://github.com/op-rs/kona/pull/92))
+- *(derive)* Online `ChainProvider` ([#93](https://github.com/op-rs/kona/pull/93))
+- *(derive)* Move to `tracing` for telemetry ([#94](https://github.com/op-rs/kona/pull/94))
+- *(derive)* Batch Queue Logging ([#86](https://github.com/op-rs/kona/pull/86))
+- *(derive)* Add `ecrecover` trait + features ([#90](https://github.com/op-rs/kona/pull/90))
+- *(derive)* Use upstream alloy ([#89](https://github.com/op-rs/kona/pull/89))
- *(derive)* add next_attributes test
- *(workspace)* Add `rustfmt.toml`
- *(derive)* `SpanBatch` type implementation WIP
@@ -258,40 +258,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- *(derive)* fixed bytes and encoding
- *(derive)* raw span type refactoring
- *(types)* span batches
-- *(derive)* Channel Reader Implementation ([#65](https://github.com/anton-rs/kona/pull/65))
+- *(derive)* Channel Reader Implementation ([#65](https://github.com/op-rs/kona/pull/65))
- *(derive)* share the rollup config across stages using an arc
-- *(derive)* Test Utilities ([#62](https://github.com/anton-rs/kona/pull/62))
-- Single batch type ([#43](https://github.com/anton-rs/kona/pull/43))
-- *(derive)* channel bank ([#46](https://github.com/anton-rs/kona/pull/46))
-- Frame queue stage ([#45](https://github.com/anton-rs/kona/pull/45))
-- L1 retrieval ([#44](https://github.com/anton-rs/kona/pull/44))
-- System config update event parsing ([#42](https://github.com/anton-rs/kona/pull/42))
-- Add OP receipt fields ([#41](https://github.com/anton-rs/kona/pull/41))
-- Add `TxDeposit` type ([#40](https://github.com/anton-rs/kona/pull/40))
-- L1 traversal ([#39](https://github.com/anton-rs/kona/pull/39))
+- *(derive)* Test Utilities ([#62](https://github.com/op-rs/kona/pull/62))
+- Single batch type ([#43](https://github.com/op-rs/kona/pull/43))
+- *(derive)* channel bank ([#46](https://github.com/op-rs/kona/pull/46))
+- Frame queue stage ([#45](https://github.com/op-rs/kona/pull/45))
+- L1 retrieval ([#44](https://github.com/op-rs/kona/pull/44))
+- System config update event parsing ([#42](https://github.com/op-rs/kona/pull/42))
+- Add OP receipt fields ([#41](https://github.com/op-rs/kona/pull/41))
+- Add `TxDeposit` type ([#40](https://github.com/op-rs/kona/pull/40))
+- L1 traversal ([#39](https://github.com/op-rs/kona/pull/39))
### Fixed
-- *(derive)* Fjord brotli decompression ([#298](https://github.com/anton-rs/kona/pull/298))
-- *(examples)* Dynamic Rollup Config Loading ([#293](https://github.com/anton-rs/kona/pull/293))
-- type re-exports ([#280](https://github.com/anton-rs/kona/pull/280))
-- *(kona-derive)* reuse upstream reqwest provider ([#229](https://github.com/anton-rs/kona/pull/229))
-- Derivation Pipeline ([#220](https://github.com/anton-rs/kona/pull/220))
-- *(derive)* Alloy EIP4844 Blob Type ([#215](https://github.com/anton-rs/kona/pull/215))
-- Strong Error Typing ([#187](https://github.com/anton-rs/kona/pull/187))
-- *(derive)* inline blob verification into the blob provider ([#175](https://github.com/anton-rs/kona/pull/175))
-- *(derive)* fix span batch utils read_tx_data() ([#170](https://github.com/anton-rs/kona/pull/170))
-- *(derive)* Ethereum Data Source ([#159](https://github.com/anton-rs/kona/pull/159))
-- *(derive)* remove unnecessary online feature decorator ([#160](https://github.com/anton-rs/kona/pull/160))
-- *(ci)* Release plz ([#145](https://github.com/anton-rs/kona/pull/145))
-- *(derive)* move span batch conversion to try from trait ([#142](https://github.com/anton-rs/kona/pull/142))
-- *(derive)* Small Fixes and Span Batch Validation Fix ([#139](https://github.com/anton-rs/kona/pull/139))
-- *(workspace)* Release plz ([#138](https://github.com/anton-rs/kona/pull/138))
-- *(workspace)* Release plz ([#137](https://github.com/anton-rs/kona/pull/137))
-- *(derive)* Rebase span batch validation tests ([#125](https://github.com/anton-rs/kona/pull/125))
-- *(derive)* Span batch bitlist encoding ([#122](https://github.com/anton-rs/kona/pull/122))
-- *(derive)* Doc Touchups and Telemetry ([#105](https://github.com/anton-rs/kona/pull/105))
-- *(derive)* Derive full `SpanBatch` in channel reader ([#97](https://github.com/anton-rs/kona/pull/97))
-- *(derive)* Stage Decoupling ([#88](https://github.com/anton-rs/kona/pull/88))
+- *(derive)* Fjord brotli decompression ([#298](https://github.com/op-rs/kona/pull/298))
+- *(examples)* Dynamic Rollup Config Loading ([#293](https://github.com/op-rs/kona/pull/293))
+- type re-exports ([#280](https://github.com/op-rs/kona/pull/280))
+- *(kona-derive)* reuse upstream reqwest provider ([#229](https://github.com/op-rs/kona/pull/229))
+- Derivation Pipeline ([#220](https://github.com/op-rs/kona/pull/220))
+- *(derive)* Alloy EIP4844 Blob Type ([#215](https://github.com/op-rs/kona/pull/215))
+- Strong Error Typing ([#187](https://github.com/op-rs/kona/pull/187))
+- *(derive)* inline blob verification into the blob provider ([#175](https://github.com/op-rs/kona/pull/175))
+- *(derive)* fix span batch utils read_tx_data() ([#170](https://github.com/op-rs/kona/pull/170))
+- *(derive)* Ethereum Data Source ([#159](https://github.com/op-rs/kona/pull/159))
+- *(derive)* remove unnecessary online feature decorator ([#160](https://github.com/op-rs/kona/pull/160))
+- *(ci)* Release plz ([#145](https://github.com/op-rs/kona/pull/145))
+- *(derive)* move span batch conversion to try from trait ([#142](https://github.com/op-rs/kona/pull/142))
+- *(derive)* Small Fixes and Span Batch Validation Fix ([#139](https://github.com/op-rs/kona/pull/139))
+- *(workspace)* Release plz ([#138](https://github.com/op-rs/kona/pull/138))
+- *(workspace)* Release plz ([#137](https://github.com/op-rs/kona/pull/137))
+- *(derive)* Rebase span batch validation tests ([#125](https://github.com/op-rs/kona/pull/125))
+- *(derive)* Span batch bitlist encoding ([#122](https://github.com/op-rs/kona/pull/122))
+- *(derive)* Doc Touchups and Telemetry ([#105](https://github.com/op-rs/kona/pull/105))
+- *(derive)* Derive full `SpanBatch` in channel reader ([#97](https://github.com/op-rs/kona/pull/97))
+- *(derive)* Stage Decoupling ([#88](https://github.com/op-rs/kona/pull/88))
- *(derive)* add back removed test
- *(derive)* lints
- *(derive)* extend attributes queue unit test
@@ -301,8 +301,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- *(derive)* attributes queue
- *(derive)* hoist params
- *(derive)* merge upstream changes
-- *(derive)* fix bricked arc stage param construction ([#84](https://github.com/anton-rs/kona/pull/84))
-- *(derive)* l1 retrieval docs ([#80](https://github.com/anton-rs/kona/pull/80))
+- *(derive)* fix bricked arc stage param construction ([#84](https://github.com/op-rs/kona/pull/84))
+- *(derive)* l1 retrieval docs ([#80](https://github.com/op-rs/kona/pull/80))
- *(derive)* clean up frame queue docs
- *(derive)* frame queue error bubbling and docs
- *(derive)* rebase
@@ -313,32 +313,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- *(derive)* span batch tx rlp
- *(derive)* span type encodings and decodings
- *(derive)* more types
-- *(derive)* small l1 retrieval doc comment fix ([#61](https://github.com/anton-rs/kona/pull/61))
+- *(derive)* small l1 retrieval doc comment fix ([#61](https://github.com/op-rs/kona/pull/61))
### Other
-- version dependencies ([#296](https://github.com/anton-rs/kona/pull/296))
-- payload decoding tests ([#287](https://github.com/anton-rs/kona/pull/287))
-- payload decoding tests ([#289](https://github.com/anton-rs/kona/pull/289))
-- re-export input types ([#279](https://github.com/anton-rs/kona/pull/279))
-- *(deps)* fast forward op alloy dep ([#267](https://github.com/anton-rs/kona/pull/267))
-- *(derive)* cleanup pipeline tracing ([#264](https://github.com/anton-rs/kona/pull/264))
-- *(derive)* online module touchups ([#265](https://github.com/anton-rs/kona/pull/265))
-- *(derive)* Sources Touchups ([#266](https://github.com/anton-rs/kona/pull/266))
-- *(kona-derive)* Online Pipeline Cleanup ([#241](https://github.com/anton-rs/kona/pull/241))
-- *(derive)* data source unit tests ([#181](https://github.com/anton-rs/kona/pull/181))
-- *(workspace)* Move `alloy-primitives` to workspace dependencies ([#103](https://github.com/anton-rs/kona/pull/103))
-- *(ci)* Fail CI on doclint failure ([#101](https://github.com/anton-rs/kona/pull/101))
-- *(derive)* cleanups ([#91](https://github.com/anton-rs/kona/pull/91))
+- version dependencies ([#296](https://github.com/op-rs/kona/pull/296))
+- payload decoding tests ([#287](https://github.com/op-rs/kona/pull/287))
+- payload decoding tests ([#289](https://github.com/op-rs/kona/pull/289))
+- re-export input types ([#279](https://github.com/op-rs/kona/pull/279))
+- *(deps)* fast forward op alloy dep ([#267](https://github.com/op-rs/kona/pull/267))
+- *(derive)* cleanup pipeline tracing ([#264](https://github.com/op-rs/kona/pull/264))
+- *(derive)* online module touchups ([#265](https://github.com/op-rs/kona/pull/265))
+- *(derive)* Sources Touchups ([#266](https://github.com/op-rs/kona/pull/266))
+- *(kona-derive)* Online Pipeline Cleanup ([#241](https://github.com/op-rs/kona/pull/241))
+- *(derive)* data source unit tests ([#181](https://github.com/op-rs/kona/pull/181))
+- *(workspace)* Move `alloy-primitives` to workspace dependencies ([#103](https://github.com/op-rs/kona/pull/103))
+- *(ci)* Fail CI on doclint failure ([#101](https://github.com/op-rs/kona/pull/101))
+- *(derive)* cleanups ([#91](https://github.com/op-rs/kona/pull/91))
- Merge branch 'main' into refcell/data-sources
-- Merge pull request [#87](https://github.com/anton-rs/kona/pull/87) from anton-rs/refcell/origin-providers
+- Merge pull request [#87](https://github.com/op-rs/kona/pull/87) from op-rs/refcell/origin-providers
- Merge branch 'main' into refcell/channel-bank-tests
- Merge branch 'main' into refcell/payload-queue
-- *(derive)* L1Traversal Doc and Test Cleanup ([#79](https://github.com/anton-rs/kona/pull/79))
-- Merge pull request [#67](https://github.com/anton-rs/kona/pull/67) from anton-rs/refcell/batch-queue
+- *(derive)* L1Traversal Doc and Test Cleanup ([#79](https://github.com/op-rs/kona/pull/79))
+- Merge pull request [#67](https://github.com/op-rs/kona/pull/67) from op-rs/refcell/batch-queue
- *(derive)* Channel reader tests + fixes, batch type fixes
- *(derive)* `RawSpanBatch` diff decoding/encoding test
- *(derive)* rebase + move `alloy` module
- *(derive)* Clean up RLP encoding + use `TxType` rather than ints
-- Update `derive` lint rules ([#47](https://github.com/anton-rs/kona/pull/47))
-- scaffold ([#37](https://github.com/anton-rs/kona/pull/37))
-- Make versions of packages independent ([#36](https://github.com/anton-rs/kona/pull/36))
+- Update `derive` lint rules ([#47](https://github.com/op-rs/kona/pull/47))
+- scaffold ([#37](https://github.com/op-rs/kona/pull/37))
+- Make versions of packages independent ([#36](https://github.com/op-rs/kona/pull/36))
diff --git a/crates/derive/Cargo.toml b/crates/derive/Cargo.toml
index 7da5a04f65..8d5c533656 100644
--- a/crates/derive/Cargo.toml
+++ b/crates/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "kona-derive"
description = "A no_std derivation pipeline implementation for the OP Stack"
-version = "0.2.0"
+version = "0.2.3"
edition.workspace = true
authors.workspace = true
license.workspace = true
@@ -25,6 +25,7 @@ op-alloy-protocol.workspace = true
op-alloy-rpc-types-engine.workspace = true
op-alloy-consensus = { workspace = true, features = ["k256"] }
+
# General
tracing.workspace = true
async-trait.workspace = true
@@ -34,11 +35,18 @@ thiserror.workspace = true
spin = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true, features = ["fmt"] }
+bytes = { workspace = true}
+hex = {workspace = true}
+prost = { workspace = true, default-features = false}
+rlp = {workspace = true, default-features = false}
+log = "0.4.22"
+miniz_oxide.workspace = true
+
+
[dev-dependencies]
spin.workspace = true
proptest.workspace = true
serde_json.workspace = true
-op-alloy-registry.workspace = true
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitrary"] }
diff --git a/crates/derive/README.md b/crates/derive/README.md
index bbf2935a2a..e8cdbad1b6 100644
--- a/crates/derive/README.md
+++ b/crates/derive/README.md
@@ -1,9 +1,9 @@
# `kona-derive`
-
+
-
-
+
+
A `no_std` compatible implementation of the OP Stack's [derivation pipeline][derive].
diff --git a/crates/derive/src/attributes/stateful.rs b/crates/derive/src/attributes/stateful.rs
index c9390da662..bba03f247b 100644
--- a/crates/derive/src/attributes/stateful.rs
+++ b/crates/derive/src/attributes/stateful.rs
@@ -1,4 +1,3 @@
-#![allow(clippy::unnecessary_map_or)]
//! The [`AttributesBuilder`] and it's default implementation.
use crate::{
@@ -13,9 +12,9 @@ use alloy_primitives::{address, Address, Bytes, B256};
use alloy_rlp::Encodable;
use alloy_rpc_types_engine::PayloadAttributes;
use async_trait::async_trait;
-use op_alloy_consensus::{Hardfork, Hardforks};
use op_alloy_genesis::RollupConfig;
-use op_alloy_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
+use op_alloy_protocol::L2BlockInfo;
+use op_alloy_protocol::{decode_deposit, L1BlockInfoTx, DEPOSIT_EVENT_ABI_HASH};
use op_alloy_rpc_types_engine::OpPayloadAttributes;
/// The sequencer fee vault address.
@@ -90,11 +89,7 @@ where
.await
.map_err(|e| PipelineError::BadEncoding(e).crit())?;
sys_config
- .update_with_receipts(
- &receipts,
- self.rollup_cfg.l1_system_config_address,
- self.rollup_cfg.is_ecotone_active(header.timestamp),
- )
+ .update_with_receipts(&receipts, self.rollup_cfg.l1_system_config_address)
.map_err(|e| PipelineError::SystemConfigUpdate(e).crit())?;
l1_header = header;
deposit_transactions = deposits;
@@ -129,18 +124,6 @@ where
));
}
- let mut upgrade_transactions: Vec = vec![];
- if self.rollup_cfg.is_ecotone_active(next_l2_time) &&
- !self.rollup_cfg.is_ecotone_active(l2_parent.block_info.timestamp)
- {
- upgrade_transactions = Hardforks::ECOTONE.txs().collect();
- }
- if self.rollup_cfg.is_fjord_active(next_l2_time) &&
- !self.rollup_cfg.is_fjord_active(l2_parent.block_info.timestamp)
- {
- upgrade_transactions.append(&mut Hardforks::FJORD.txs().collect());
- }
-
// Build and encode the L1 info transaction for the current payload.
let (_, l1_info_tx_envelope) = L1BlockInfoTx::try_new_with_deposit_tx(
&self.rollup_cfg,
@@ -155,23 +138,12 @@ where
let mut encoded_l1_info_tx = Vec::with_capacity(l1_info_tx_envelope.length());
l1_info_tx_envelope.encode_2718(&mut encoded_l1_info_tx);
- let mut txs =
- Vec::with_capacity(1 + deposit_transactions.len() + upgrade_transactions.len());
+ let mut txs = Vec::with_capacity(1 + deposit_transactions.len());
txs.push(encoded_l1_info_tx.into());
txs.extend(deposit_transactions);
- txs.extend(upgrade_transactions);
let mut withdrawals = None;
- if self.rollup_cfg.is_canyon_active(next_l2_time) {
- withdrawals = Some(Vec::default());
- }
-
let mut parent_beacon_root = None;
- if self.rollup_cfg.is_ecotone_active(next_l2_time) {
- // if the parent beacon root is not available, default to zero hash
- parent_beacon_root = Some(l1_header.parent_beacon_block_root.unwrap_or_default());
- }
-
Ok(OpPayloadAttributes {
payload_attributes: PayloadAttributes {
timestamp: next_l2_time,
@@ -179,19 +151,13 @@ where
suggested_fee_recipient: SEQUENCER_FEE_VAULT_ADDRESS,
parent_beacon_block_root: parent_beacon_root,
withdrawals,
- target_blobs_per_block: None,
- max_blobs_per_block: None,
},
transactions: Some(txs),
no_tx_pool: Some(true),
gas_limit: Some(u64::from_be_bytes(
alloy_primitives::U64::from(sys_config.gas_limit).to_be_bytes(),
)),
- eip_1559_params: sys_config.eip_1559_params(
- &self.rollup_cfg,
- l2_parent.block_info.timestamp,
- next_l2_time,
- ),
+ base_fee: None,
})
}
}
@@ -239,7 +205,9 @@ mod tests {
use alloy_consensus::Header;
use alloy_primitives::{Log, LogData, B256, U256, U64};
use op_alloy_genesis::SystemConfig;
- use op_alloy_protocol::{BlockInfo, DepositError};
+ use op_alloy_protocol::BlockInfo;
+ use op_alloy_protocol::DepositError;
+ use proptest::num::u128;
fn generate_valid_log() -> Log {
let deposit_contract = address!("1111111111111111111111111111111111111111");
@@ -453,164 +421,17 @@ mod tests {
suggested_fee_recipient: SEQUENCER_FEE_VAULT_ADDRESS,
parent_beacon_block_root: None,
withdrawals: None,
- target_blobs_per_block: None,
- max_blobs_per_block: None,
},
transactions: payload.transactions.clone(),
no_tx_pool: Some(true),
gas_limit: Some(u64::from_be_bytes(
alloy_primitives::U64::from(SystemConfig::default().gas_limit).to_be_bytes(),
)),
- eip_1559_params: None,
- };
- assert_eq!(payload, expected);
- assert_eq!(payload.transactions.unwrap().len(), 1);
- }
-
- #[tokio::test]
- async fn test_prepare_payload_with_canyon() {
- let block_time = 10;
- let timestamp = 100;
- let cfg = Arc::new(RollupConfig { block_time, canyon_time: Some(0), ..Default::default() });
- let l2_number = 1;
- let mut fetcher = TestSystemConfigL2Fetcher::default();
- fetcher.insert(l2_number, SystemConfig::default());
- let mut provider = TestChainProvider::default();
- let header = Header { timestamp, ..Default::default() };
- let prev_randao = header.mix_hash;
- let hash = header.hash_slow();
- provider.insert_header(hash, header);
- let mut builder = StatefulAttributesBuilder::new(cfg, fetcher, provider);
- let epoch = BlockNumHash { hash, number: l2_number };
- let l2_parent = L2BlockInfo {
- block_info: BlockInfo {
- hash: B256::ZERO,
- number: l2_number,
- timestamp,
- parent_hash: hash,
- },
- l1_origin: BlockNumHash { hash, number: l2_number },
- seq_num: 0,
- };
- let next_l2_time = l2_parent.block_info.timestamp + block_time;
- let payload = builder.prepare_payload_attributes(l2_parent, epoch).await.unwrap();
- let expected = OpPayloadAttributes {
- payload_attributes: PayloadAttributes {
- timestamp: next_l2_time,
- prev_randao,
- suggested_fee_recipient: SEQUENCER_FEE_VAULT_ADDRESS,
- parent_beacon_block_root: None,
- withdrawals: Some(Vec::default()),
- target_blobs_per_block: None,
- max_blobs_per_block: None,
- },
- transactions: payload.transactions.clone(),
- no_tx_pool: Some(true),
- gas_limit: Some(u64::from_be_bytes(
- alloy_primitives::U64::from(SystemConfig::default().gas_limit).to_be_bytes(),
+ base_fee: Some(u128::from_be_bytes(
+ alloy_primitives::U256::from(SystemConfig::default().base_fee).to_be_bytes(),
)),
- eip_1559_params: None,
};
assert_eq!(payload, expected);
assert_eq!(payload.transactions.unwrap().len(), 1);
}
-
- #[tokio::test]
- async fn test_prepare_payload_with_ecotone() {
- let block_time = 2;
- let timestamp = 100;
- let cfg =
- Arc::new(RollupConfig { block_time, ecotone_time: Some(102), ..Default::default() });
- let l2_number = 1;
- let mut fetcher = TestSystemConfigL2Fetcher::default();
- fetcher.insert(l2_number, SystemConfig::default());
- let mut provider = TestChainProvider::default();
- let header = Header { timestamp, ..Default::default() };
- let parent_beacon_block_root = Some(header.parent_beacon_block_root.unwrap_or_default());
- let prev_randao = header.mix_hash;
- let hash = header.hash_slow();
- provider.insert_header(hash, header);
- let mut builder = StatefulAttributesBuilder::new(cfg, fetcher, provider);
- let epoch = BlockNumHash { hash, number: l2_number };
- let l2_parent = L2BlockInfo {
- block_info: BlockInfo {
- hash: B256::ZERO,
- number: l2_number,
- timestamp,
- parent_hash: hash,
- },
- l1_origin: BlockNumHash { hash, number: l2_number },
- seq_num: 0,
- };
- let next_l2_time = l2_parent.block_info.timestamp + block_time;
- let payload = builder.prepare_payload_attributes(l2_parent, epoch).await.unwrap();
- let expected = OpPayloadAttributes {
- payload_attributes: PayloadAttributes {
- timestamp: next_l2_time,
- prev_randao,
- suggested_fee_recipient: SEQUENCER_FEE_VAULT_ADDRESS,
- parent_beacon_block_root,
- withdrawals: Some(vec![]),
- target_blobs_per_block: None,
- max_blobs_per_block: None,
- },
- transactions: payload.transactions.clone(),
- no_tx_pool: Some(true),
- gas_limit: Some(u64::from_be_bytes(
- alloy_primitives::U64::from(SystemConfig::default().gas_limit).to_be_bytes(),
- )),
- eip_1559_params: None,
- };
- assert_eq!(payload, expected);
- assert_eq!(payload.transactions.unwrap().len(), 7);
- }
-
- #[tokio::test]
- async fn test_prepare_payload_with_fjord() {
- let block_time = 2;
- let timestamp = 100;
- let cfg =
- Arc::new(RollupConfig { block_time, fjord_time: Some(102), ..Default::default() });
- let l2_number = 1;
- let mut fetcher = TestSystemConfigL2Fetcher::default();
- fetcher.insert(l2_number, SystemConfig::default());
- let mut provider = TestChainProvider::default();
- let header = Header { timestamp, ..Default::default() };
- let prev_randao = header.mix_hash;
- let hash = header.hash_slow();
- provider.insert_header(hash, header);
- let mut builder = StatefulAttributesBuilder::new(cfg, fetcher, provider);
- let epoch = BlockNumHash { hash, number: l2_number };
- let l2_parent = L2BlockInfo {
- block_info: BlockInfo {
- hash: B256::ZERO,
- number: l2_number,
- timestamp,
- parent_hash: hash,
- },
- l1_origin: BlockNumHash { hash, number: l2_number },
- seq_num: 0,
- };
- let next_l2_time = l2_parent.block_info.timestamp + block_time;
- let payload = builder.prepare_payload_attributes(l2_parent, epoch).await.unwrap();
- let expected = OpPayloadAttributes {
- payload_attributes: PayloadAttributes {
- timestamp: next_l2_time,
- prev_randao,
- suggested_fee_recipient: SEQUENCER_FEE_VAULT_ADDRESS,
- parent_beacon_block_root: Some(B256::ZERO),
- withdrawals: Some(vec![]),
- target_blobs_per_block: None,
- max_blobs_per_block: None,
- },
- transactions: payload.transactions.clone(),
- no_tx_pool: Some(true),
- gas_limit: Some(u64::from_be_bytes(
- alloy_primitives::U64::from(SystemConfig::default().gas_limit).to_be_bytes(),
- )),
- eip_1559_params: None,
- };
- assert_eq!(payload.transactions.as_ref().unwrap().len(), 10);
- assert_eq!(payload, expected);
- }
}
diff --git a/crates/derive/src/da/da.rs b/crates/derive/src/da/da.rs
new file mode 100644
index 0000000000..2e62a335d1
--- /dev/null
+++ b/crates/derive/src/da/da.rs
@@ -0,0 +1,16 @@
+use alloc::boxed::Box;
+use alloc::vec::Vec;
+use async_trait::async_trait;
+use core::fmt::Display;
+
+#[async_trait]
+pub trait IEigenDA {
+ /// The error type for the [IEigenDA].
+ type Error: Display;
+
+ /// get blob from EigenDA with commitment
+ async fn retrieve_blob_with_commitment(
+ &self,
+ commitment: &[u8],
+ ) -> Result, Self::Error>;
+}
diff --git a/crates/derive/src/da/mod.rs b/crates/derive/src/da/mod.rs
new file mode 100644
index 0000000000..003e7e65d5
--- /dev/null
+++ b/crates/derive/src/da/mod.rs
@@ -0,0 +1,2 @@
+pub mod da;
+pub use da::*;
diff --git a/crates/derive/src/errors/da.rs b/crates/derive/src/errors/da.rs
new file mode 100644
index 0000000000..c0c8bf31ed
--- /dev/null
+++ b/crates/derive/src/errors/da.rs
@@ -0,0 +1,49 @@
+use alloc::string::String;
+use thiserror::Error;
+
+/// An [EigenDAProxyError] Error.
+
+#[derive(Error, Debug, PartialEq, Eq)]
+pub enum EigenDAProxyError {
+ /// Retrieve blob error.
+ #[error("Failed to retrieve blob, error: {0}")]
+ RetrieveBlob(String),
+ /// Retrieve blob with commitment error.
+ #[error("Failed to retrieve blob with commitment, error: {0}")]
+ RetrieveBlobWithCommitment(String),
+ /// Disperse blob error.
+ #[error("Failed to disperse blob, error: {0}")]
+ DisperseBlob(String),
+ /// Get blob status error.
+ #[error("Failed to get blob status, error: {0}")]
+ GetBlobStatus(String),
+ /// No fund blob from EigenDA.
+ #[error("Blob not fund from EigenDA")]
+ NotFound,
+ /// Invalid input data len.
+ #[error("Invalid input data len for disperse blob from EigenDA")]
+ InvalidInput,
+ /// Request timeout.
+ #[error("Request blob timeout, error: {0}")]
+ TimeOut(String),
+}
+
+/// An error returned by the [EigenDAProviderError]
+#[derive(Error, Debug, PartialEq, Eq)]
+pub enum EigenDAProviderError {
+ /// Retrieve Frame from da indexer error.
+ #[error("Failed to retrieve blob from da indexer, error: {0}")]
+ RetrieveFramesFromDaIndexer(String),
+ /// Request timeout.
+ #[error("Request blob timeout, error: {0}")]
+ TimeOut(String),
+ #[error("Get blob from indexer da, status: {0}")]
+ Status(String),
+ /// Error pertaining to the backend transport.
+ #[error("{0}")]
+ Backend(String),
+ #[error("Failed to decode blob, error: {0}")]
+ RLPDecodeError(String),
+ #[error("Failed to decode proto buf, error: {0}")]
+ ProtoDecodeError(String),
+}
diff --git a/crates/derive/src/errors/mod.rs b/crates/derive/src/errors/mod.rs
index f4b66f72c5..2af527fb1b 100644
--- a/crates/derive/src/errors/mod.rs
+++ b/crates/derive/src/errors/mod.rs
@@ -11,3 +11,6 @@ pub use pipeline::{PipelineEncodingError, PipelineError, PipelineErrorKind, Rese
mod sources;
pub use sources::{BlobDecodingError, BlobProviderError};
+
+mod da;
+pub use da::{EigenDAProviderError, EigenDAProxyError};
diff --git a/crates/derive/src/errors/stages.rs b/crates/derive/src/errors/stages.rs
index bced73789e..53c3e039d1 100644
--- a/crates/derive/src/errors/stages.rs
+++ b/crates/derive/src/errors/stages.rs
@@ -1,12 +1,12 @@
//! Error types for derivation pipeline stages.
-use op_alloy_protocol::MAX_SPAN_BATCH_ELEMENTS;
+use op_alloy_protocol::MAX_RLP_BYTES_PER_CHANNEL;
use thiserror::Error;
/// A frame decompression error.
#[derive(Error, Debug, PartialEq, Eq)]
pub enum BatchDecompressionError {
- /// The buffer exceeds the [MAX_SPAN_BATCH_ELEMENTS] protocol parameter.
- #[error("The batch exceeds the maximum number of elements: {max_size}", max_size = MAX_SPAN_BATCH_ELEMENTS)]
+ /// The buffer exceeds the [MAX_RLP_BYTES_PER_CHANNEL] protocol parameter.
+ #[error("The batch exceeds the maximum number of elements: {max_size}", max_size = MAX_RLP_BYTES_PER_CHANNEL)]
BatchTooLarge,
}
diff --git a/crates/derive/src/lib.rs b/crates/derive/src/lib.rs
index 732c8db86a..aad0cf6c90 100644
--- a/crates/derive/src/lib.rs
+++ b/crates/derive/src/lib.rs
@@ -1,7 +1,7 @@
#![doc = include_str!("../README.md")]
#![doc(
- html_logo_url = "https://raw.githubusercontent.com/anton-rs/kona/main/assets/square.png",
- html_favicon_url = "https://raw.githubusercontent.com/anton-rs/kona/main/assets/favicon.ico"
+ html_logo_url = "https://raw.githubusercontent.com/op-rs/kona/main/assets/square.png",
+ html_favicon_url = "https://raw.githubusercontent.com/op-rs/kona/main/assets/favicon.ico"
)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
@@ -27,5 +27,7 @@ pub mod stages;
pub mod traits;
pub mod types;
+pub mod da;
+mod proto;
#[cfg(any(test, feature = "test-utils"))]
pub mod test_utils;
diff --git a/crates/derive/src/pipeline/builder.rs b/crates/derive/src/pipeline/builder.rs
index eb6ba26c99..44d2bada3d 100644
--- a/crates/derive/src/pipeline/builder.rs
+++ b/crates/derive/src/pipeline/builder.rs
@@ -18,9 +18,9 @@ type L1RetrievalStage = L1Retrieval>;
type FrameQueueStage = FrameQueue>;
type ChannelProviderStage = ChannelProvider>;
type ChannelReaderStage = ChannelReader>;
-type BatchStreamStage = BatchStream, T>;
-type BatchProviderStage = BatchProvider, T>;
-type AttributesQueueStage = AttributesQueue, B>;
+type BatchStreamStage = BatchStream>;
+type BatchProviderStage = BatchProvider>;
+type AttributesQueueStage = AttributesQueue, B>;
/// The `PipelineBuilder` constructs a [DerivationPipeline] using a builder pattern.
#[derive(Debug)]
@@ -107,13 +107,13 @@ where
}
/// Builds the pipeline.
- pub fn build(self) -> DerivationPipeline, T> {
+ pub fn build(self) -> DerivationPipeline, T> {
self.into()
}
}
impl From>
- for DerivationPipeline, T>
+ for DerivationPipeline, T>
where
B: AttributesBuilder + Send + Debug,
P: ChainProvider + Send + Sync + Debug,
@@ -135,10 +135,8 @@ where
let frame_queue = FrameQueue::new(l1_retrieval, Arc::clone(&rollup_config));
let channel_provider = ChannelProvider::new(Arc::clone(&rollup_config), frame_queue);
let channel_reader = ChannelReader::new(channel_provider, Arc::clone(&rollup_config));
- let batch_stream =
- BatchStream::new(channel_reader, rollup_config.clone(), l2_chain_provider.clone());
- let batch_provider =
- BatchProvider::new(rollup_config.clone(), batch_stream, l2_chain_provider.clone());
+ let batch_stream = BatchStream::new(channel_reader);
+ let batch_provider = BatchProvider::new(rollup_config.clone(), batch_stream);
let attributes =
AttributesQueue::new(rollup_config.clone(), batch_provider, attributes_builder);
diff --git a/crates/derive/src/pipeline/core.rs b/crates/derive/src/pipeline/core.rs
index 927f8cf1ea..c794b8797f 100644
--- a/crates/derive/src/pipeline/core.rs
+++ b/crates/derive/src/pipeline/core.rs
@@ -91,8 +91,8 @@ where
/// The `signal` is contains the signal variant with any necessary parameters.
async fn signal(&mut self, signal: Signal) -> PipelineResult<()> {
match signal {
- mut s @ Signal::Reset(ResetSignal { l2_safe_head, .. }) |
- mut s @ Signal::Activation(ActivationSignal { l2_safe_head, .. }) => {
+ mut s @ Signal::Reset(ResetSignal { l2_safe_head, .. })
+ | mut s @ Signal::Activation(ActivationSignal { l2_safe_head, .. }) => {
let system_config = self
.l2_chain_provider
.system_config_by_number(
@@ -176,6 +176,10 @@ where
}
StepResult::AdvancedOrigin
}
+ PipelineErrorKind::Temporary(_) => {
+ trace!(target: "pipeline", "Attributes queue step failed due to temporary error: {:?}", err);
+ StepResult::StepFailed(err)
+ }
_ => {
warn!(target: "pipeline", "Attributes queue step failed: {:?}", err);
StepResult::StepFailed(err)
@@ -210,10 +214,9 @@ mod tests {
transactions: None,
no_tx_pool: None,
gas_limit: None,
- eip_1559_params: None,
+ base_fee: None,
},
parent: Default::default(),
- is_last_in_span: false,
}
}
diff --git a/crates/derive/src/proto/calldata.proto b/crates/derive/src/proto/calldata.proto
new file mode 100644
index 0000000000..3d218bdae7
--- /dev/null
+++ b/crates/derive/src/proto/calldata.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+
+package calldata;
+
+// CalldataFrame wraps the frame data or the eigenda blob reference to the frame data
+message CalldataFrame {
+ oneof value {
+ bytes frame = 1;
+ FrameRef frame_ref = 2;
+ }
+}
+
+// This is a copy of BlobRequest here: https://github.com/Layr-Labs/eigenda/blob/main/api/proto/retriever/retriever.proto#L10
+message FrameRef {
+ // defined by eigenda
+ bytes batch_header_hash = 1;
+ uint32 blob_index = 2;
+ uint32 reference_block_number = 3;
+ repeated uint32 quorum_ids = 4;
+ uint32 blob_length = 5;
+
+ // defined by mantle
+ bytes request_id = 100;
+ bytes commitment = 101;
+}
diff --git a/crates/derive/src/proto/calldata.rs b/crates/derive/src/proto/calldata.rs
new file mode 100644
index 0000000000..1a7476fe91
--- /dev/null
+++ b/crates/derive/src/proto/calldata.rs
@@ -0,0 +1,40 @@
+// This file is @generated by prost-build.
+/// CalldataFrame wraps the frame data or the eigenda blob reference to the frame data
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct CalldataFrame {
+ #[prost(oneof = "calldata_frame::Value", tags = "1, 2")]
+ pub value: ::core::option::Option,
+}
+/// Nested message and enum types in `CalldataFrame`.
+pub mod calldata_frame {
+ #[allow(clippy::derive_partial_eq_without_eq)]
+ #[derive(Clone, PartialEq, ::prost::Oneof)]
+ pub enum Value {
+ #[prost(bytes, tag = "1")]
+ Frame(::prost::alloc::vec::Vec),
+ #[prost(message, tag = "2")]
+ FrameRef(super::FrameRef),
+ }
+}
+/// This is a copy of BlobRequest here:
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct FrameRef {
+ /// defined by eigenda
+ #[prost(bytes = "vec", tag = "1")]
+ pub batch_header_hash: ::prost::alloc::vec::Vec,
+ #[prost(uint32, tag = "2")]
+ pub blob_index: u32,
+ #[prost(uint32, tag = "3")]
+ pub reference_block_number: u32,
+ #[prost(uint32, repeated, tag = "4")]
+ pub quorum_ids: ::prost::alloc::vec::Vec,
+ #[prost(uint32, tag = "5")]
+ pub blob_length: u32,
+ /// defined by mantle
+ #[prost(bytes = "vec", tag = "100")]
+ pub request_id: ::prost::alloc::vec::Vec,
+ #[prost(bytes = "vec", tag = "101")]
+ pub commitment: ::prost::alloc::vec::Vec,
+}
diff --git a/crates/derive/src/proto/mod.rs b/crates/derive/src/proto/mod.rs
new file mode 100644
index 0000000000..46a3376206
--- /dev/null
+++ b/crates/derive/src/proto/mod.rs
@@ -0,0 +1,2 @@
+mod calldata;
+pub use calldata::*;
diff --git a/crates/derive/src/sources/calldata.rs b/crates/derive/src/sources/calldata.rs
index 7c0a32cd12..f056bf0bc7 100644
--- a/crates/derive/src/sources/calldata.rs
+++ b/crates/derive/src/sources/calldata.rs
@@ -91,7 +91,7 @@ mod tests {
use super::*;
use crate::{errors::PipelineErrorKind, test_utils::TestChainProvider};
use alloc::{vec, vec::Vec};
- use alloy_consensus::{Signed, TxEip2930, TxEip4844, TxEip4844Variant, TxLegacy};
+ use alloy_consensus::{Signed, TxEip2930, TxEip4844, TxEip4844Variant, TxEip7702, TxLegacy};
use alloy_primitives::{address, Address, PrimitiveSignature as Signature, TxKind};
pub(crate) fn test_legacy_tx(to: Address) -> TxEnvelope {
@@ -112,6 +112,15 @@ mod tests {
))
}
+ pub(crate) fn test_eip7702_tx(to: Address) -> TxEnvelope {
+ let sig = Signature::test_signature();
+ TxEnvelope::Eip7702(Signed::new_unchecked(
+ TxEip7702 { to, ..Default::default() },
+ sig,
+ Default::default(),
+ ))
+ }
+
pub(crate) fn test_blob_tx(to: Address) -> TxEnvelope {
let sig = Signature::test_signature();
TxEnvelope::Eip4844(Signed::new_unchecked(
@@ -231,6 +240,21 @@ mod tests {
assert!(source.open);
}
+ #[tokio::test]
+ async fn test_load_calldata_eip7702_tx_ignored() {
+ let batch_inbox_address = address!("0123456789012345678901234567890123456789");
+ let mut source = default_test_calldata_source();
+ source.batch_inbox_address = batch_inbox_address;
+ let tx = test_eip7702_tx(batch_inbox_address);
+ source.signer = tx.recover_signer().unwrap();
+ let block_info = BlockInfo::default();
+ source.chain_provider.insert_block_with_transactions(0, block_info, vec![tx]);
+ assert!(!source.open); // Source is not open by default.
+ assert!(source.load_calldata(&BlockInfo::default()).await.is_ok());
+ assert!(source.calldata.is_empty());
+ assert!(source.open);
+ }
+
#[tokio::test]
async fn test_next_err_loading_calldata() {
let mut source = default_test_calldata_source();
diff --git a/crates/derive/src/sources/eigen_da.rs b/crates/derive/src/sources/eigen_da.rs
new file mode 100644
index 0000000000..7c3c930a3e
--- /dev/null
+++ b/crates/derive/src/sources/eigen_da.rs
@@ -0,0 +1,350 @@
+use crate::errors::{
+ BlobDecodingError, BlobProviderError, EigenDAProviderError, EigenDAProxyError, PipelineError,
+};
+use crate::prelude::ChainProvider;
+use crate::proto::{calldata_frame, CalldataFrame};
+use crate::sources::BlobData;
+use crate::traits::{BlobProvider, DataAvailabilityProvider, EigenDAProvider};
+use crate::types::PipelineResult;
+use alloc::boxed::Box;
+use alloc::format;
+use alloc::string::ToString;
+use alloc::vec::Vec;
+use alloy_consensus::{Transaction, TxEip4844Variant, TxEnvelope, TxType};
+use alloy_eips::eip4844::IndexedBlobHash;
+use alloy_primitives::{hex, Address, Bytes};
+use alloy_rlp::Rlp;
+use async_trait::async_trait;
+use core::ops::Deref;
+use op_alloy_protocol::BlockInfo;
+use prost::Message;
+use rlp::{decode, Decodable, DecoderError};
+use tracing::{error, info, warn};
+
+/// Useful to dinstiguish between plain calldata and alt-da blob refs
+/// Support seamless migration of existing rollups using ETH DA
+pub const DERIVATION_VERSION_EIGEN_DA: u8 = 0xed;
+
+pub struct VecOfBytes(pub Vec>);
+
+impl Decodable for VecOfBytes {
+ fn decode(rlp: &rlp::Rlp<'_>) -> Result {
+ let inner = rlp.as_list::>()?;
+ Ok(VecOfBytes(inner))
+ }
+}
+
+/// A data iterator that reads from eigen da.
+#[derive(Debug, Clone)]
+pub struct EigenDaSource
+where
+ F: ChainProvider + Send,
+ B: BlobProvider + Send,
+ E: EigenDAProvider + Send,
+{
+ /// Chain provider.
+ pub chain_provider: F,
+ /// Fetches blobs.
+ pub blob_provider: B,
+ /// Fetches eigen da blobs.
+ pub eigen_da_provider: E,
+ /// The address of the batcher contract.
+ pub batcher_address: Address,
+ /// The L1 Signer.
+ pub signer: Address,
+ /// Data.
+ pub data: Vec,
+ /// Whether the source is open.
+ pub open: bool,
+}
+
+impl EigenDaSource
+where
+ F: ChainProvider + Send,
+ B: BlobProvider + Send,
+ E: EigenDAProvider + Send,
+{
+ /// Creates a new EigenDA blob source.
+ pub const fn new(
+ chain_provider: F,
+ blob_provider: B,
+ eigen_da_provider: E,
+ batcher_address: Address,
+ signer: Address,
+ ) -> Self {
+ Self {
+ chain_provider,
+ blob_provider,
+ eigen_da_provider,
+ batcher_address,
+ signer,
+ data: Vec::new(),
+ open: false,
+ }
+ }
+
+ async fn data_from_eigen_da(
+ &mut self,
+ txs: Vec,
+ ) -> Result<(Vec, Vec), EigenDAProviderError> {
+ let mut out: Vec = Vec::new();
+ let mut hashes = Vec::new();
+ let mut number: u64 = 0;
+
+ for tx in txs {
+ let (tx_kind, calldata, blob_hashes) = match &tx {
+ TxEnvelope::Legacy(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip2930(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip1559(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip4844(blob_tx_wrapper) => match blob_tx_wrapper.tx() {
+ TxEip4844Variant::TxEip4844(tx) => {
+ (tx.to(), tx.input.clone(), Some(tx.blob_versioned_hashes.clone()))
+ }
+ TxEip4844Variant::TxEip4844WithSidecar(tx) => {
+ let tx = tx.tx();
+ (tx.to(), tx.input.clone(), Some(tx.blob_versioned_hashes.clone()))
+ }
+ },
+ _ => continue,
+ };
+ let Some(to) = tx_kind else { continue };
+ if to != self.batcher_address {
+ number += blob_hashes.map_or(0, |h| h.len() as u64);
+ continue;
+ }
+ if tx.recover_signer().unwrap_or_default() != self.signer {
+ number += blob_hashes.map_or(0, |h| h.len() as u64);
+ continue;
+ }
+ if self.eigen_da_provider.da_indexer_enable() {
+ error!("eigen_da_provider.da_indexer_enable() not implemented");
+ break;
+ }
+
+ if calldata.len() == 0 {
+ if tx.tx_type() == TxType::Eip4844 {
+ let blob_hashes = if let Some(b) = blob_hashes {
+ b
+ } else {
+ continue;
+ };
+ for blob in blob_hashes {
+ let indexed = IndexedBlobHash { hash: blob, index: number };
+ hashes.push(indexed);
+ number += 1;
+ }
+ }
+ continue;
+ }
+
+ if calldata[0] == DERIVATION_VERSION_EIGEN_DA {
+ let blob_data = calldata.slice(1..);
+ let calldata_frame: CalldataFrame = CalldataFrame::decode(blob_data)
+ .map_err(|e| EigenDAProviderError::ProtoDecodeError(e.to_string()))?;
+ if let Some(value) = calldata_frame.value {
+ match value {
+ calldata_frame::Value::Frame(frame) => out.push(Bytes::from(frame)),
+ calldata_frame::Value::FrameRef(frame_ref) => {
+ if frame_ref.quorum_ids.len() == 0 {
+ warn!(target: "eigen-da-source", "decoded frame ref contains no quorum IDs");
+ continue;
+ }
+ let blob_data = self
+ .eigen_da_provider
+ .retrieve_blob_with_commitment(
+ &frame_ref.commitment,
+ frame_ref.blob_length,
+ )
+ .await
+ .map_err(|e| EigenDAProviderError::Status(e.to_string()))?;
+ let blobs = &blob_data[..frame_ref.blob_length as usize];
+ let blob_data: VecOfBytes = decode(blobs)
+ .map_err(|e| EigenDAProviderError::RLPDecodeError(e.to_string()))?;
+ for blob in blob_data.0 {
+ out.push(Bytes::from(blob));
+ }
+ }
+ }
+ }
+ }
+ }
+ Ok((out, hashes))
+ }
+
+ async fn load_blobs(&mut self, block_ref: &BlockInfo) -> Result<(), EigenDAProviderError> {
+ if self.open {
+ return Ok(());
+ }
+ let info = self
+ .chain_provider
+ .block_info_and_transactions_by_hash(block_ref.hash)
+ .await
+ .map_err(|e| EigenDAProviderError::Backend(e.to_string()))?;
+ let (mut blob_data, blob_hashes) = self.data_from_eigen_da(info.1).await?;
+ info!(target: "eigen_da", "loading eigen blobs blob hashes len {}, blob data len {}", blob_hashes.len(), blob_data.len());
+ if blob_hashes.len() > 0 {
+ let blobs =
+ self.blob_provider.get_blobs(block_ref, &blob_hashes).await.map_err(|e| {
+ warn!(target: "eigen-da-source", "Failed to fetch blobs: {e}");
+ EigenDAProviderError::Backend(
+ BlobProviderError::Backend(e.to_string()).to_string(),
+ )
+ })?;
+ let mut whole_blob_data = Vec::new();
+
+ let mut blob_index: usize = 0;
+ for _ in blob_hashes {
+ let mut blob = BlobData::default();
+ match blob.fill(&blobs, blob_index ) {
+ Ok(should_increment) => {
+ if should_increment {
+ blob_index += 1;
+ }
+ }
+ Err(e) => {
+ return Err(EigenDAProviderError::Backend(e.to_string()));
+ }
+ }
+ match blob.decode() {
+ Ok(d) => whole_blob_data.append(&mut d.to_vec()),
+ Err(_) => {
+ warn!(target: "blob-source", "Failed to decode blob data, skipping");
+ }
+ }
+ }
+ info!("whole blob data size {}", whole_blob_data.len());
+
+ let rlp_blob: VecOfBytes = decode(&whole_blob_data)
+ .map_err(|e| EigenDAProviderError::RLPDecodeError(e.to_string()))?;
+
+ info!("rlp blob data len {}", rlp_blob.0.len());
+
+ for blob in rlp_blob.0 {
+ info!("rlp decode blob vec size {}", blob.len());
+ blob_data.push(Bytes::from(blob));
+ }
+ }
+ self.open = true;
+ info!(target: "eigen_da", "loaded eigen blobs blob data len {}", blob_data.len());
+ self.data = blob_data;
+ Ok(())
+ }
+
+ /// Extracts the next data from the source.
+ fn next_data(&mut self) -> Result> {
+ if self.data.is_empty() {
+ return Err(Err(PipelineError::Eof.temp()));
+ }
+
+ Ok(self.data.remove(0))
+ }
+}
+
+#[async_trait]
+impl DataAvailabilityProvider for EigenDaSource
+where
+ F: ChainProvider + Send,
+ B: BlobProvider + Send,
+ E: EigenDAProvider + Send,
+{
+ type Item = Bytes;
+
+ async fn next(&mut self, block_ref: &BlockInfo) -> PipelineResult {
+ let result = self.load_blobs(block_ref).await;
+ match result {
+ Ok(_) => (),
+
+ Err(e) => {
+ return Err(PipelineError::Provider(format!(
+ "Failed to load eigen_da blobs from stream: {}, err: {}",
+ block_ref.hash,
+ e.to_string()
+ ))
+ .temp());
+ }
+ }
+
+ let next_data = match self.next_data() {
+ Ok(d) => d,
+ Err(e) => return e,
+ };
+ //TODO EigenDA decode
+
+ Ok(next_data)
+ }
+
+ fn clear(&mut self) {
+ self.data.clear();
+ self.open = false;
+ }
+}
+
+#[cfg(test)]
+pub(crate) mod tests {
+ use super::*;
+ use crate::test_utils::TestEigenDaProvider;
+ use alloc::vec;
+ use alloy_primitives::keccak256;
+ use alloy_rlp::Decodable;
+
+ #[tokio::test]
+ async fn test_calldata_frame_decode() {
+ let txs = valid_eigen_da_txs();
+ let mut eigen_da_provider = TestEigenDaProvider::default();
+ for tx in txs {
+ let (tx_kind, calldata, blob_hashes) = match &tx {
+ TxEnvelope::Legacy(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip2930(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip1559(tx) => (tx.tx().to(), tx.tx().input.clone(), None),
+ TxEnvelope::Eip4844(blob_tx_wrapper) => match blob_tx_wrapper.tx() {
+ TxEip4844Variant::TxEip4844(tx) => {
+ (tx.to(), tx.input.clone(), Some(tx.blob_versioned_hashes.clone()))
+ }
+ TxEip4844Variant::TxEip4844WithSidecar(tx) => {
+ let tx = tx.tx();
+ (tx.to(), tx.input.clone(), Some(tx.blob_versioned_hashes.clone()))
+ }
+ },
+ _ => continue,
+ };
+ assert_eq!(calldata[0], DERIVATION_VERSION_EIGEN_DA);
+
+ let blob_data = calldata.slice(1..);
+ let calldata_frame: CalldataFrame = CalldataFrame::decode(blob_data).unwrap();
+ if let Some(value) = calldata_frame.value {
+ match value {
+ calldata_frame::Value::Frame(frame) => {}
+ calldata_frame::Value::FrameRef(frame_ref) => {
+ if frame_ref.quorum_ids.len() == 0 {
+ warn!(target: "eigen-da-source", "decoded frame ref contains no quorum IDs");
+ continue;
+ }
+ let commitment = hex::encode(frame_ref.commitment.as_slice()).to_string();
+
+ assert_eq!(commitment, "010000f901d8f852f842a00dbbd22149b419a9a751c25065b58745f4216dc3ae4e9ad583306c395387b6a3a02673dfa25dd3095246eeffb639d3e11108a1ba75dd29b86c3a4200ed00210e4e820200cac480213701c401213710f90181830148ae81a5f873eba0c42bcd27bcd22ba55c4189a25d362343838cb75f57979baa0686ec5381a944c3820001826362832a79cba07263089b84cbb2963e4f50a930243c081ab14b01c0c92d57c3029590bd9dfc9200832a7a20a05419bc29ac025512311c14f23d9613e408448e47bb31f71614e1f82b6c63966cb9010074b13a3acaba35d3749063c19806c9a2f2004b318d55edd6cb5129d958807ea7ac09584a2c6ea029ed34c72f849862e4189928e90931e07093209016f5fc70a6c4a8c3237c25c4f236bb25c105fd7dbd6e4a00153c69c0757d8cbf02f966167ccae243412c20de1c3a38a50818dc7f9f3e02dcb3bc4e54800f2224b8c1eaa9955e41792fa0e401f2814ee209331126149c630c34e1b8e2f804955582022676e232d24d7784b496fc997d98db2849b1bfa8443b362723fc603da8de11704a1ef50414e11234496cfac67aebdd2faa24840ffe7f04506652b8a11a534b024a40bc7e99fee042336f425eb16e40e4267593415860204c9069723dbaca8cf2e596dc820001".to_string());
+ let blob_data = eigen_da_provider
+ .retrieve_blob_with_commitment(
+ &frame_ref.commitment,
+ frame_ref.blob_length,
+ )
+ .await
+ .map_err(|e| EigenDAProviderError::Status(e.to_string()))
+ .unwrap();
+ let blobs = &blob_data[..frame_ref.blob_length as usize];
+ let blob_data: VecOfBytes = decode(blobs)
+ .map_err(|e| EigenDAProviderError::RLPDecodeError(e.to_string()))
+ .unwrap();
+ }
+ }
+ }
+ }
+ }
+
+ pub(crate) fn valid_eigen_da_txs() -> Vec {
+ // https://sepolia.etherscan.io/getRawTx?tx=0xfd10d26ace7eec30487bdad54ef5348dfdff48061129cf6e2adf6182a950d5a9
+ let raw_tx =
+ alloy_primitives::hex::decode("0x02f9026483aa36a7830107f1830f424085083f58abbe8271f49454da4d1124b2310757562b8ee9cea69b25bb46a180b901f2ed12ee0318cbf3a9012202000128a15baa06de03010000f901d8f852f842a00dbbd22149b419a9a751c25065b58745f4216dc3ae4e9ad583306c395387b6a3a02673dfa25dd3095246eeffb639d3e11108a1ba75dd29b86c3a4200ed00210e4e820200cac480213701c401213710f90181830148ae81a5f873eba0c42bcd27bcd22ba55c4189a25d362343838cb75f57979baa0686ec5381a944c3820001826362832a79cba07263089b84cbb2963e4f50a930243c081ab14b01c0c92d57c3029590bd9dfc9200832a7a20a05419bc29ac025512311c14f23d9613e408448e47bb31f71614e1f82b6c63966cb9010074b13a3acaba35d3749063c19806c9a2f2004b318d55edd6cb5129d958807ea7ac09584a2c6ea029ed34c72f849862e4189928e90931e07093209016f5fc70a6c4a8c3237c25c4f236bb25c105fd7dbd6e4a00153c69c0757d8cbf02f966167ccae243412c20de1c3a38a50818dc7f9f3e02dcb3bc4e54800f2224b8c1eaa9955e41792fa0e401f2814ee209331126149c630c34e1b8e2f804955582022676e232d24d7784b496fc997d98db2849b1bfa8443b362723fc603da8de11704a1ef50414e11234496cfac67aebdd2faa24840ffe7f04506652b8a11a534b024a40bc7e99fee042336f425eb16e40e4267593415860204c9069723dbaca8cf2e596dc820001c001a0f421ccc336435722bdf41ef041a278b0851790dae1946be7033c2e057ffede46a027493ede5c5e490f14fc2b06cc444433b3f2d6e1079451d519311c1f4ab8f4b0").unwrap();
+ let eoa = TxEnvelope::decode(&mut raw_tx.as_slice()).unwrap();
+ vec![eoa]
+ }
+}
diff --git a/crates/derive/src/sources/ethereum.rs b/crates/derive/src/sources/ethereum.rs
index 22e01bcd5b..d72ed4b6b3 100644
--- a/crates/derive/src/sources/ethereum.rs
+++ b/crates/derive/src/sources/ethereum.rs
@@ -1,85 +1,94 @@
//! Contains the [EthereumDataSource], which is a concrete implementation of the
//! [DataAvailabilityProvider] trait for the Ethereum protocol.
+use crate::sources::eigen_da::EigenDaSource;
use crate::{
sources::{BlobSource, CalldataSource},
- traits::{BlobProvider, ChainProvider, DataAvailabilityProvider},
+ traits::{BlobProvider, ChainProvider, DataAvailabilityProvider, EigenDAProvider},
types::PipelineResult,
};
use alloc::{boxed::Box, fmt::Debug};
-use alloy_primitives::Bytes;
+use alloy_primitives::{Address, Bytes};
use async_trait::async_trait;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::BlockInfo;
/// A factory for creating an Ethereum data source provider.
#[derive(Debug, Clone)]
-pub struct EthereumDataSource
+pub struct EthereumDataSource
where
C: ChainProvider + Send + Clone,
B: BlobProvider + Send + Clone,
+ E: EigenDAProvider + Send + Clone,
{
- /// The ecotone timestamp.
- pub ecotone_timestamp: Option,
- /// The blob source.
- pub blob_source: BlobSource,
/// The calldata source.
pub calldata_source: CalldataSource,
+ /// The eigen da source.
+ pub eigen_da_source: EigenDaSource,
+ /// Mantle da switch
+ pub mantle_da_switch: bool,
}
-impl EthereumDataSource
+impl EthereumDataSource
where
C: ChainProvider + Send + Clone + Debug,
B: BlobProvider + Send + Clone + Debug,
+ E: EigenDAProvider + Send + Clone + Debug,
{
/// Instantiates a new [EthereumDataSource].
pub const fn new(
- blob_source: BlobSource,
calldata_source: CalldataSource,
+ eigen_da_source: EigenDaSource,
cfg: &RollupConfig,
) -> Self {
- Self { ecotone_timestamp: cfg.ecotone_time, blob_source, calldata_source }
+ Self { calldata_source, eigen_da_source, mantle_da_switch: cfg.mantle_da_switch }
}
- /// Instantiates a new [EthereumDataSource] from parts.
- pub fn new_from_parts(provider: C, blobs: B, cfg: &RollupConfig) -> Self {
+ /// Creates a new factory.
+ pub fn new_from_parts(provider: C, blobs: B, eigen_da_provider: E, cfg: &RollupConfig) -> Self {
let signer =
cfg.genesis.system_config.as_ref().map(|sc| sc.batcher_address).unwrap_or_default();
Self {
- ecotone_timestamp: cfg.ecotone_time,
- blob_source: BlobSource::new(provider.clone(), blobs, cfg.batch_inbox_address, signer),
- calldata_source: CalldataSource::new(provider, cfg.batch_inbox_address, signer),
+ calldata_source: CalldataSource::new(provider.clone(), cfg.batch_inbox_address, signer),
+ eigen_da_source: EigenDaSource::new(
+ provider,
+ blobs,
+ eigen_da_provider,
+ cfg.batch_inbox_address,
+ signer,
+ ),
+ mantle_da_switch: cfg.mantle_da_switch,
}
}
}
#[async_trait]
-impl DataAvailabilityProvider for EthereumDataSource
+impl DataAvailabilityProvider for EthereumDataSource
where
C: ChainProvider + Send + Sync + Clone + Debug,
B: BlobProvider + Send + Sync + Clone + Debug,
+ E: EigenDAProvider + Send + Sync + Clone + Debug,
{
type Item = Bytes;
async fn next(&mut self, block_ref: &BlockInfo) -> PipelineResult {
- let ecotone_enabled =
- self.ecotone_timestamp.map(|e| block_ref.timestamp >= e).unwrap_or(false);
- if ecotone_enabled {
- self.blob_source.next(block_ref).await
+ if self.mantle_da_switch {
+ self.eigen_da_source.next(block_ref).await
} else {
self.calldata_source.next(block_ref).await
}
}
fn clear(&mut self) {
- self.blob_source.clear();
self.calldata_source.clear();
+ self.eigen_da_source.clear();
}
}
#[cfg(test)]
mod tests {
use super::*;
+ use crate::test_utils::TestEigenDaProvider;
use crate::{
sources::BlobData,
test_utils::{TestBlobProvider, TestChainProvider},
@@ -103,36 +112,22 @@ mod tests {
let chain = TestChainProvider::default();
let blob = TestBlobProvider::default();
let cfg = RollupConfig::default();
+ let eigen_da = TestEigenDaProvider::default();
let mut calldata = CalldataSource::new(chain.clone(), Address::ZERO, Address::ZERO);
calldata.calldata.insert(0, Default::default());
calldata.open = true;
- let mut blob = BlobSource::new(chain, blob, Address::ZERO, Address::ZERO);
- blob.data = vec![Default::default()];
- blob.open = true;
- let mut data_source = EthereumDataSource::new(blob, calldata, &cfg);
+ let mut eigen = EigenDaSource::new(chain, blob, eigen_da, Address::ZERO, Address::ZERO);
+ eigen.data = vec![Default::default()];
+ eigen.open = true;
+ let mut data_source = EthereumDataSource::new(calldata, eigen, &cfg);
data_source.clear();
- assert!(data_source.blob_source.data.is_empty());
- assert!(!data_source.blob_source.open);
+ assert!(data_source.eigen_da_source.data.is_empty());
+ assert!(!data_source.eigen_da_source.open);
assert!(data_source.calldata_source.calldata.is_empty());
assert!(!data_source.calldata_source.open);
}
- #[tokio::test]
- async fn test_open_blob_source() {
- let chain = TestChainProvider::default();
- let mut blob = default_test_blob_source();
- blob.open = true;
- blob.data.push(BlobData { data: None, calldata: Some(Bytes::default()) });
- let calldata = CalldataSource::new(chain.clone(), Address::ZERO, Address::ZERO);
- let cfg = RollupConfig { ecotone_time: Some(0), ..Default::default() };
-
- // Should successfully retrieve a blob batch from the block
- let mut data_source = EthereumDataSource::new(blob, calldata, &cfg);
- let data = data_source.next(&BlockInfo::default()).await.unwrap();
- assert_eq!(data, Bytes::default());
- }
-
#[tokio::test]
async fn test_open_ethereum_calldata_source_pre_ecotone() {
let mut chain = TestChainProvider::default();
diff --git a/crates/derive/src/sources/mod.rs b/crates/derive/src/sources/mod.rs
index e0c9772d3e..377111a802 100644
--- a/crates/derive/src/sources/mod.rs
+++ b/crates/derive/src/sources/mod.rs
@@ -18,3 +18,7 @@ pub use blobs::BlobSource;
mod calldata;
pub use calldata::CalldataSource;
+
+mod eigen_da;
+
+pub use eigen_da::EigenDaSource;
diff --git a/crates/derive/src/sources/variant.rs b/crates/derive/src/sources/variant.rs
deleted file mode 100644
index 44588e39c7..0000000000
--- a/crates/derive/src/sources/variant.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-//! Data source
-
-use crate::{
- sources::{BlobSource, CalldataSource},
- traits::{AsyncIterator, BlobProvider, ChainProvider},
- types::PipelineResult,
-};
-use alloc::boxed::Box;
-use alloy_primitives::Bytes;
-use async_trait::async_trait;
-
-/// An enum over the various data sources.
-#[derive(Debug, Clone)]
-pub enum EthereumDataSourceVariant
-where
- CP: ChainProvider + Send,
- B: BlobProvider + Send,
-{
- /// A calldata source.
- Calldata(CalldataSource),
- /// A blob source.
- Blob(BlobSource),
-}
-
-#[async_trait]
-impl AsyncIterator for EthereumDataSourceVariant
-where
- CP: ChainProvider + Send,
- B: BlobProvider + Send,
-{
- type Item = Bytes;
-
- async fn next(&mut self) -> PipelineResult {
- match self {
- Self::Calldata(c) => c.next().await,
- Self::Blob(b) => b.next().await,
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::test_utils::TestChainProvider;
- use op_alloy_protocol::BlockInfo;
-
- use crate::{
- sources::{BlobData, EthereumDataSourceVariant},
- test_utils::TestBlobProvider,
- };
-
- #[tokio::test]
- async fn test_variant_next_calldata() {
- let chain = TestChainProvider::default();
- let block_ref = BlockInfo::default();
- let mut source =
- CalldataSource::new(chain, Default::default(), block_ref, Default::default());
- source.open = true;
- source.calldata.push_back(Default::default());
- let mut variant: EthereumDataSourceVariant =
- EthereumDataSourceVariant::Calldata(source);
- assert!(variant.next().await.is_ok());
- }
-
- #[tokio::test]
- async fn test_variant_next_blob() {
- let chain = TestChainProvider::default();
- let blob = TestBlobProvider::default();
- let block_ref = BlockInfo::default();
- let mut source =
- BlobSource::new(chain, blob, Default::default(), block_ref, Default::default());
- source.open = true;
- source.data.push(BlobData { calldata: Some(Default::default()), ..Default::default() });
- let mut variant: EthereumDataSourceVariant =
- EthereumDataSourceVariant::Blob(source);
- assert!(variant.next().await.is_ok());
- }
-}
diff --git a/crates/derive/src/stages/attributes_queue.rs b/crates/derive/src/stages/attributes_queue.rs
index d872ea6a1c..ab7bac176c 100644
--- a/crates/derive/src/stages/attributes_queue.rs
+++ b/crates/derive/src/stages/attributes_queue.rs
@@ -12,7 +12,8 @@ use alloc::{boxed::Box, sync::Arc};
use async_trait::async_trait;
use core::fmt::Debug;
use op_alloy_genesis::RollupConfig;
-use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
+use op_alloy_protocol::SingleBatch;
+use op_alloy_protocol::{BlockInfo, L2BlockInfo};
use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes};
/// [AttributesQueue] accepts batches from the [BatchQueue] stage
@@ -38,8 +39,6 @@ where
cfg: Arc,
/// The previous stage of the derivation pipeline.
prev: P,
- /// Whether the current batch is the last in its span.
- is_last_in_span: bool,
/// The current batch being processed.
batch: Option,
/// The attributes builder.
@@ -53,7 +52,7 @@ where
{
/// Create a new [AttributesQueue] stage.
pub const fn new(cfg: Arc, prev: P, builder: AB) -> Self {
- Self { cfg, prev, is_last_in_span: false, batch: None, builder }
+ Self { cfg, prev, batch: None, builder }
}
/// Loads a [SingleBatch] from the [AttributesProvider] if needed.
@@ -61,7 +60,6 @@ where
if self.batch.is_none() {
let batch = self.prev.next_batch(parent).await?;
self.batch = Some(batch);
- self.is_last_in_span = self.prev.is_last_in_span();
}
self.batch.as_ref().cloned().ok_or(PipelineError::Eof.temp())
}
@@ -85,12 +83,10 @@ where
return Err(e);
}
};
- let populated_attributes =
- OpAttributesWithParent { attributes, parent, is_last_in_span: self.is_last_in_span };
+ let populated_attributes = OpAttributesWithParent { attributes, parent };
// Clear out the local state once payload attributes are prepared.
self.batch = None;
- self.is_last_in_span = false;
Ok(populated_attributes)
}
@@ -181,7 +177,6 @@ where
s @ Signal::Reset(_) | s @ Signal::Activation(_) => {
self.prev.signal(s).await?;
self.batch = None;
- self.is_last_in_span = false;
}
s @ Signal::FlushChannel => {
self.batch = None;
@@ -212,13 +207,11 @@ mod tests {
prev_randao: B256::default(),
withdrawals: None,
parent_beacon_block_root: None,
- target_blobs_per_block: None,
- max_blobs_per_block: None,
},
no_tx_pool: Some(false),
transactions: None,
gas_limit: None,
- eip_1559_params: None,
+ base_fee: None,
}
}
@@ -270,7 +263,6 @@ mod tests {
let parent = L2BlockInfo::default();
let result = attributes_queue.load_batch(parent).await.unwrap();
assert_eq!(result, Default::default());
- assert!(attributes_queue.is_last_in_span);
}
#[tokio::test]
@@ -374,19 +366,14 @@ mod tests {
// If we load the batch, we should get the last in span.
// But it won't take it so it will be available in the next_attributes call.
let _ = aq.load_batch(L2BlockInfo::default()).await.unwrap();
- assert!(aq.is_last_in_span);
assert!(aq.batch.is_some());
// This should successfully construct the next payload attributes.
// It should also reset the last in span flag and clear the batch.
let attributes = aq.next_attributes(L2BlockInfo::default()).await.unwrap();
pa.no_tx_pool = Some(true);
- let populated_attributes = OpAttributesWithParent {
- attributes: pa,
- parent: L2BlockInfo::default(),
- is_last_in_span: true,
- };
+ let populated_attributes =
+ OpAttributesWithParent { attributes: pa, parent: L2BlockInfo::default() };
assert_eq!(attributes, populated_attributes);
- assert!(!aq.is_last_in_span);
assert!(aq.batch.is_none());
}
}
diff --git a/crates/derive/src/stages/batch/batch_provider.rs b/crates/derive/src/stages/batch/batch_provider.rs
index df153a9f3f..b851a07006 100644
--- a/crates/derive/src/stages/batch/batch_provider.rs
+++ b/crates/derive/src/stages/batch/batch_provider.rs
@@ -3,7 +3,7 @@
use super::NextBatchProvider;
use crate::{
errors::PipelineError,
- stages::{BatchQueue, BatchValidator},
+ stages::BatchQueue,
traits::{AttributesProvider, L2ChainProvider, OriginAdvancer, OriginProvider, SignalReceiver},
types::{PipelineResult, Signal},
};
@@ -22,15 +22,12 @@ use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
/// When transitioning between the two stages, the mux will reset the active stage, but
/// retain `l1_blocks`.
#[derive(Debug)]
-pub struct BatchProvider
+pub struct BatchProvider
where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
- F: L2ChainProvider + Clone + Debug,
{
/// The rollup configuration.
cfg: Arc,
- /// The L2 chain provider.
- provider: F,
/// The previous stage of the derivation pipeline.
///
/// If this is set to [None], the multiplexer has been activated and the active stage
@@ -41,68 +38,38 @@ where
/// The batch queue stage of the provider.
///
/// Must be [None] if `prev` or `batch_validator` is [Some].
- batch_queue: Option>,
- /// The batch validator stage of the provider.
- ///
- /// Must be [None] if `prev` or `batch_queue` is [Some].
- batch_validator: Option>,
+ batch_queue: Option>,
}
-impl BatchProvider
+impl
BatchProvider
where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
- F: L2ChainProvider + Clone + Debug,
{
/// Creates a new [BatchProvider] with the given configuration and previous stage.
- pub const fn new(cfg: Arc, prev: P, provider: F) -> Self {
- Self { cfg, provider, prev: Some(prev), batch_queue: None, batch_validator: None }
+ pub const fn new(cfg: Arc