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

update StorageState to load storage value from database if trie is not cached #1354

Closed
noot opened this issue Feb 3, 2021 · 0 comments
Closed
Assignees

Comments

@noot
Copy link
Contributor

noot commented Feb 3, 2021

Task summary

  • for state rpc functions, we may wish to retrieve storage at a previous block that isn't cached in the StorageState
  • currently the function only returns values that are cached in the trie map in StorageState
  • in this case, we should fetch the value from the database using the given root hash
  • eg: StorageState.GetStorage(someStorageRoot, somekey) should call trie.GetFromDB(storageState.db, someStorageRoot, somekey)
  • same for other StorageState functions that may access previous states
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

No branches or pull requests

3 participants