forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 10
Add live trie node collector #169
Copy link
Copy link
Closed
Labels
A-exexArea: execution extensionArea: execution extensionK-featureKind: featureKind: featureW-historical-proofsWorkstream: historical-proofsWorkstream: historical-proofs
Description
Describe the feature
When we get a new block in the ExEx through the ChainCommitted event, we can check that the latest state provider is 0-1 blocks away from the block being added.
If it is, we can efficiently calculate the state root by getting the hashed post state from the block, and applying that to the state of the parent block. Example: https://github.com/meyer9/proof-helper/blob/e398f0b31707b6ae2d25096c9c826a7412a006c5/src/main.rs#L366
The hashed post state are the changed leaf nodes and the trie updates are the changed trie nodes. We can store these to the database under the block number that changed them.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-exexArea: execution extensionArea: execution extensionK-featureKind: featureKind: featureW-historical-proofsWorkstream: historical-proofsWorkstream: historical-proofs
Type
Projects
Status
Done