From 605613fe6839735bdfad3e8356b199ad1b681179 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 10 Dec 2025 16:44:32 +0100 Subject: [PATCH 1/8] Impl ValueWithSubKey for VersionedValue --- crates/optimism/trie/src/db/models/version.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/optimism/trie/src/db/models/version.rs b/crates/optimism/trie/src/db/models/version.rs index 2387d7ca600..49917099582 100644 --- a/crates/optimism/trie/src/db/models/version.rs +++ b/crates/optimism/trie/src/db/models/version.rs @@ -3,6 +3,7 @@ use reth_db::{ table::{Compress, Decompress}, DatabaseError, }; +use reth_primitives_traits::ValueWithSubKey; use serde::{Deserialize, Serialize}; /// Wrapper type for `Option` that implements [`Compress`] and [`Decompress`] @@ -108,6 +109,14 @@ impl Decompress for VersionedValue { } } +impl ValueWithSubKey for VersionedValue { + type SubKey = u64; + + fn get_subkey(&self) -> Self::SubKey { + self.block_number + } +} + #[cfg(test)] mod tests { use super::*; From 707d02286418dd1d20ed63c6319e22b9eb2c0352 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Wed, 10 Dec 2025 17:31:22 +0100 Subject: [PATCH 2/8] Revert changes to runners --- .github/actionlint.yaml | 7 ------- .github/workflows/bench.yml | 2 +- .github/workflows/book.yml | 2 +- .github/workflows/compact.yml | 2 +- .github/workflows/e2e.yml | 2 +- .github/workflows/hive.yml | 6 +++--- .github/workflows/integration.yml | 2 +- .github/workflows/kurtosis-op.yml | 4 ++-- .github/workflows/kurtosis.yml | 4 ++-- .github/workflows/lint.yml | 24 ++++++++++++------------ .github/workflows/prepare-reth.yml | 2 +- .github/workflows/stage.yml | 2 +- .github/workflows/sync-era.yml | 2 +- .github/workflows/sync.yml | 2 +- .github/workflows/unit.yml | 6 +++--- .github/workflows/windows.yml | 4 ++-- 16 files changed, 33 insertions(+), 40 deletions(-) delete mode 100644 .github/actionlint.yaml diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml deleted file mode 100644 index 7b484ec96b9..00000000000 --- a/.github/actionlint.yaml +++ /dev/null @@ -1,7 +0,0 @@ -self-hosted-runner: - labels: - - depot-ubuntu-latest - - depot-ubuntu-latest-2 - - depot-ubuntu-latest-4 - - depot-ubuntu-latest-8 - - depot-ubuntu-latest-16 diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index fcb4f5fe249..f9c02f97b50 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -15,7 +15,7 @@ env: name: bench jobs: codspeed: - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 3fbf89560a1..37c3f6b5eb7 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 90 steps: - name: Checkout diff --git a/.github/workflows/compact.yml b/.github/workflows/compact.yml index 4f56238e78d..d6e1a84b419 100644 --- a/.github/workflows/compact.yml +++ b/.github/workflows/compact.yml @@ -17,7 +17,7 @@ env: name: compact-codec jobs: compact-codec: - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest strategy: matrix: bin: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 583b9d71d90..25a528508e4 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,7 +19,7 @@ concurrency: jobs: test: name: e2e-testsuite - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 timeout-minutes: 90 diff --git a/.github/workflows/hive.yml b/.github/workflows/hive.yml index 2ecc012974e..85e616ec0a5 100644 --- a/.github/workflows/hive.yml +++ b/.github/workflows/hive.yml @@ -24,7 +24,7 @@ jobs: prepare-hive: if: github.repository == 'op-rs/op-reth' timeout-minutes: 45 - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Checkout hive tests @@ -178,7 +178,7 @@ jobs: - prepare-reth - prepare-hive name: run ${{ matrix.scenario.sim }}${{ matrix.scenario.limit && format(' - {0}', matrix.scenario.limit) }} - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest permissions: issues: write steps: @@ -245,7 +245,7 @@ jobs: notify-on-error: needs: test if: failure() - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest steps: - name: Slack Webhook Action uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 2657cad93b7..1f39eaefdf3 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,7 +24,7 @@ jobs: test: name: test / ${{ matrix.network }} if: github.event_name != 'schedule' - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 strategy: diff --git a/.github/workflows/kurtosis-op.yml b/.github/workflows/kurtosis-op.yml index 5172d2976c6..1ac8d687a1f 100644 --- a/.github/workflows/kurtosis-op.yml +++ b/.github/workflows/kurtosis-op.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false name: run kurtosis - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest needs: - prepare-reth steps: @@ -85,7 +85,7 @@ jobs: notify-on-error: needs: test if: failure() - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest steps: - name: Slack Webhook Action uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/kurtosis.yml b/.github/workflows/kurtosis.yml index 28a7328dc99..6eb85bdc20d 100644 --- a/.github/workflows/kurtosis.yml +++ b/.github/workflows/kurtosis.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false name: run kurtosis - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest needs: - prepare-reth steps: @@ -58,7 +58,7 @@ jobs: notify-on-error: needs: test if: failure() - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest steps: - name: Slack Webhook Action uses: rtCamp/action-slack-notify@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 89e3b2fba54..0c4495d91e7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ env: jobs: clippy-binaries: name: clippy binaries / ${{ matrix.type }} - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 30 strategy: matrix: @@ -42,7 +42,7 @@ jobs: clippy: name: clippy - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -59,7 +59,7 @@ jobs: RUSTFLAGS: -D warnings wasm: - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -79,7 +79,7 @@ jobs: .github/assets/check_wasm.sh riscv: - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v6 @@ -98,7 +98,7 @@ jobs: crate-checks: name: crate-checks (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest strategy: matrix: partition: [1, 2, 3] @@ -117,7 +117,7 @@ jobs: msrv: name: MSRV - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 30 strategy: matrix: @@ -140,7 +140,7 @@ jobs: docs: name: docs - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -158,7 +158,7 @@ jobs: fmt: name: fmt - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -172,7 +172,7 @@ jobs: udeps: name: udeps - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -187,7 +187,7 @@ jobs: book: name: book - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v6 @@ -246,7 +246,7 @@ jobs: # Checks that selected crates can compile with power set of features features: name: features (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest strategy: matrix: partition: [1, 2] @@ -274,7 +274,7 @@ jobs: # Check crates correctly propagate features feature-propagation: - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/prepare-reth.yml b/.github/workflows/prepare-reth.yml index 5fc8261b2c9..86a7805abc6 100644 --- a/.github/workflows/prepare-reth.yml +++ b/.github/workflows/prepare-reth.yml @@ -26,7 +26,7 @@ jobs: prepare-reth: if: github.repository == 'op-rs/op-reth' timeout-minutes: 45 - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - run: mkdir artifacts diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index 061f48fbe2f..4ec6bfffc4e 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -23,7 +23,7 @@ jobs: name: stage-run-test # Only run stage commands test in merge groups if: github.event_name == 'merge_group' - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 diff --git a/.github/workflows/sync-era.yml b/.github/workflows/sync-era.yml index 97d93c25b71..471a42371b0 100644 --- a/.github/workflows/sync-era.yml +++ b/.github/workflows/sync-era.yml @@ -17,7 +17,7 @@ concurrency: jobs: sync: name: sync (${{ matrix.chain.bin }}) - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 89367ec6f2d..2891d6a5373 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -17,7 +17,7 @@ concurrency: jobs: sync: name: sync (${{ matrix.chain.bin }}) - runs-on: depot-ubuntu-latest + runs-on: ubuntu-latest env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 072fe1167e7..7940532736d 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -20,7 +20,7 @@ concurrency: jobs: test: name: test / ${{ matrix.type }} (${{ matrix.partition }}/${{ matrix.total_partitions }}) - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 strategy: @@ -66,7 +66,7 @@ jobs: state: name: Ethereum state tests - runs-on: depot-ubuntu-latest-4 + runs-on: ubuntu-latest env: RUST_LOG: info,sync=error RUST_BACKTRACE: 1 @@ -101,7 +101,7 @@ jobs: doc: name: doc tests - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest env: RUST_BACKTRACE: 1 timeout-minutes: 30 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ee9064ba659..d5946c088f5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,7 +14,7 @@ env: jobs: check-reth: - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 60 steps: @@ -34,7 +34,7 @@ jobs: run: cargo check --target x86_64-pc-windows-gnu check-op-reth: - runs-on: depot-ubuntu-latest-16 + runs-on: ubuntu-latest timeout-minutes: 60 steps: From f3e5a9bd0e738dab6b86e04ecf5d486a3bea1ee8 Mon Sep 17 00:00:00 2001 From: Arun Dhyani Date: Thu, 11 Dec 2025 15:12:05 +0530 Subject: [PATCH 3/8] chore: add prune e2e back --- .../optimism/tests/proofs/prune/init_test.go | 14 ++++ .../optimism/tests/proofs/prune/prune_test.go | 64 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 crates/optimism/tests/proofs/prune/init_test.go create mode 100644 crates/optimism/tests/proofs/prune/prune_test.go diff --git a/crates/optimism/tests/proofs/prune/init_test.go b/crates/optimism/tests/proofs/prune/init_test.go new file mode 100644 index 00000000000..bd9082e259d --- /dev/null +++ b/crates/optimism/tests/proofs/prune/init_test.go @@ -0,0 +1,14 @@ +package prune + +import ( + "testing" + + "github.com/ethereum-optimism/optimism/op-devstack/presets" + "github.com/op-rs/op-geth/proofs/utils" +) + +// TestMain creates the test-setups against the shared backend +func TestMain(m *testing.M) { + // Other setups may be added here, hydrated from the same orchestrator + presets.DoMain(m, utils.WithMixedOpProofPreset()) +} diff --git a/crates/optimism/tests/proofs/prune/prune_test.go b/crates/optimism/tests/proofs/prune/prune_test.go new file mode 100644 index 00000000000..88d4975189f --- /dev/null +++ b/crates/optimism/tests/proofs/prune/prune_test.go @@ -0,0 +1,64 @@ +package prune + +import ( + "testing" + "time" + + "github.com/ethereum-optimism/optimism/op-devstack/devtest" + "github.com/ethereum-optimism/optimism/op-service/apis" + "github.com/op-rs/op-geth/proofs/utils" + "github.com/stretchr/testify/require" +) + +func TestPruneProofStorage(gt *testing.T) { + t := devtest.SerialT(gt) + sys := utils.NewMixedOpProofPreset(t) + + var proofWindow = uint64(200) // Defined in the devnet yaml + var pruneDetectTimeout = time.Minute * 5 // An expected time within the prune should be detected. + opRethELNode := sys.RethL2ELNode() + + syncStatus := getProofSyncStatus(t, opRethELNode.Escape().EthClient()) + t.Log("Initial sync status:", syncStatus) + distance := syncStatus.Latest - syncStatus.Earliest + + if distance < proofWindow { + // Wait till we reach proof window + t.Logf("Waiting for block %d", syncStatus.Earliest+proofWindow) + opRethELNode.WaitForBlockNumber(syncStatus.Earliest + proofWindow) + } + // Now we need to wait for pruner to execute pruning can be done anytime in 1 minutes(pruner prune interval = 1min) + startTime := time.Now() + var newSyncStatus proofSyncStatus + for { + // Get sync status each Second + if time.Since(startTime) > pruneDetectTimeout { + t.Error("Pruner did not prune proof storage within the interval") + } + newSyncStatus = getProofSyncStatus(t, opRethELNode.Escape().EthClient()) + if syncStatus.Earliest != newSyncStatus.Earliest { + break + } + t.Log("Waiting on earliest state to be changed: ", syncStatus.Earliest) + time.Sleep(time.Second * 5) + } + // Check how many has been pruned - we should have current proof window intake + currentProofWindow := newSyncStatus.Latest - newSyncStatus.Earliest + t.Log("Sync status:", syncStatus) + require.GreaterOrEqual(t, currentProofWindow, proofWindow, "Pruner has changed the proof window") + t.Logf("Successfully pruned proof storage. synce status: %v", syncStatus) +} + +type proofSyncStatus struct { + Earliest uint64 `json:"earliest"` + Latest uint64 `json:"latest"` +} + +func getProofSyncStatus(t devtest.T, client apis.EthClient) proofSyncStatus { + var result proofSyncStatus + err := client.RPC().CallContext(t.Ctx(), &result, "debug_proofsSyncStatus") + if err != nil { + t.Error(err) + } + return result +} From fc1c8bd99a4d720c8873af9863cbac42079e6cdd Mon Sep 17 00:00:00 2001 From: Arun Dhyani Date: Thu, 11 Dec 2025 15:17:08 +0530 Subject: [PATCH 4/8] fix code --- crates/optimism/tests/proofs/prune/init_test.go | 3 +-- crates/optimism/tests/proofs/prune/prune_test.go | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/optimism/tests/proofs/prune/init_test.go b/crates/optimism/tests/proofs/prune/init_test.go index bd9082e259d..7581ceb775b 100644 --- a/crates/optimism/tests/proofs/prune/init_test.go +++ b/crates/optimism/tests/proofs/prune/init_test.go @@ -4,11 +4,10 @@ import ( "testing" "github.com/ethereum-optimism/optimism/op-devstack/presets" - "github.com/op-rs/op-geth/proofs/utils" ) // TestMain creates the test-setups against the shared backend func TestMain(m *testing.M) { // Other setups may be added here, hydrated from the same orchestrator - presets.DoMain(m, utils.WithMixedOpProofPreset()) + presets.DoMain(m, presets.WithSingleChainMultiNode()) } diff --git a/crates/optimism/tests/proofs/prune/prune_test.go b/crates/optimism/tests/proofs/prune/prune_test.go index 88d4975189f..a3bf886c37b 100644 --- a/crates/optimism/tests/proofs/prune/prune_test.go +++ b/crates/optimism/tests/proofs/prune/prune_test.go @@ -5,6 +5,7 @@ import ( "time" "github.com/ethereum-optimism/optimism/op-devstack/devtest" + "github.com/ethereum-optimism/optimism/op-devstack/presets" "github.com/ethereum-optimism/optimism/op-service/apis" "github.com/op-rs/op-geth/proofs/utils" "github.com/stretchr/testify/require" @@ -12,11 +13,11 @@ import ( func TestPruneProofStorage(gt *testing.T) { t := devtest.SerialT(gt) - sys := utils.NewMixedOpProofPreset(t) + sys := presets.NewSingleChainMultiNode(t) var proofWindow = uint64(200) // Defined in the devnet yaml var pruneDetectTimeout = time.Minute * 5 // An expected time within the prune should be detected. - opRethELNode := sys.RethL2ELNode() + opRethELNode, _ := utils.IdentifyELNodes(sys.L2EL, sys.L2ELB) syncStatus := getProofSyncStatus(t, opRethELNode.Escape().EthClient()) t.Log("Initial sync status:", syncStatus) From 1fdd712e436b8bc5463da80fd927a9a1ad945153 Mon Sep 17 00:00:00 2001 From: Arun Dhyani Date: Thu, 11 Dec 2025 16:19:10 +0530 Subject: [PATCH 5/8] added missing changes --- .github/workflows/e2e-op-historical-proof.yml | 36 ++++++++++--------- .../tests/devnets/opgeth-seq-opreth-val.yaml | 2 +- .../tests/devnets/opreth-seq-opgeth-val.yaml | 2 +- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/e2e-op-historical-proof.yml b/.github/workflows/e2e-op-historical-proof.yml index 599adf41acc..c3ef320fd64 100644 --- a/.github/workflows/e2e-op-historical-proof.yml +++ b/.github/workflows/e2e-op-historical-proof.yml @@ -8,9 +8,16 @@ on: jobs: op-reth-as-verifier: - name: op-reth as verifier e2e tests + name: op-reth-as-verifier-${{ matrix.go_pkg_name }} runs-on: ubuntu-latest timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - go_pkg_name: proofs/core + - go_pkg_name: proofs/reorg + - go_pkg_name: proofs/prune steps: - name: Checkout @@ -59,15 +66,10 @@ jobs: run: | make all DEVNET=opgeth-seq-opreth-val - - name: Run core e2e tests + - name: Run ${{ matrix.go_pkg_name }} e2e tests working-directory: crates/optimism/tests run: | - make test-e2e-kurtosis GO_PKG_NAME=proofs/core DEVNET=opgeth-seq-opreth-val - - - name: Run reorg e2e tests - working-directory: crates/optimism/tests - run: | - make test-e2e-kurtosis GO_PKG_NAME=proofs/reorg DEVNET=opgeth-seq-opreth-val + make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opgeth-seq-opreth-val # disable coverage for now # - name: Flush coverage data @@ -112,9 +114,16 @@ jobs: # verbose: true op-reth-as-sequencer: - name: op-reth as sequencer e2e tests + name: op-reth-as-sequencer-${{ matrix.go_pkg_name }} runs-on: ubuntu-latest timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - go_pkg_name: proofs/core + - go_pkg_name: proofs/reorg + - go_pkg_name: proofs/prune steps: - name: Checkout @@ -157,15 +166,10 @@ jobs: run: | make all DEVNET=opreth-seq-opgeth-val - - name: Run core e2e tests - working-directory: crates/optimism/tests - run: | - make test-e2e-kurtosis GO_PKG_NAME=proofs/core DEVNET=opreth-seq-opgeth-val - - - name: Run reorg e2e tests + - name: Run ${{ matrix.go_pkg_name }} e2e tests working-directory: crates/optimism/tests run: | - make test-e2e-kurtosis GO_PKG_NAME=proofs/reorg DEVNET=opreth-seq-opgeth-val + make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opreth-seq-opgeth-val e2e-op-historical-proof-success: name: e2e-op-historical-proof-success diff --git a/crates/optimism/tests/devnets/opgeth-seq-opreth-val.yaml b/crates/optimism/tests/devnets/opgeth-seq-opreth-val.yaml index efe1e4c4758..65aaa2f3203 100644 --- a/crates/optimism/tests/devnets/opgeth-seq-opreth-val.yaml +++ b/crates/optimism/tests/devnets/opgeth-seq-opreth-val.yaml @@ -36,7 +36,7 @@ optimism_package: image: op-reth:local extra_params: [ --proofs-history, - --proofs-history.window=10000, + --proofs-history.window=200, --proofs-history.prune-interval=1m, --proofs-history.storage-path=/data/proofs-history ] diff --git a/crates/optimism/tests/devnets/opreth-seq-opgeth-val.yaml b/crates/optimism/tests/devnets/opreth-seq-opgeth-val.yaml index 47a16212c6a..2b43aa72d17 100644 --- a/crates/optimism/tests/devnets/opreth-seq-opgeth-val.yaml +++ b/crates/optimism/tests/devnets/opreth-seq-opgeth-val.yaml @@ -27,7 +27,7 @@ optimism_package: image: op-reth:local extra_params: [ --proofs-history, - --proofs-history.window=10000, + --proofs-history.window=200, --proofs-history.prune-interval=1m, --proofs-history.storage-path=/data/proofs-history ] From 8c7d62817d666fceb39c624e041e2fd6ca6d1e5e Mon Sep 17 00:00:00 2001 From: Arun Dhyani Date: Thu, 11 Dec 2025 16:51:54 +0530 Subject: [PATCH 6/8] Update crates/optimism/tests/proofs/prune/prune_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- crates/optimism/tests/proofs/prune/prune_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/optimism/tests/proofs/prune/prune_test.go b/crates/optimism/tests/proofs/prune/prune_test.go index a3bf886c37b..6520654da84 100644 --- a/crates/optimism/tests/proofs/prune/prune_test.go +++ b/crates/optimism/tests/proofs/prune/prune_test.go @@ -47,7 +47,7 @@ func TestPruneProofStorage(gt *testing.T) { currentProofWindow := newSyncStatus.Latest - newSyncStatus.Earliest t.Log("Sync status:", syncStatus) require.GreaterOrEqual(t, currentProofWindow, proofWindow, "Pruner has changed the proof window") - t.Logf("Successfully pruned proof storage. synce status: %v", syncStatus) + t.Logf("Successfully pruned proof storage. sync status: %v", syncStatus) } type proofSyncStatus struct { From 87f01b95e97d86ebf71171f23a9b75ff563f8185 Mon Sep 17 00:00:00 2001 From: Arun Dhyani Date: Thu, 11 Dec 2025 16:53:06 +0530 Subject: [PATCH 7/8] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/e2e-op-historical-proof.yml | 2 +- crates/optimism/tests/proofs/prune/prune_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-op-historical-proof.yml b/.github/workflows/e2e-op-historical-proof.yml index c3ef320fd64..4a43032a909 100644 --- a/.github/workflows/e2e-op-historical-proof.yml +++ b/.github/workflows/e2e-op-historical-proof.yml @@ -169,7 +169,7 @@ jobs: - name: Run ${{ matrix.go_pkg_name }} e2e tests working-directory: crates/optimism/tests run: | - make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opreth-seq-opgeth-val + make test-e2e-kurtosis GO_PKG_NAME=${{ matrix.go_pkg_name }} DEVNET=opreth-seq-opgeth-val e2e-op-historical-proof-success: name: e2e-op-historical-proof-success diff --git a/crates/optimism/tests/proofs/prune/prune_test.go b/crates/optimism/tests/proofs/prune/prune_test.go index 6520654da84..8df5088fcb9 100644 --- a/crates/optimism/tests/proofs/prune/prune_test.go +++ b/crates/optimism/tests/proofs/prune/prune_test.go @@ -28,13 +28,14 @@ func TestPruneProofStorage(gt *testing.T) { t.Logf("Waiting for block %d", syncStatus.Earliest+proofWindow) opRethELNode.WaitForBlockNumber(syncStatus.Earliest + proofWindow) } - // Now we need to wait for pruner to execute pruning can be done anytime in 1 minutes(pruner prune interval = 1min) + // Now we need to wait for pruner to execute pruning, which can be done anytime within 1 minute (pruner prune interval = 1 min) startTime := time.Now() var newSyncStatus proofSyncStatus for { // Get sync status each Second if time.Since(startTime) > pruneDetectTimeout { t.Error("Pruner did not prune proof storage within the interval") + return } newSyncStatus = getProofSyncStatus(t, opRethELNode.Escape().EthClient()) if syncStatus.Earliest != newSyncStatus.Earliest { From 102075589600b21650d2708b55872db1bcf25e94 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Thu, 11 Dec 2025 12:47:45 +0100 Subject: [PATCH 8/8] Fix add missing ValueWithSubkey impl for VersionedValue --- crates/optimism/trie/src/db/models/version.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/optimism/trie/src/db/models/version.rs b/crates/optimism/trie/src/db/models/version.rs index 2387d7ca600..49917099582 100644 --- a/crates/optimism/trie/src/db/models/version.rs +++ b/crates/optimism/trie/src/db/models/version.rs @@ -3,6 +3,7 @@ use reth_db::{ table::{Compress, Decompress}, DatabaseError, }; +use reth_primitives_traits::ValueWithSubKey; use serde::{Deserialize, Serialize}; /// Wrapper type for `Option` that implements [`Compress`] and [`Decompress`] @@ -108,6 +109,14 @@ impl Decompress for VersionedValue { } } +impl ValueWithSubKey for VersionedValue { + type SubKey = u64; + + fn get_subkey(&self) -> Self::SubKey { + self.block_number + } +} + #[cfg(test)] mod tests { use super::*;