Skip to content

feat(trie/engine): add persistence service and prune_with_provider#25

Draft
dhyaniarun1993 wants to merge 13 commits intofeat/engine-pr1-bufferfrom
feat/engine-pr2-persistence
Draft

feat(trie/engine): add persistence service and prune_with_provider#25
dhyaniarun1993 wants to merge 13 commits intofeat/engine-pr1-bufferfrom
feat/engine-pr2-persistence

Conversation

@dhyaniarun1993
Copy link
Copy Markdown
Member

Note: Just for reviewing changes

@dhyaniarun1993 dhyaniarun1993 self-assigned this Apr 29, 2026
dhyaniarun1993 and others added 12 commits April 30, 2026 12:21
…reum-optimism#20560)

OpPayloadAttributes::transactions is Option<Vec<Bytes>>. Option::iter yields
at most one inner &Vec<Bytes>; the prior check used Vec::first on that slice
and therefore only inspected the first encoded tx, wrongly treating
[deposit, non-deposit] as deposits-only.

Flatten the inner iterator so every Bytes is checked. Add regression test
is_deposits_only_iterates_all_transactions.
…ay) (ethereum-optimism#20411)

* feat(trie): add engine buffer layer (TrieBufferState + MemoryOverlay)

* review fixes

* restrict visibility of buffer to engine

* restrict visibility of buffer to engine
…der (ethereum-optimism#20576)

* feat(kona-proof): cache L1 block-number lookups in OracleL1ChainProvider

`OracleL1ChainProvider::block_info_by_number` previously walked from
`l1_head` back to the target block on every call. Each lookup paid the
cost of N hint+preimage round trips even when the same (or nearby)
blocks had already been resolved earlier in the same proof execution.

Add a `BTreeMap<u64, BlockInfo>` cache that:

- returns cached entries directly,
- resumes the walk from the closest cached ancestor instead of always
  restarting at `l1_head`, and
- caches every block visited along the way so subsequent calls are
  free for blocks already touched.

Cache invalidation is unnecessary: the L1 chain seen by this provider
is fixed and canonical (rooted at `l1_head`).

* fix(kona-proof): place test module last and guard block_number overflow

Move the `TrieProvider` impl above `mod tests` to satisfy clippy's
`items-after-test-module` lint. Replace `block_number + 1` with
`checked_add(1)` so a `u64::MAX` request falls through to the head
check (which returns `BlockNumberPastHead`) instead of panicking.

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

* test(kona-proof): cover u64::MAX block_number in OracleL1ChainProvider

Locks in the no-panic guarantee for the `checked_add(1)` guard so a
future "simplification" back to `block_number + 1` is caught by tests.

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

---------

Co-authored-by: Paul Dowman <paul@pauldowman.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

6 participants