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(l1): implement TrieIterator + GetAccountRange snap request handling logic #960

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Oct 23, 2024

Motivation
Handling snap capability message GetAccountRange

Description

  • Add functionality to iterate the Trie (TrieIterator)
  • Add functionality to iterate over all accounts in the state (Store::iter_accounts)
  • Add logic to handle GetAccountRange snap request
  • Fix slim encoding of AccountState
  • Remove unneeded trait RLPEncodeSlim

Notes

  • We don't have the listen loop implemented so this PR only adds the standalone logic for handling the request and creating a response, we still need to plug it in to the main loop.
  • We are not able to run the hive test suite due to missing listen loop + old blocks being used by the test suite. I instead copied the state from a Geth execution (loading genesis + importing chain) and used that state to replicate hive tests as unit tests. These tests could be removed once we fix those two problems

Partially addresses #184

@fmoletta fmoletta changed the title feat(l1): implement TrieIterator + GetAccountRange snap request handling [WIP] feat(l1): implement TrieIterator + GetAccountRange snap request handling logic Oct 24, 2024
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

Successfully merging this pull request may close these issues.

1 participant