You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: reuse reth default_ethereum_payload for Ethereum - #99
The reason will be displayed to describe this comment to others. Learn more.
I guess this works but it would be better to not have to store the factory in the block context. We already have all the information we need in the base state to build the payload.
But if there's no other easy ways to do it then this is good!
@julio4 One other approach is to wrap the base_state provider in a StateProviderFactory + ChainSpecProvider wrapper right before calling default_ethereum_payload so we don’t have to carry the factory around. The tradeoff is increased surface area inside ethereum module since we need to maintain implementations for StateProviderFactory (latest, pending etc)
@julio4 One other approach is to wrap the base_state provider in a StateProviderFactory + ChainSpecProvider wrapper right before calling default_ethereum_payload so we don’t have to carry the factory around. The tradeoff is increased surface area inside ethereum module since we need to maintain implementations for StateProviderFactory (latest, pending etc)
Yes agree, I tried this before but wasn't convinced. I think your solution looks nice for the time being!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #76.
Notable changes
build_payloadAPIs so builders can fetch parent-scoped state correctly.pub type ProviderFactory<P> = Arc<dyn traits::ProviderFactoryBounds<P>>to standardize the factory type across call sites.state_by_block_hashlookup intoBlockContext::newso payload construction always uses the parent block’s state.