refactor(trie): remove TrieNodeProvider#23658
Merged
mediocregopher merged 8 commits intoApr 21, 2026
Merged
Conversation
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dab57-3907-736a-a44d-766b241007c7 Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dab57-3907-736a-a44d-766b241007c7 Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dab79-82df-7799-901a-a421b27793ea Co-authored-by: Amp <amp@ampcode.com>
mediocregopher
commented
Apr 20, 2026
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dabaa-a995-7284-9f28-3bd06ea11b1a Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dabb4-2a1a-7508-8ced-702e9cb20dcb Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dabb4-2a1a-7508-8ced-702e9cb20dcb Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019dabb4-2a1a-7508-8ced-702e9cb20dcb Co-authored-by: Amp <amp@ampcode.com>
mediocregopher
commented
Apr 21, 2026
| self.trie.root_with_updates(&self.proof_worker_handle).map_err(|e| { | ||
| ParallelStateRootError::Other(format!("could not calculate state root: {e:?}")) | ||
| })?; | ||
| let (state_root, trie_updates) = match self.trie.root_with_updates() { |
Member
Author
There was a problem hiding this comment.
Note: This is the only logical change to this PR. If the block had no state updates then the account trie root node won't necessarily be revealed. Previously we would reveal it on-the-fly using a TrieNodeProvider. Now root_with_updates returns a blinded error. In this case we can assume that the SR hasn't changed, and we return the previous block's state root.
| @@ -432,1043 +432,954 @@ impl SparseTrie for ParallelSparseTrie { | |||
| } | |||
| } | |||
|
|
|||
| fn update_leaf<P: TrieNodeProvider>( | |||
Member
Author
There was a problem hiding this comment.
The only real change to this file was to remove the update_leaf/remove_leaf methods out of the SparseTrie impl. This can be seen better using a --patience diff:
git diff origin/main..mediocregopher/sparse-trie-parent-root-short-circuit --patience -- crates/
trie/sparse/src/parallel.rs
Co-authored-by: Brian Picciano <933154+mediocregopher@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019daf67-d6b6-72ac-b122-04f1d8e50d71 Co-authored-by: Amp <amp@ampcode.com>
pepyakin
approved these changes
Apr 21, 2026
|
|
||
| /// Internal message for storage workers. | ||
| #[derive(Debug)] | ||
| pub(crate) enum StorageWorkerJob { |
Member
Author
There was a problem hiding this comment.
Could do yeah, I just didn't want to bloat the diff with any more new code than necessary
shekhirin
approved these changes
Apr 21, 2026
This was referenced Apr 22, 2026
crazywriter1
pushed a commit
to crazywriter1/tempo
that referenced
this pull request
Apr 23, 2026
Automated nightly update of reth dependencies from `paradigmxyz/reth` main branch. ## Upstream reth changes [`98ebc34...7839f3d`](paradigmxyz/reth@98ebc34...7839f3d) 🔗 Amp thread: https://ampcode.com/threads/T-019db884-a7c3-738b-8f38-cc04f8942d8a **Engine** - Suppress persistence during payload building ([#23618](paradigmxyz/reth#23618)) - Align Amsterdam endpoint validation ([#23625](paradigmxyz/reth#23625)) - Revert [#23541](paradigmxyz/reth#23541) and [#23578](paradigmxyz/reth#23578) ([#23646](paradigmxyz/reth#23646)) - Let consensus impls control which errors are transient ([#23668](paradigmxyz/reth#23668)) - Configure invalid header cache hit eviction ([#23670](paradigmxyz/reth#23670)) **Perf** - Relax executor reset thresholds for re-execute ([#23617](paradigmxyz/reth#23617)) - Replace `BTreeMap` with `imbl::OrdMap` in `BestTransactions` ([#23621](paradigmxyz/reth#23621)) - Avoid reopening `.csoff` on every changeset lookup ([#23687](paradigmxyz/reth#23687)) - Disable read tx timeout during re-execute ([#23680](paradigmxyz/reth#23680)) **P2P / Net** - Add snap/2 wire helpers and messages ([#23611](paradigmxyz/reth#23611)) - Optionally fetch BAL with full blocks ([#23629](paradigmxyz/reth#23629)) - Discv5 enabled by default ([#23686](paradigmxyz/reth#23686)) **DB** - Add `reth db migrate-v2` for v1→v2 storage migration ([#23422](paradigmxyz/reth#23422)) - Detect and warn about ZFS ([#23685](paradigmxyz/reth#23685)) **BAL** - Scaffold BAL store abstraction ([#23596](paradigmxyz/reth#23596)) - Enable BAL building in ethereum payload ([#23597](paradigmxyz/reth#23597)) - Add parallelization and batch IO flags ([#23663](paradigmxyz/reth#23663)) **Refactor** - Make `WorkerPool` lazy by default ([#23627](paradigmxyz/reth#23627)) - Encapsulate state fetching in db provider ([#23656](paradigmxyz/reth#23656)) - Remove `TrieNodeProvider` ([#23658](paradigmxyz/reth#23658)) - Unify opaque consensus error helpers ([#23669](paradigmxyz/reth#23669)) **Payload** - Add gas limit and slot number to `BlockOrPayload` ([#23624](paradigmxyz/reth#23624), [#23626](paradigmxyz/reth#23626)) **Bench** - Add CLI flag to fetch balances by default; require local benchmark data ([#23655](paradigmxyz/reth#23655), [#23679](paradigmxyz/reth#23679)) **Deps** - Bump alloy crates to 2.0.1 ([#23677](paradigmxyz/reth#23677)), rustls-webpki ([#23681](paradigmxyz/reth#23681)), weekly `cargo update` ([#23628](paradigmxyz/reth#23628)) **Testing** - Remove unsafe `env::set_var(RUST_LOG)` from tests ([#23672](paradigmxyz/reth#23672)) - Address nightly clippy warnings ([#23630](paradigmxyz/reth#23630)) ## Migrations 🔗 Amp thread: https://ampcode.com/threads/T-019db884-dc46-71f5-a823-00c3a16191d4 - **Reth dependency bump**: All `reth-*` git dependencies updated from rev `98ebc34` to `7839f3d` - **Alloy version bump**: `alloy-*` crates updated from `2.0.0` to `2.0.1`; `alloy-evm` changed from `0.33.2` to `0.33.0` - **`ConsensusError::Other` → `ConsensusError::msg`**: All `ConsensusError::Other(...)` calls migrated to `ConsensusError::msg(...)`, which accepts `&str`/`impl Display` directly instead of requiring `String` (removes `.to_string()` calls for string literals) - **`deny.toml` license exceptions**: Added MPL-2.0 exceptions for `bitmaps`, `imbl`, and `imbl-sized-chunks` (new transitive dependencies) [GitHub Workflow](https://github.com/tempoxyz/tempo/actions/runs/24816009191) --------- Co-authored-by: Alexey Shekhirin <github@shekhirin.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a small refactoring in SparseTrieCacheTask to remove the last real usage of TrieNodeProvider.
Remove update_leaf / remove_leaf methods from the SparseTrie trait, they are no longer used anywhere.
Delete TrieNodeProvider trait definition, all of its impls, and the associated code-paths in the proof workers.