-
Notifications
You must be signed in to change notification settings - Fork 759
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
Make sense of get
/set
/has
-stateRoot
#3546
Comments
My idea here would be to remove all those methods from |
Yeah, that's really a tricky one. I first thought, yeah, going to Trie directly might be a good option (since these things are trie specific - at least if named "as is"). But if one searches for Maybe somewhat from another perspective, what are these things when seen from the
|
With the work being done in #3543, we have refactored the
StateManagerInterface
to make certain functions optional (getProof
) in State Managers that do not support them so we have a single unified StateManager interface for all implementations that maintains the core features necessary for interacting with Ethereum state (read/write accounts/storage). The current interface also hasgetStateRoot
/setStateRoot
/hasStateRoot
which really only apply to theDefaultStatemanager
and some hopefully futureStatefulVerkleStateManager
implementations since you only need the state root when validating whole state transitions (i.e. blocks or maybe transactions). So, you only need access to a valid state root if you are interacting with theVM
class doing the full work of maintaining an Ethereum chain with a stateful client sort of interface.There was a time when we dreamed of the
RPCStateManager
being able to run blocks and validate state roots but there are inherent issues with the MPT that make this impossible if you don't already know the full state locally.So, the question is, do we need to have these stateRoot getter/setter functions in the State Manager interface and explore how a statemanager which doesn't maintain the full Ethereum state on disk should expose a state Root so the
vm
package can use some of the alternative implementation? TheRPCStateManager
can already run blocks so it would seem not. Will need to research more to decide.The text was updated successfully, but these errors were encountered: