Skip to content

Clayton/rust cherry pick#38

Draft
ClaytonNorthey92 wants to merge 217 commits intohemifrom
clayton/rust-cherry-pick
Draft

Clayton/rust cherry pick#38
ClaytonNorthey92 wants to merge 217 commits intohemifrom
clayton/rust-cherry-pick

Conversation

@ClaytonNorthey92
Copy link

No description provided.

theochap and others added 30 commits March 19, 2026 16:31
* chore(rust): merge all the rust workspaces

* chore(ci): formatting, fixing dockerfile and ci

* chore: more ci fixes

* Update .circleci/continue/rust-ci.yml

Co-authored-by: Sebastian Stammler <seb@oplabs.co>

* Update .circleci/continue/rust-e2e.yml

Co-authored-by: Sebastian Stammler <seb@oplabs.co>

* Update .circleci/continue/rust-e2e.yml

Co-authored-by: Sebastian Stammler <seb@oplabs.co>

* chore: pr comments

* nit: fix kona path in op-challenger

* chore: fix prestate artifacts path

---------

Co-authored-by: Sebastian Stammler <seb@oplabs.co>
…nned tag (ethereum-optimism#19183)

Now that kona lives in the monorepo, the prestate build no longer needs
to clone the optimism repo at a pinned commit to build cannon. Instead,
cannon is built from the local monorepo source via a Docker named build
context, removing the cannon_tag config file and simplifying the build.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…-optimism#19163)

* proofs: port TestInteropFaultProofs action test to devstack

* fix(kona/client): produce InvalidTransition when derivation falls short of target block

* Update Makefile

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>

* fix makefile indent

* revert Makefile changes

* revert rust/kona/justfile changes

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
…#19101)

* chore(rust): move docs to unified rust/docs/ directory

* chore(rust): update repo links from alloy-rs/paradigmxyz to
  ethereum-optimism
…optimism#19155)

- Add tag classification to distinguish Rust crate groups from Docker-only groups
- Add publish-crates CI job for crates.io publishing with dependency-ordered releases
- Add op-reth Docker bake target and compute-git-versions entry
- Add cargo-release configuration for alloy-op-hardforks and op-reth
- Add .dockerignore for rust/ build context
- Fix op-reth DockerfileOp manifest paths
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Amp <amp@ampcode.com>
…e` (op-rs/op-reth#204)

- Adds new crates `reth-optimism-exex` and `reth_optimism_trie`
- Moves `reth_exex::external_proofs` -> `reth_optimism_exex`
- Moves `reth_exex::external_proofs::storage` -> `reth_optimism_trie`
Seems like when `reth-optimism-trie` depends on `reth-db-api`
indirectly, the doctest crate couldn’t resolve `reth_db_api::…` and
failing.

Closes op-rs/op-reth#233

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This PR separates storage and account cursors which makes sense because
these two cursors may have very different seek/next implementations. In
the case of in-memory, a single cursor impl can still handle both, but
for MDBX, it makes sense to implement separate cursors.

Closes op-rs/op-reth#236

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
Based on op-rs/op-reth#203 ,
op-rs/op-reth#204

This PR implements `StateProvider` given a `OpProofsStorage` instance.
It reads most data from the external database, but falls back on the
latest provider for block hashes and code by hash similar to the
existing historical provider in Reth.

This is an important part to implementing live syncing since we're
running the sync process on the DB being created.

In the Reth implementation, `proof.rs` is contained in `trie/db`, so I
think it makes sense to go in our DB crate. The `provider.rs` is in the
`reth-provider` crate, but I don't think a separate provider crate helps
us here, so I think we should also include that in the trie crate as
well.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Based on op-rs/op-reth#229

Adds tests to ensure that storing TrieUpdates that include deletions
actually deletes the nodes at that block height, and that updates take
precedence over deletions (same as `write_trie_updates` in Reth).

Closes op-rs/op-reth#238
…p-reth#198)

Based on op-rs/op-reth#197

This PR implements the live state collector on top of the
`OpProofsStateProvider` created in the previous PR. This sync process
tries to re-execute all blocks from the current block of the external
database to tip.

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
…#222)

Closes op-rs/op-reth#164

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
Fixes op-rs/op-reth#225 (does not track errors as these are fatal currently)
…#251)

Fixes op-rs/op-reth#237

Adds more concrete error variants for `OpProofsStorageError`

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
…eth#248)

Fixes op-rs/op-reth#247

Removes the `block_number` parameter from:
- store_account_branches
-  store_storage_branches
-  store_hashed_accounts
-  store_hashed_storages

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
…op-reth#250)

Ref op-rs/op-reth#241

- Fixes comment from deps fix in
op-rs/op-reth#229 (fix correct but comment
misleading)
- `serde-bincode-compat` is a feature which must be enabled when the
`bincode` dependency is used. Asides for dev-deps, this only happens in
`reth-stages`. `reth-exex` runs in `reth-stages`. In this wokrstream we
use the `TrieUpdate` in exex. `serde-bincode-compat` is already
implemented for `TrieUpdates` in `reth-trie-common`, this PR simply
makes that feature accessible via `reth-trie` and in turn
`reth-optimism-trie`, in order to enable it in `reth-optimism-exex`.
Closes op-rs/op-reth#212

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
theochap and others added 29 commits March 19, 2026 16:32
…mism#19292)

* ci: add cannon-builder image to Docker CI builds

Add the kona cannon-builder (Rust MIPS64r1 toolchain) image to the
branch and tag Docker build workflows. This publishes the image to the
shared artifact registry so it can be consumed by prestate builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* rust: bump op-reth to v1.11.1 and update cannon build infrastructure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: geoknee <georgeknee@googlemail.com>
…align on single ComponentID type (ethereum-optimism#18877)

* stack: remove backward compatibility type aliases for Phase 6 cleanup

Complete the ID type system refactor by removing all backward compatibility
code. All code now uses ComponentID directly with typed constructor functions.

Changes:
- Remove 19 type aliases from component_id.go (L1ELNodeID, L2BatcherID, etc.)
- Remove Kind = ComponentKind alias
- Update KindProvider interface to use ComponentKind return type
- Update context.go functions to use ComponentKind instead of Kind
- Fix test files using incorrect constructor patterns

The type system is now fully unified:
- Single ComponentID type with kind, shape, key, and chainID fields
- Typed constructors (NewL2BatcherID, NewL2ELNodeID, etc.) return ComponentID
- ComponentKind enum for type discrimination
- Simplified Matcher[E] interface with single type parameter

* fix(op-devstack): drop misplaced kona tests and finalize componentid cleanup

* fix(op-devstack): restore Go build after ComponentID refactor
…9290)

The OP Stack supervisor is deprecated. Remove all supervisor-related
Rust crates, the supervisor binary, Go e2e tests, and Grafana dashboard
recipe. Update workspace configuration, justfiles, and documentation.

ci: remove kona-supervisor CI jobs and env vars

Remove the kona-supervisor-e2e-tests job, kona-supervisor-e2e workflow,
and RUST_BINARY_PATH_KONA_SUPERVISOR env exports from CircleCI configs.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(kona): add Karst hardfork support

Add Karst between Jovian and Interop in the fork ordering. Karst has
an empty NUT bundle and requires empty activation blocks, matching the
Go implementation in op-node (PR ethereum-optimism#19250).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kona): chain Karst to Interop in op_fork_activation

When karst_time is None, op_fork_activation should chain to Interop
rather than returning Never. This maintains consistency between the
is_karst_active() method and op_fork_activation().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kona): don't chain Karst to Interop in op_fork_activation

Revert ebd614d. Interop is an independent fork that doesn't participate
in the sequential activation chain. Karst is the terminal fork before
Interop, matching how Jovian was terminal before Karst was added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix rust formatting

* Chain karst activation to interop

* fix(kona): address Karst review feedback

* fix(kona): add missing karst_time to registry test configs and fix doc link

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…timism#19341)

`variant.rs` defined `EthereumDataSourceVariant` and implemented
`AsyncIterator` for it, but `AsyncIterator` is not defined anywhere in
the kona codebase and the file was never included in `sources/mod.rs`.
The type was therefore completely unreachable and unusable at runtime.

`EthereumDataSource` in `ethereum.rs` already covers both the calldata
and blob cases through the `DataAvailabilityProvider` trait, making
`EthereumDataSourceVariant` redundant.

Fixes ethereum-optimism#19340

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ethereum-optimism#19355)

The `load_calldata` match on `TxEnvelope` used a catch-all `_ => return None`
that silently dropped EIP-4844 (type 3) transactions. The derivation spec
(derivation.md:504) and op-node's `isValidBatchTx` both explicitly accept
type-3 transactions, so kona must do the same to avoid divergent L2 state
in the pre-Ecotone window.

Add a `TxEnvelope::Eip4844` match arm that extracts `to` and `input` like
the other accepted transaction types, and update the corresponding test
from asserting the tx is ignored to asserting its calldata is included.

Closes ethereum-optimism#19352

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
… panics on truncated input (ethereum-optimism#19361)

* fix(kona/protocol): add bounds checks in span batch decode to prevent panics on truncated input

Multiple span batch decode functions panic on truncated input instead of
returning an error. This adds explicit length checks before each unsafe
slice operation:

- prefix.rs: decode_parent_check and decode_l1_origin_check now check
  r.len() >= 20 before split_at(20)
- transactions.rs: decode_tx_sigs now checks r.len() >= 64 before
  indexing r[..32] and r[32..64]
- transactions.rs: decode_tx_tos now checks r.len() >= 20 before
  indexing r[..20]

On short input, each function returns SpanBatchError::Decoding(...)
instead of panicking, allowing the batch to be dropped gracefully —
consistent with Go op-node's io.ReadFull behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: fix rustfmt formatting in span batch decode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: fix clippy field_reassign_with_default in span batch tests

Use struct initialization syntax instead of Default::default()
followed by field reassignment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: fix rustfmt formatting for struct initialization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…alidator transition (ethereum-optimism#19360)

* fix(kona/derive): copy origin field during Holocene BatchQueue→BatchValidator transition (BQ-12)

On Holocene activation BatchProvider::attempt_update() transitions from
BatchQueue to BatchValidator. It was copying l1_blocks but not the origin
field, leaving BatchValidator.origin as None.

Go's BatchMux.TransformHolocene() copies both fields (batch_mux.go:67-68):
  bs.l1Blocks = slices.Clone(bp.l1Blocks)
  bs.origin = bp.origin

Without the origin copy, the first update_origins() call after transition
always enters the self.origin != self.prev.origin() branch (None != Some(…)).
This causes two failure modes:
1. Normal case: current L1 block is pushed onto l1_blocks again, creating a
   duplicate entry that corrupts the two-slot epoch window.
2. Lagging case: l1_blocks.clear() discards all transferred history, then
   next_batch() returns MissingOrigin.crit(), halting derivation.

Fix: copy batch_queue.origin into bv.origin alongside l1_blocks, matching
the Go reference implementation.

Closes ethereum-optimism#19356

* fix: apply rustfmt formatting fix

Wrap long comment line in batch_provider.rs to satisfy nightly rustfmt check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: rename test to reflect expected behavior

The test verifies that origin IS transferred during Holocene transition,
so rename from _not_transferred to _transferred.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove dangling reference to random issue ID.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
… in BlobData::fill (ethereum-optimism#19362)

* fix(kona/derive): return Reset instead of Critical on blob under-fill in BlobData::fill

When the blob provider returns fewer blobs than there are blob-hash placeholders
(under-fill), BlobData::fill previously returned BlobDecodingError::InvalidLength
which mapped to PipelineErrorKind::Critical — permanently terminating the pipeline
and requiring operator restart.

This is wrong. Under-fill is a transient condition:
- The provider may not have all blobs cached/synced yet for a newly confirmed block
- The L1 block may have been reorged out, causing the provider to return no blobs

In both cases the correct response is to reset the pipeline and retry from the
last safe L1 block, exactly as op-node does: fillBlobPointers wraps the same
error as NewResetError at blob_data_source.go:110.

Changes:
- Add ResetError::BlobsUnderFill(usize, usize) to pipeline.rs
- Add BlobProviderError::NotEnoughBlobs(usize, usize) to sources.rs, mapped to
  ResetError::BlobsUnderFill.reset() in From<BlobProviderError> for PipelineErrorKind
- Change BlobData::fill return type from Result<bool, BlobDecodingError> to
  Result<bool, BlobProviderError>, returning NotEnoughBlobs on under-fill
- Update blobs.rs caller to use the simplified .into() conversion
- Update tests to assert under-fill produces a Reset-level error

Fixes ethereum-optimism#19359

* fix(kona/derive): remove unused BlobProviderError import

The refactor to use Into::<PipelineErrorKind>::into made the direct
BlobProviderError import unnecessary, triggering a clippy warning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: apply cargo fmt to blobs.rs import ordering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kona/derive): address review feedback on blob under-fill PR

- Wrap BlobProviderError in ResetError::BlobsUnderFill instead of
  duplicating fields
- Use named fields for BlobProviderError::NotEnoughBlobs
- Remove unnecessary map_err in BlobSource fill loop
- Add Clone to BlobDecodingError and BlobProviderError

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ethereum-optimism#19358)

* fix(kona/derive): make syscfg update failure non-fatal in L1Traversal

When `update_with_receipts` fails to apply system config changes from L1
receipts, both `PollingTraversal::advance_origin` and
`IndexedTraversal::provide_next_block` were returning a Critical pipeline
error, permanently halting the pipeline.

op-node's reference implementation (`l1_traversal.go:78-82`) treats this
failure as non-fatal with the comment: "failure to apply is just
informational, so we just log the error and continue."

This commit aligns kona's behaviour with op-node: on syscfg update error,
log a warning and continue advancing the origin rather than halting.

Fixes ethereum-optimism#19353

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: apply rustfmt to indexed.rs test line added in this fix

The block2 struct literal added in this fix exceeds the 100-char
line width limit. Wrap it to comply with rustfmt requirements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…et constructors (ethereum-optimism#19452)

* refactor(op-devstack): simplify acceptance testing around direct preset constructors

fix acceptance and kona e2e test harness regressions

fix same-timestamp cycle test and kona shared runtime wrappers

address review feedback and restore devstack test coverage

fix(ci): stabilize rust e2e websocket tests

* refactor(op-devstack): validate preset option support

* fix(ci): reduce rust subprocess log volume
…reum-optimism#19364)

* fix(kona/derive): add over-fill check in BlobSource::load_blobs

After the blob-pointer fill loop completes, add a post-loop check:
if `blob_index < blobs.len()` the provider returned more blobs than
were requested. Return `ResetError::BlobsOverFill` (→
PipelineErrorKind::Reset) rather than silently discarding the extras.

This mirrors op-node's `fillBlobPointers` check at
blob_data_source.go:162-163 which returns
`fmt.Errorf("got too many blobs")` wrapped as `NewResetError`.

Over-fill can occur with buggy blob providers (e.g. third-party RPC
services that ignore the requested hash list) or in rare L1 reorg
scenarios where the blob set shifts between hash collection and fetch.

Changes:
- Add `ResetError::BlobsOverFill(usize, usize)` variant to
  `pipeline.rs` (symmetric with the existing `BlobsUnderFill` variant).
- Import `ResetError` in `blobs.rs` and add the post-loop guard.
- Add `should_return_extra_blob` flag to `TestBlobProvider` for testing.
- Add `test_load_blobs_overfill_triggers_reset` regression test.

Fixes ethereum-optimism#19363

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: use function names instead of line numbers in Go references

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kona/derive): use named fields for BlobsOverFill variant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(kona/derive): rename blob_index to filled_blobs in BlobSource (ethereum-optimism#19480)

Rename the `blob_index` variable in `load_blobs` to `filled_blobs`
for clarity, as the variable tracks the number of blob placeholders
that were filled rather than serving as a traditional index.

Addresses review feedback from optimism#19364.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove references to Go implementation in comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(kona/derive): remove useless BlobProviderError conversion in map_err

The `From<BlobProviderError> for PipelineErrorKind` impl already exists,
so `?` handles the conversion automatically. The explicit `map_err` was
redundant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add fix-rust-fmt Claude Code skill

Adds a skill that fixes Rust formatting CI failures by running
`just fmt-fix` with the correct nightly toolchain via mise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestion from @ajsutton

* Update .claude/skills/fix-rust-fmt/SKILL.md

Co-authored-by: Sebastian Stammler <seb@oplabs.co>

* docs: link /fix-rust-fmt skill from kona CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: reference fix-rust-fmt skill in rust-dev.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
Bump all reth dependencies from v1.11.2 to v1.11.3 in the rust workspace,
including op-reth crate versions and the Cargo.lock.
* chore(cannon): migrate Makefile to justfile

Migrate cannon build targets from Make to Just. The Makefile now
delegates to just with a deprecation warning, preserving backwards
compatibility for existing make invocations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): add missing lint target and include justfiles in Docker context

- Add `lint` to DEPRECATED_TARGETS and justfile (CI compatibility stub)
- Copy justfiles/ into kona cannon-repro.dockerfile for deprecated.mk shim
- Install `just` binary in cannon Docker build for the Make shim

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): remove [default] attribute for just <1.38 compat

The Alpine 3.21 just package is v1.37.0 which doesn't support the
[default] attribute. Move cannon recipe to first position instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): include justfiles/ in op-program Docker build context

The cannon Makefile deprecated shim requires justfiles/deprecated.mk,
which is resolved relative to cannon/ inside the Docker container. The
op-program Dockerfile.repro.dockerignore was excluding justfiles/ from
the build context, causing the cannon make shim to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(cannon): update README to use just instead of make

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): call just directly in cannon-repro.dockerfile

Instead of going through the deprecated Make shim, invoke just cannon
directly in the Docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): update Dockerfile.diff to use just diff-cannon directly

The diff-%-cannon Make pattern target was converted to a parameterized
just recipe (just diff-cannon VM). Update the Dockerfile to call just
directly instead of through make, which would fail since the deprecated
shim doesn't support pattern targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): add diff-%-cannon pattern target to deprecated Makefile

Preserves backwards compatibility for make diff-<vm>-cannon invocations
(used by Dockerfile.diff and potentially other scripts) by translating
the pattern to just diff-cannon <vm>.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: install just via system package manager in Dockerfiles

- cannon/Dockerfile.diff: use `apk add just` instead of curl install script,
  drop unnecessary `make` dependency
- cannon-repro.dockerfile: switch cannon-build stage from ubuntu:22.04 to
  golang:1.23.8-alpine3.21, matching the monorepo's Go builder image, so
  just can be installed via `apk add` instead of curl install script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cannon): bump Go to 1.24.10 in cannon-repro.dockerfile

The golang Docker image sets GOTOOLCHAIN=local which prevents automatic
toolchain downloading. Since go.mod requires go 1.24.0, the 1.23.8
image fails to build. Match Dockerfile.diff which already uses 1.24.10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ptimism#19252)

* feat: add binary entry point for external proofs in OP (op-rs/op-reth#222)

Closes op-rs/op-reth#164

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>

* feat: add support for `eth_getProof` (op-rs/op-reth#257)

Adds support for `eth_getProof` RPC method. This required reworking the
launch command to still work with an alternative DB provider.

Closes op-rs/op-reth#173

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>

* perf(trie): feature gate `reth-optimism-trie` metrics (op-rs/op-reth#282)

Closes https://github.com/op-rs/bin/issues/281

- Feature gates `reth-optimism-trie` metrics
- Moves cursor impls out of proofs module into new module `cursor`
- Moves cursor factory impls into new module `cursor_factory`
- Updates cursor factory impls to return cursor types with metrics
wrapper if metrics feature is enabled

* fix(test): Enable live collector tests with metrics feature (op-rs/op-reth#291)

Closes https://github.com/op-rs/bin/issues/283

Enable live collector tests when metrics feature is enabled

* feat: implement `debug_executePayload` (op-rs/op-reth#276)

Closes https://github.com/op-rs/bin/issues/189

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>

* feat: live collector integration (op-rs/op-reth#306)

Closes op-rs/op-reth#296

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>

* fix: rebase conflicts (op-rs/op-reth#367)

Fix conflicts rebasing onto latest upstream main

* feat: implemented `OpProofStorage` Database metrics (op-rs/op-reth#407)

Closes op-rs/op-reth#224
Closes op-rs/op-reth#387

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>

* feat: Implemented `OpProofStoragePrunerTask` (op-rs/op-reth#375)

Closes op-rs/op-reth#361
Closes op-rs/op-reth#395

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>

* chore: inmem proof storage removed (op-rs/op-reth#465)

This PR removes the CLI support for in-memory proof storage
(proofs_history_storage_in_mem). The in-memory storage implementation
was primarily intended for unit testing and is not feasible for running
a node due to the large memory requirements of storing historical trie
nodes.

Closes op-rs/op-reth#466

* chore(exex): Add metrics feature in `reth-optimism-exex` (op-rs/op-reth#438)

Closes https://github.com/op-rs/bin/issues/427

---------

Co-authored-by: itschaindev <jagrutk@protonmail.com>

* feat: prune cli added (op-rs/op-reth#507)

Closes op-rs/op-reth#452

* refactor(trie): return `OpProofsStorageError` from `execute_and_store_block_updates` (op-rs/op-reth#535)

Closes op-rs/op-reth#523

---------

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>

* fix: reduce default proofs pruning interval (op-rs/op-reth#560)

Closes op-rs/op-reth#559

* feat: add verification interval for integrity check (op-rs/op-reth#577)

Closes op-rs/op-reth#449

The approach used is to perform full block verification after every N
blocks to ensure the state is still correct.

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>

* chore: getProof benchmark utility added (op-rs/op-reth#550)

Utility for op-rs/op-reth#446

* chore: mv proof args to rollup node (op-rs/op-reth#625)

Closes op-rs/op-reth#613

* chore: ExEx config builder (op-rs/op-reth#642)

Closes op-rs/op-reth#641

---------

Co-authored-by: Himess <semihcvlk53@gmail.com>

* chore: moved proof initialization to `reth-optimism-node` (op-rs/op-reth#640)

Closes op-rs/op-reth#612

---------

Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>

* chore(rust): fix compilation errors

* docs(op-reth): add historical proofs README to exex crate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(op-reth): move proof-bench to rust/op-reth/bin/proof-bench

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-reth): fix go-lint and rust-clippy CI failures

- Replace big.Int.Uint64() calls with bigs.Uint64Strict() in proof tests
- Fix goimports ordering in proof test files (move ethereum-optimism/* before ethereum/go-ethereum/*)
- Fix const alignment in preset.go
- Fix uninlined_format_args clippy lint in proof-bench report.rs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

fix(op-reth): update proofs preset to use stack.ComponentID

Replace removed type aliases (L1NetworkID, L1ELNodeID, L2CLNodeID, etc.)
with unified stack.ComponentID type. Also fix L2NodeMatcher generics and
match.Not calls to use stack.ByID wrapper.

fix(op-reth): remove duplicate crates/tests/proofs preset

This was a partial copy of rust/op-reth/tests/proofs/utils with no
go.mod, no test files, and no other sources. It caused go-lint CI
failures due to stale type references.

---------

Co-authored-by: jagroot <4516586+itschaindev@users.noreply.github.com>
Co-authored-by: Arun Dhyani <dhyaniarun7@gmail.com>
Co-authored-by: Julian Meyer <julianmeyer2000@gmail.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sadiqur Rahman <sadiqurr8@gmail.com>
Co-authored-by: itschaindev <jagrutk@protonmail.com>
Co-authored-by: Himess <95512809+Himess@users.noreply.github.com>
Co-authored-by: Himess <semihcvlk53@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…-reth (ethereum-optimism#19408)

* feat(kona): implement L2PayloadWitness hint for interop

Adds support for the L2PayloadWitness hint in kona interop mode, enabling
execution witness pre-fetching via debug_executePayload RPC.

Changes:
- Add enable_experimental_witness_endpoint flag to InteropHost config
- Add ExecutionWitness and OpPayloadAttributes imports
- Implement L2PayloadWitness handler with chain_id routing
  - Extracts chain_id from last 8 bytes (variable-length pattern)
  - Routes to correct L2 provider via providers.l2(&chain_id)
  - Calls debug_executePayload RPC with silent failure for unsupported clients
  - Stores witness preimages (state, codes, keys) with keccak256 keys
- Add unit tests for hint data parsing and validation

Follows the same pattern as single-chain implementation with multi-chain
routing added for interop. All tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix package reference in interop acceptance tests

* feat(op-challenger): add --cannon-kona-experimental-witness-endpoint flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* remove redundant witness endpoint acceptance test

* fix(kona): add L2PayloadWitness proactive hint and improve interop tests

- Register L2PayloadWitness as a proactive hint in interop cfg.rs to
  match single-chain behavior
- Extract parse_l2_payload_witness_hint() helper and update tests to
  call it directly rather than reimplementing the parsing logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(kona): extract preimages iterator before kv lock, add WithL2ELKind tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-reth): wire proof-history exex and RPC overrides into main entrypoint

main.rs was calling launch_with_debug_capabilities directly, bypassing
launch_node_with_proof_history entirely, so the proofs-history exex and
eth_getProof/debug_executePayload RPC overrides were never installed.
Made launch_node_with_proof_history generic over DB to work with the bare
DatabaseEnv the CLI provides. Removed --rpc.eth-proof-window from devstack
since the exex override now handles all eth_getProof requests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Lint fix

* fix(op-reth): make supervisor URL optional, disable interop validation when not set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(rust): apply nightly rustfmt to op-reth changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Lint fixes

* fix(op-devstack): always enable proof history for op-reth, window=10000

Ports the proof history always-on change to mixed_runtime.go (the new
location after develop's devstack refactoring). Removes the ELProofHistory
toggle — proof history is now unconditionally enabled for all op-reth nodes
with a 10000-block window.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(op-devstack): use op-reth for all interop tests, always enable proofs-history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-devstack): remove supervisor RPC from op-reth node startup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(op-devstack): use op-reth for supernode interop tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-node): handle reorged super authority safe head gracefully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-devstack): skip op-reth tests gracefully when binary not available

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(op-devstack): revert startL2ELNodeWithSupervisor to op-geth

* fix(op-challenger): clarify --proofs-history requirement in flag usage

* fix(op-reth): fix imports and Cargo.toml after rebase conflict resolution

* review: fail on missing op-reth binary, clarify supervisor deprecation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert "fix(op-node): handle reorged super authority safe head gracefully"

This reverts commit c054e41004b3e9d61850e1e1bf63d246ba4df87d.

* fix(kona): log info when debug_executePayload is unavailable, add tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(kona): fix import ordering from nightly rustfmt

* Lint fix

* fix(kona): make is_rpc_method_not_found const to satisfy clippy

* fix(op-devstack): respect DEVSTACK_L2EL_KIND in supernode runtime

startMixedOpRethNode was hardcoded so memory-all-opn-op-geth CI job
(which sets DEVSTACK_L2EL_KIND=op-geth) was still running op-reth.
Add startSupernodeEL helper that reads the env var and falls back to
op-reth when not set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ributesBuilder (ethereum-optimism#19503)

System config update errors in `prepare_payload_attributes` were propagated
as critical pipeline errors, halting derivation. One or more receipts may
contain malformed or invalid config update logs, which should not be fatal.

Change the error handling to log a warning and continue derivation instead.

Closes: AQ-10

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
ethereum-optimism#19549)

ReorgTriggered previously checked both that a reorg occurred on an exact
block. When a reorg happens earlier than the target block and the target
block is not the first in the epoch (e.g. due to an L1 reorg), the parent
hash check fails because the reorged block's parent was itself reorged.

Introduce ReorgExactFn which preserves the strict parent hash check,
and relax ReorgTriggeredFn to only verify the block hash changed.
Tests that assert a reorg at a specific divergence point now use
ReorgExact; ReorgTriggered is available for cases where the reorg
depth may vary.

Extract shared reorg-detection logic into a reorgTriggered helper.

Fixes TestUnsafeGapFillAfterSafeReorg CI failure where the reorg
propagated deeper than the target block, causing a spurious parent
hash mismatch.

CircleCI: https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/119359/workflows/34010516-d6b0-4a0d-a424-f688235c28c5/jobs/4573838/tests
Add a `deny` target to the Rust justfile that runs
`cargo deny --all-features check all`, and update CI to use it
instead of invoking cargo deny directly.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ism#19553)

The large-kona-sequencer config (1 kona sequencer + 4 reth validators +
4 geth validators) runs the same tests as simple-kona-sequencer with no
additional test logic — the tests just iterate over more nodes. The only
difference is scale, but with 20+ processes on xlarge (8 vCPU, 16GB),
kona-node engine API calls intermittently time out under resource
pressure, causing TestSyncSafe to flake.

The simple-kona-sequencer variant already covers the kona-sequencer +
mixed-validator topology with 1 of each type.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: migrate rust/op-reth Makefiles to just

Port all targets from the three Makefiles under rust/op-reth/ to
justfiles, following the same deprecation pattern used by Go packages.

- rust/op-reth/justfile: expanded with all targets from the Makefile
  (build, install, cross-compilation, docker, lint, test, profiling)
- rust/op-reth/tests/justfile: new file with Go e2e test targets
- rust/op-reth/crates/tests/justfile: new file with Go e2e + docker targets
- All three Makefiles replaced with deprecation shims that forward to just
- CI updated to use `just test-e2e-sysgo` instead of `make test-e2e-sysgo`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: make FEATURES overridable via env in op-reth justfile

Address review feedback: use env() for FEATURES so that
docker-build-push-tags can override it in sub-invocations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: subshell cd in build-release-tarballs, remove invalid deprecated targets

- Wrap `cd BIN_DIR` in subshells so cwd doesn't persist across
  subsequent just/cp commands in the bash shebang block
- Remove build-native and build-cross from deprecated targets — these
  are parameterized just recipes that require a target argument and
  didn't exist as standalone Make targets (the original had pattern
  rules build-native-% and build-%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add manual shims for build-% and build-native-% pattern rules

The generic deprecated-target macro can't handle Make pattern rules.
Add manual shims that forward make build-native-<target> to
just build-native <target> and make build-<target> to
just build-cross <target>, matching the original Makefile behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix default target.

* docs: update op-reth READMEs to reflect make-to-just migration

Update all three READMEs under rust/op-reth/ to reference `just` recipes
instead of `make` targets. Also fix the tests/README.md which described
a stale Kurtosis-based workflow that no longer matched the actual Makefile
targets — replaced with the current sysgo-based workflow matching the
justfile. Remove the stale `make ef-tests` reference from the main README
(no such target existed in the Makefile or justfile).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore(ci): capture JUnit XML test results for rust-e2e jobs

Wrap bare `go test` invocations with `gotestsum --junitfile` in the
kona tests justfile and op-reth tests Makefile so that all rust-e2e CI
jobs produce JUnit XML. Add `store_test_results` and `store_artifacts`
steps to all 4 jobs in rust-e2e.yml so CircleCI Test Insights can
surface per-test timing, flake detection, and failure details.

The kona-proof-action-tests job already produced JUnit XML via
gotestsum but never uploaded it — this change adds the missing CI
upload steps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: theo <80177219+theochap@users.noreply.github.com>
…#19598)

* chore(rust): remove stale RUSTSEC-2026-0002 ignore from deny.toml

The lru crate advisory (RUSTSEC-2026-0002) no longer matches any crate
in the dependency tree, causing cargo-deny to fail with
"advisory was not encountered". The vulnerable lru versions (0.9.0–0.16.2)
have been patched — lru 0.16.3 is already in Cargo.lock.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: Update lz4_flex to 0.12.1

lz4_flex 0.12.0 suffers from RUSTSEC-2026-0041

https://rustsec.org/advisories/RUSTSEC-2026-0041

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: wwared <541936+wwared@users.noreply.github.com>
…ism#19536)

* refactor: move OP-specific EVM code into alloy-op-evm newtypes

Introduce OpTx and OpTxError newtype wrappers in alloy-op-evm to hold
all OP-specific EVM implementations that were previously in alloy-evm's
`op` module. This satisfies Rust's orphan rule while decoupling alloy-evm
from Optimism-specific dependencies.

Changes:
- Add OpTx newtype wrapping OpTransaction<TxEnv> with all necessary trait
  impls (Transaction, TransactionEnv, FromRecoveredTx, FromTxWithEncoded,
  IntoTxEnv, OpTxEnv, TryIntoTxEnv)
- Add OpTxError newtype wrapping OpTransactionError with InvalidTxError
  and map_op_err helper
- Move spec ID mapping and EvmEnv constructors as free functions
  (evm_env_for_op_block, evm_env_for_op_next_block, evm_env_for_op_payload)
- Add rpc module with TryIntoTxEnv<OpTx> for OpTransactionRequest
- Update all downstream crates (op-reth, kona, custom-node example)
- Remove alloy-evm "op" feature usage from kona crates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(rust): move newtypes to op-reth and kona

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: split gotestsum JSON logs into per-test files

Add two scripts under ops/scripts/:

- split-test-logs.sh: takes a gotestsum JSON log file and splits it into
  one log file per test, organized as per-test/<package>/<TestName>.log
  next to the source JSON file.

- gotestsum-split.sh: drop-in gotestsum wrapper that runs gotestsum,
  then calls split-test-logs.sh. Preserves gotestsum's exit code so
  splits happen even on test failure. If --jsonfile isn't provided, adds
  one automatically (tmp/testlogs/log.json) so per-test logs are always
  generated.

All gotestsum invocations in justfiles and CI config now use the wrapper.
The one exception is the xargs-based parallel sharding in kona action
tests, which calls gotestsum directly (since xargs invokes it multiple
times appending to one jsonfile) and then calls split-test-logs.sh once
at the end.

Per-test logs land under tmp/testlogs/per-test/ which is already
captured by existing CircleCI store_artifacts steps.

Also migrates rust/op-reth/crates/tests from plain `go test` to
gotestsum via the wrapper for consistency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: fail on split-test-logs.sh errors instead of silently ignoring

split-test-logs.sh now exits non-zero when the JSON file is missing or
python3 is unavailable. gotestsum-split.sh propagates split failures
(preferring the split exit code over gotestsum's if both fail).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: correct script paths in kona tests justfile

SOURCE is rust/kona/tests, so the repo root is ../../../ not ../../.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ci): use literal path for store_artifacts in go-tests job

store_artifacts doesn't support glob patterns — `testlogs*.tar.gz` was
treated as a literal filename, so no artifacts were ever captured for
parallel go-tests jobs. Use a consistent `testlogs.tar.gz` name since
the node index is already in the filenames inside the tarball.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ClaytonNorthey92 ClaytonNorthey92 force-pushed the clayton/rust-cherry-pick branch from cdf7603 to 4ad33a4 Compare March 19, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.