crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated
-2%
9.4 ms9.6 ms
Commits
Click on a commit to change the comparison range
Base
main
8c8efc6
-0.55%
Merge branch 'main' into fix/tokio-runtime-executor
dee0543
7 hours ago
by yongkangc
+0.37%
chore: remove PartialEq impl for ComputedTrieData
Remove the manual PartialEq implementation for ComputedTrieData since
the trie_input field was intentionally excluded from comparisons, which
could lead to subtle bugs. Update test assertions to explicitly compare
the relevant fields individually.
Also fix unused import warning for CanonStateSubscriptions in flashblocks.
9cdf670
7 hours ago
by yongkangc
-0.03%
refactor: streamline trie input computation in payload validator
ref https://github.com/paradigmxyz/reth/pull/19894/commits/0d8091066ea5596dc7b9a887fc8bb7276c402ba0
Consolidate the logic for merging overlay trie inputs into a dedicated function, `merge_overlay_trie_input`, to improve readability and maintainability. Remove redundant code and enhance error handling in deferred trie tasks. Update documentation to clarify the purpose and process of computing `TrieInputSorted` from in-memory blocks.
7708956
6 hours ago
by yongkangc
-0.2%
feat: fast path compute trie
ac28119
6 hours ago
by yongkangc
-0.05%
fix: fast path lock
and there is a logical error here where the fast path checks blocks.last() which is the oldest in-memory block (not the tip). but blocks_by_hash returns blocks in newest-to-oldest order.
this results in
wrong data: The oldest block's trie_input only has its own overlay, missing all newer blocks' state changes
waiting on the oldest block, blocks the validation thread on the wrong trie_data(), starves the blocking pool, and even when it unblocks the reused trie input is missing newer overlays.
fc606f4
5 hours ago
by yongkangc
+0.17%
refactor: explicit ExecutedBlock constructors for safe vs deferred trie data
The API now makes it explicit which path is safe vs potentially blocking:
- `ExecutedBlock::new()` takes `ComputedTrieData` directly - safe default
for sequencers, payload builders, and other contexts where trie data is
immediately available.
- `ExecutedBlock::with_deferred_trie_data()` takes `DeferredTrieData` -
explicitly signals that the caller MUST call `set_ready()` on the handle,
otherwise `trie_data()` will block forever.
This addresses the API footgun where creating an ExecutedBlock with a
pending DeferredTrieData but never calling set_ready() would cause silent
deadlocks.
b02c00c
4 hours ago
by yongkangc
+0.14%
refactor: extract deferred trie task logic into a dedicated method
This change introduces the `spawn_deferred_trie_task` method to encapsulate the logic for computing and sorting trie data in a background task. This refactor improves code readability and maintains the validation hot path's efficiency by allowing immediate returns after state root verification. The new method handles merging of trie inputs and manages the deferred computation process, ensuring that consumers only block when they require the sorted trie data.