Skip to content

revert: undo Chain crate, add LazyTrieData to trie-common#21154

Closed
mattsse wants to merge 0 commit intomainfrom
mattsse/revert-21137
Closed

revert: undo Chain crate, add LazyTrieData to trie-common#21154
mattsse wants to merge 0 commit intomainfrom
mattsse/revert-21137

Conversation

@mattsse
Copy link
Collaborator

@mattsse mattsse commented Jan 17, 2026

Summary

This PR reverts #21137 (the reth-chain crate) and adds the useful LazyTrieData/SortedTrieData types directly to reth-trie-common.

Why revert #21137?

The reth-chain crate introduced unnecessary complexity:

  • Moved Chain from execution-types to a new crate
  • Moved DeferredTrieData from chain-state to the new crate
  • Added complex lazy evaluation that wasn't needed for most use cases
  • Created circular dependency concerns

What this PR does

  1. Reverts to before perf: make Chain use DeferredTrieData #21137 - Chain stays in execution-types with its original API
  2. Adds LazyTrieData and SortedTrieData to reth-trie-common - the useful types from the refactor, without the crate restructuring

The new types in reth-trie-common:

  • SortedTrieData: Container bundling HashedPostStateSorted + TrieUpdatesSorted
  • LazyTrieData: No-std compatible lazy wrapper with ready/deferred modes

These can be used in future optimizations without the architectural overhead of a separate crate.

@mattsse mattsse added the A-trie Related to Merkle Patricia Trie implementation label Jan 17, 2026
@github-project-automation github-project-automation bot moved this to Backlog in Reth Tracker Jan 17, 2026
@mattsse mattsse closed this Jan 17, 2026
@mattsse mattsse force-pushed the mattsse/revert-21137 branch from 675c701 to 6bf43ab Compare January 17, 2026 04:28
@github-project-automation github-project-automation bot moved this from Backlog to Done in Reth Tracker Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-trie Related to Merkle Patricia Trie implementation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant