-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(provider): add BlockchainProvider3
with only one view
#11706
Conversation
e4520b9
to
2539f1d
Compare
9e4b59e
to
6482f4a
Compare
provider.canonical_in_memory_state.update_chain(chain); | ||
let provider = provider_factory.provider3()?; | ||
|
||
// Now the block should be found in memory | ||
assert_eq!( | ||
provider.find_block_by_hash(first_in_mem_block.hash(), BlockSource::Any)?, | ||
Some(first_in_mem_block.clone().into()) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notice that we need to instantiate a provider again to get the new in-memory view, otherwise this fails
44c05b9
to
3dcc92b
Compare
654d5d6
to
7f77e27
Compare
646d376
to
a7c7d9a
Compare
ad1c031
to
a15f656
Compare
35c24da
to
8f73bba
Compare
63d7d06
to
a1dad36
Compare
83b942d
to
3d619e9
Compare
storage_provider: <ProviderFactory<N> as DatabaseProviderFactory>::Provider, | ||
/// Storage provider factory. Necessary for `StateProviderFactory` since it takes ownership of | ||
/// a read tx. | ||
storage_provider_factory: ProviderFactory<N>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
factory goes away in #11778
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit lost now.
what impact does this have on consumers that currently rely on all the provider traits, which type will be used there then?
on top of #11705
BP3
and replaceBP2
BP3
holds aDatabaseProvider
with aDbTx
and a headBlockState
.CanonChainTracker
,CanonStateSubscriptions
andForkChoiceSubscriptions
fromBP3
. Should be called fromBPF
https://github.com/paradigmxyz/reth/actions/runs/11377134508