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

feat: integrate BlockchainProvider2 in EthNodeLauncher #9754

Merged
merged 5 commits into from
Jul 24, 2024

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Jul 24, 2024

Closes: #9731

There were some references to the concrete type BlockchainProvider in the launcher types, this is now generic over T::Provider.

Also, in the with_blockchain_db method, we need to instantiate the concrete blockchain provider, and the constructors are different for BlockchainProvider and BlockchainProvider2, the latter doesn't take a TreeViewer. Now this is implemented with a closure and the need to create a tree instance outside the ctx methods, once the migration is done this will be simplified.

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.

cool, this makes sense,
the helper trait will go away eventually, for now this is appropriate

the last thing missing here are type hints for

let _builder = NodeBuilder::new(config)
| ____________________^
47 | | .with_database(db)
48 | | .with_types::()

because default is still the regular provider

@mattsse mattsse added the C-enhancement New feature or request label Jul 24, 2024
@fgimenez
Copy link
Member Author

the helper trait will go away eventually, for now this is appropriate

yep, I've added some comments to keep it in mind 264f027

the last thing missing here are type hints for

i've added a call to with_types_and_provider specifying the right provider to use, is that enough? f9332ea

@mattsse
Copy link
Collaborator

mattsse commented Jul 24, 2024

i've added a call to with_types_and_provider specifying the right provider to use, is that enough?

cool, yeah this should do it for now

@fgimenez fgimenez enabled auto-merge July 24, 2024 11:13
@fgimenez fgimenez added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit 5616b4e Jul 24, 2024
33 checks passed
@fgimenez fgimenez deleted the fgimenez/blockchain-provider2-ethnodelauncher branch July 24, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate blockchainprovider2 in ethnodelauncher
2 participants