Skip to content

Optimize transaction processing via encoded-tx trie root and fast block re-encode#10436

Closed
Copilot wants to merge 1 commit intotx-rootfrom
copilot/sub-pr-10435
Closed

Optimize transaction processing via encoded-tx trie root and fast block re-encode#10436
Copilot wants to merge 1 commit intotx-rootfrom
copilot/sub-pr-10435

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

Changes

Avoid redundant RLP encoding in transaction processing hot paths:

  • Encoded transaction trie root: TxTrie.CalculateRoot(ReadOnlySpan<byte[]>) computes trie root directly from RLP-encoded transactions. ExecutionPayload.TryGetBlock uses this to avoid re-encoding transactions already provided by CL.

  • Fast block re-encode: Block.EncodedTransactions caches pre-encoded transaction bytes in SkipTypedWrapping format. BlockDecoder.Encode reuses these when available, avoiding re-encoding during block serialization. Handles legacy/typed transaction format differences correctly.

  • Trie parallelization: Branch node RLP encoding now parallelizes only when ≥4 non-null children exist, reducing overhead on sparse branches.

Types of changes

  • Optimization
  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Tests verify encoded and decoded paths produce identical trie roots and block RLP.

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add encoded transactions root calculation and trie decode performance Optimize transaction processing via encoded-tx trie root and fast block re-encode Feb 7, 2026
Copilot AI requested a review from benaadams February 7, 2026 07:38
@benaadams benaadams closed this Feb 7, 2026
@benaadams benaadams deleted the copilot/sub-pr-10435 branch February 7, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants