ethereum-optimism / ethereum-optimism/optimism

kona pure derivation — Phase 6: delete async pipeline; retire cross-crate async traits

Open
#20,701 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 38m
Merged PRs (30d)
164

Description

Two sub-PRs.

## 6a — Flip default + signal deprecation

- `crates/protocol/derive/Cargo.toml`: `default = ["async"]` → `default = []`.
- All in-tree consumers drop `features = ["async"]` from their `kona-derive` dep.
- Workspace builds, tests, clippy pass with no `async` feature anywhere.

## 6b — Delete async code; cross-crate cleanup

**Inside `kona-derive`:**
- DELETE `crates/protocol/derive/src/{pipeline,stages,sources,traits,test_utils,metrics}/`.
- DELETE async traits (`Pipeline`, `SignalReceiver`, `Stage`, `OriginAdvancer`, `OriginProvider`, `BlobProvider`, `DataAvailabilityProvider`, `ChainProvider`, `L2ChainProvider`, `BatchValidationProviderDerive`, `NextAttributes`, `AttributesProvider`, `ResetProvider`). Concrete provider impl blocks (`Alloy*`, `Oracle*`) get their trait impls stripped; the structs remain as concrete fetch utilities.
- DELETE `Signal`, `ResetSignal`, `ActivationSignal`, `StepResult`.
- Cargo.toml: drop `async-trait` dep, `async` feature, `metrics` feature.
- `lib.rs`: drop every `#[cfg(feature = "async")]`.
- **Flatten `pure/` to crate root**; **keep `core/` as a subdir, promote `core` to `pub`** (future-extraction seam for a `kona-core` crate).
- Semver-major bump.

**Inside `kona-protocol` (forced cross-crate cleanup):**
- DELETE `BatchValidationProvider` trait + `#[async_trait]`.
- DELETE `Batch::check_batch`, `SpanBatch::check_batch{,_prefix}`, `SingleBatch::check_batch`, `BatchWithInclusionBlock::check_batch`. Their replacements live in `kona-derive::overlap` (pure deriver path) and `kona-derive::core` (sync batch validator).
- DELETE the four `BatchValidationProvider` concrete impl blocks (`AlloyL2ChainProvider`, `BufferedL2Provider`, `OracleL2ChainProvider`, `TestBatchValidator`).
- `Cargo.toml`: drop `async-trait` if no other async items remain in the crate.

## Verification

- `grep -rn 'async fn\|#\[async_trait\]' crates/protocol/derive/src/` returns no results.
- `grep -rn 'cfg(feature = "async")' crates/protocol/derive/` returns no results.
- `cargo tree -p kona-derive | grep -F async-trait` returns empty (kona-derive-local; other workspace crates may legitimately keep `async-trait`).
- `cargo build -p kona-derive --no-default-features --target=riscv64gc-unknown-none-elf` succeeds.
- `cargo build --workspace`, `cargo test --workspace`, `cargo clippy --workspace --all-targets -- -D warnings` all pass.

Builds on Phases 4 and 5.
Part of #20695.

🤖 *Generated by Claude Code*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.