Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1811 +/- ##
=======================================
Coverage 98.23% 98.23%
=======================================
Files 186 186
Lines 17192 17254 +62
Branches 3963 3997 +34
=======================================
+ Hits 16888 16950 +62
Misses 235 235
Partials 69 69
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
chfast
force-pushed
the
rlp-length-prefix
branch
from
November 10, 2026 09:58
49d984b to
e5ebf98
Compare
The RLP encoder wrote at most 3 length bytes and asserted that the payload is at most 0xffffff bytes. Encoding a longer list, e.g. the block access list of a block with a large gas limit in BlockAccessList::hash(), aborted in debug builds and produced a wrong prefix with NDEBUG. Add the 4-byte length case. This raises the limit to 4 GiB.
Compute the RLP length prefix (the base byte and up to 7 big-endian length bytes) left-aligned in a 64-bit word. This raises the length limit to 2^56-1 bytes. Then build the encoding in a single string: store the prefix word with a single 8-byte store, shrink the string to the prefix length and append the payload into the reserved space. This replaces concatenating a separate prefix string with the payload, which cost an extra string construction and copy.
chfast
force-pushed
the
rlp-length-prefix
branch
from
November 10, 2026 17:41
e5ebf98 to
ebcd98b
Compare
This branch has not been deployed
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.
Compute the RLP length prefix (the base byte and up to 7 big-endian
length bytes) left-aligned in a 64-bit word. This raises the length
limit to 2^56-1 bytes. Then build the encoding in a single string:
store the prefix word with a single 8-byte store, shrink the string to
the prefix length and append the payload into the reserved space. This
replaces concatenating a separate prefix string with the payload,
which cost an extra string construction and copy.
Stacked on #1807 (the first commit).