Blockchain Provider tree state integration #8747
Labels
A-blockchain-tree
Related to sidechains, reorgs and pending blocks
C-debt
Refactor of code section that is hard to understand or maintain
Blocked by #8745
The
BlockchainProvider
providers all provider trait impls and is responsible for fetching requested data such as blocksCurrently this supports access to the blockchaintree:
reth/crates/storage/provider/src/providers/mod.rs
Lines 72 to 73 in 892d5dd
with #8745 we need to give it access to the in memory state as well.
we need to track:
Ideally this is some kind of
Arc<Rwlock
where the internals track the height -> State and state includes block+receipts+state after the block.this should be an object safe trait that gives access to the in memory blocks and state, the tree service will populate this type with the canonical chain after FCU and is effectively something like
very similar to what we have in anvil:
https://github.com/foundry-rs/foundry/blob/82ff8ee338818e6a6dc356e4c72ab72d31965375/crates/anvil/src/eth/backend/mem/storage.rs#L212-L230
TODO
The text was updated successfully, but these errors were encountered: