Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: separate trait for conversion into state provider #10858

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Sep 12, 2024

Towards #10797

Extracts conversion of DatabaseProvider into StateProviderBox into separate trait. This unblocks removal of concrete ProviderFactory usage in reth-blockchain-tree

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need this because we want to make BlockchainProvider generic over storage which is supposed to serve historicalstate.

This unblocks removal of concrete ProviderFactory usage in reth-blockchain-tree

about this, we'll remove this crate once we stabilized the new engine impl, so please don't focus to much on this.

but this trait is relevant regardless.

makes sense to me, @rkrasiuk for vis, pending @joshieDo

Comment on lines +145 to +146
impl<TX: DbTx + 'static> TryIntoHistoricalStateProvider for DatabaseProvider<TX> {
fn try_into_history_at_block(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah we need to consume this type here, hence this accepts self.

I believe this is special case because the blockchain-tree operates on the providerfactory directly.

@klkvr klkvr added this pull request to the merge queue Sep 13, 2024
Merged via the queue into main with commit 75c6295 Sep 13, 2024
35 checks passed
@klkvr klkvr deleted the klkvr/historical-state-trait branch September 13, 2024 17:17
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.

3 participants