crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated::sparse trie[init size 10000 | update size 100 | num updates 5]
0%
10.7 ms
10.7 ms
prefix set | size: 1000 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 1000 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated::sparse trie[init size 10000 | update size 100 | num updates 10]
0%
21.3 ms
21.3 ms
prefix set | size: 1000 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 1000 | `Vec` with custom cursor lookup
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated::sparse trie[init size 1000 | update size 1000 | num updates 5]
0%
24.2 ms
24.2 ms
prefix set | size: 1000 | `Vec` with binary search lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 1000 | `Vec` with binary search lookup
0%
198.3 µs
198.3 µs
parallel hashing[1000]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State::parallel hashing[1000]
prefix set | size: 10 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 10 | `BTreeSet` with `BTreeSet:range` lookup
0%
5.1 µs
5.1 µs
prefix set | size: 10 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 10 | `BTreeSet` with `Iterator:any` lookup
0%
4 µs
4 µs
prefix set | size: 10 | `Vec` with custom cursor lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 10 | `Vec` with custom cursor lookup
0%
3.1 µs
3.1 µs
prefix set | size: 100 | `BTreeSet` with `BTreeSet:range` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 100 | `BTreeSet` with `BTreeSet:range` lookup
0%
40.2 µs
40.2 µs
sequence hashing[1000]
crates/trie/trie/benches/hash_post_state.rs::post_state::hash_post_state::Hash Post State::sequence hashing[1000]
0%
2.6 s
2.6 s
prefix set | size: 1000 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 1000 | `BTreeSet` with `Iterator:any` lookup
crates/primitives/benches/validate_blob_tx.rs::validate_blob::blob_validation::Blob Transaction KZG validation::validate_blob | num blobs: 3 | ValidateBlob
0%
150.9 µs
150.9 µs
prefix set | size: 100 | `BTreeSet` with `Iterator:any` lookup
crates/trie/common/benches/prefix_set.rs::prefix_set::prefix_set_lookups::Prefix Set Lookups::prefix set | size: 100 | `BTreeSet` with `Iterator:any` lookup
crates/trie/sparse/benches/root.rs::root::calculate_root_from_leaves_repeated::calculate root from leaves repeated::hash builder[init size 10000 | update size 100 | num updates 5]
-7%
41.7 ms
44.7 ms
Commits
Click on a commit to change the comparison range
Base
main
4874396
-26%
Update api.rs
3abe2f4
7 days ago
by rezbera
0%
Update fee.rs
464a097
6 days ago
by rezbera
+26%
Merge remote-tracking branch 'upstream/main' into basefee/centralize-with-rose
456b674
5 days ago
by rezbera
0%
fix: improve error handling and clean up imports
- Use proper error handling instead of unwrap_or_default for base fee
- Remove unused Header import from fee_history.rs
992996e
5 days ago
by rezbera
0%
docs: add clarifying comment about BaseFeeMissing error
Explains that the BaseFeeMissing error for parent blocks won't occur
in practice since previous blocks are validated to have base fees.
3cf3618
5 days ago
by rezbera
0%
test: use unwrap() instead of unwrap_or_default() for base fee
In e2e tests, we expect base_fee_per_gas to always be present,
so using unwrap() provides better error reporting if it's missing.
3bc1c01
5 days ago
by rezbera
0%
revert: use original next_block_base_fee function for optimism
Revert back to using the optimism-specific next_block_base_fee function
which handles Holocene hardfork logic and proper error propagation with ?,
matching the original behavior before the trait signature changes.
92795dd
5 days ago
by rezbera
0%
style: clean up imports and formatting
- Move import to maintain alphabetical order
- Add blank line for better readability
7beacfc
5 days ago
by rezbera
0%
docs: fix broken documentation link
Replace broken AlloyBlockHeader::next_block_base_fee reference
with calc_next_block_base_fee which is the actual function used
in the implementation.
da53137
5 days ago
by rezbera
0%
feat: add parent_timestamp parameter to next_block_base_fee
Add parent_timestamp parameter to the next_block_base_fee method signature
to enable time-based validations and hardfork transition logic that may
require both parent and target block timestamps.
Changes:
- Updated EthChainSpec trait method signature
- Updated all callers to provide parent timestamp
- Maintained backward compatibility of calculation logic
- Parent timestamp now available for future chain-specific implementations
The parent_timestamp parameter is currently unused in the base implementation
but provides the foundation for more sophisticated base fee calculations.
d35816a
4 days ago
by rezbera
0%
feat: adopt alloy-consensus pattern for next_block_base_fee
Centralizes base fee calculation through EthChainSpec trait while following
alloy-consensus pattern of returning Option<u64> instead of u64.
Changes:
- Update EthChainSpec::next_block_base_fee to return Option<u64>
- Add Self: Sized constraint to maintain trait object compatibility
- Use header parameter approach instead of individual fields
- Update all callers to handle Option return with unwrap_or_default()
- Maintain backward compatibility for Optimism-specific logic
- Preserve original variable patterns to minimize diff
The Option return type indicates absence of EIP-1559 support (None = no base fee),
matching the pattern used in alloy-consensus crate.
e76da1c
3 days ago
by rezbera
0%
feat: store full headers in FeeHistoryEntry to eliminate database lookups
This change implements a performance optimization suggested in PR #16927 by storing
complete Header objects in FeeHistoryEntry instead of individual fields. This eliminates
the need for additional database header lookups when calculating next block base fees.
Key changes:
- Modified FeeHistoryEntry to store full Header instead of individual gas fields
- Updated FeeHistoryEntry::new() to accept any Block with BlockHeader (generic)
- Updated fee history construction to use stored headers directly
- Eliminated database lookup in fee calculation path (line 157-160 in fee.rs)
- Followed Reth patterns for direct field access over accessor methods
Performance impact:
- Eliminates one database query per fee history request
- Increases memory usage by ~720KB for typical cache (acceptable trade-off)
- Removes potential failure point from missing headers in database
Technical implementation:
- Single FeeHistoryEntry::new() method now handles all header types via BlockHeader trait
- Manual Header construction ensures compatibility across Ethereum, Optimism, and other chains
- Maintains full backward compatibility with existing API
9e94ca2
2 days ago
by rezbera
0%
feat: make FeeHistoryCache and FeeHistoryEntry generic over header type
Make both FeeHistoryCache<H> and FeeHistoryEntry<H> generic over header type H
to support different blockchain header implementations while maintaining
backward compatibility through default type parameters.
This enables alternative blockchain implementations (like Optimism, Polygon, BSC)
to use their own header types with custom fields while reusing the same fee
history infrastructure. The changes maintain type safety by ensuring cache
and entry types are compatible only when using the same header type.
Changes:
- FeeHistoryCache<H = Header> with generic header support
- FeeHistoryEntry<H = Header> with improved generic constructor
- Updated all trait definitions and implementations to use ProviderHeader<Provider>
- Added proper type constraints in builders to ensure header type consistency
- Maintained backward compatibility through default type parameters
e44ef72
2 days ago
by rezbera
-1%
Merge remote-tracking branch 'upstream/main' into basefee/centralize-with-rose