Conversation
DaniPopes
reviewed
Jun 17, 2025
This was referenced Jul 6, 2025
This was referenced Jul 8, 2025
3 tasks
ZanCorDX
added a commit
to flashbots/rbuilder
that referenced
this pull request
Sep 3, 2025
## 📝 Summary Changes for Fusaka fork: - Had to upgrade to rust 1.88: lint hell. - alloy/nybbles: alloy-rs/nybbles#17 updates the internal representation of Nibble from a SmallVec<[u8; 64]> to a U256. This breaks code in the merkle eth sparse tree as the code indexes a lot into the SmallVec representation. For this version we kept the sparse tree internals and adapted the on the interface (we have deps in both nibble versions). - New Eip7594 blobs: This blobs have more profs so now we use BlobTransactionSidecarVariant instead of BlobTransactionSidecar. BlobTransactionSidecarVariant can model the old blob (BlobTransactionSidecar) and the new one (BlobTransactionSidecarEip7594). - revm changed BlockNumber and Timestamp from U256 instead of u64. We convert internally to 64 since it's more compatible with the rest. - Minor traits changes on reth. - New relay SignedBidSubmissionV5 with new BlobsBundleV2. - New rlp block encoding limiting as specified by EIP-7934. - Order filter to avoid mix of blob types before and after the fork. Thanks @bharath-123 for the help! ## ✅ I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable)
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.
Summary
This PR refactors the internal representation of
NibblesfromSmallVec<[u8; 64]>(storing one nibble per byte) toU256(storing two nibbles per byte). This gives 2x savings in memory and performance improvements in most of the methods.Details
Representation Change
SmallVec<[u8; 64]>storing one nibble per byte (4 bits used, 4 bits wasted). Nibbles[1, 2]are stored as0x0102.U256storing nibbles packed in their natural 4-bit representation. Nibbles[1, 2]are stored as0x12.[1, 2]are stored as0x12...0, not0x0...12.Breaking Changes
This is a breaking change due to:
Derefimplementation and direct slice accessserdeserialization formatBenchmarking
See benchmark results on CodSpeed.
When integrated in Reth,
newPayloadlatency is decreased by 5-10%