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

Client: implement state downloading #987

Closed
vpulim opened this issue Dec 6, 2018 · 7 comments
Closed

Client: implement state downloading #987

vpulim opened this issue Dec 6, 2018 · 7 comments

Comments

@vpulim
Copy link
Contributor

vpulim commented Dec 6, 2018

In order to perform a fast sync, we must implement the ability to recursively download a complete recent state trie. We can do this by querying peers for trie nodes and their children starting from the state root using the GetNodeData message of the ETH wire protocol.

@aunyks
Copy link
Contributor

aunyks commented Dec 14, 2018

Has someone claimed this?

@vpulim
Copy link
Contributor Author

vpulim commented Dec 14, 2018

@aunyks I was planning on taking this on next, but wanted to do some re-factoring of the sync/fetcher classes in preparation. State download will be much easier after the refactor. If you’d like to claim this, would you mind waiting until next week after I committed the refactor changes?

@aunyks
Copy link
Contributor

aunyks commented Dec 14, 2018

Of course!

@vpulim
Copy link
Contributor Author

vpulim commented Dec 14, 2018

Cool, thanks

@vpulim
Copy link
Contributor Author

vpulim commented Dec 29, 2018

@aunyks Thanks for your patience. The refactor is done (ethereumjs/ethereumjs-client#85) so feel free to work on the state downloader. You should be able to subclass either Fetcher or BlockFetcher to implement a new StateFetcher class. Since state fetching will need to walk the state tree when fetching, I think the best approach is to add a single task containing the root node in the tasks() method and to make a call to enqueue() in the process() method to enqueue each of the children once a node is downloaded.

@aunyks
Copy link
Contributor

aunyks commented Jan 13, 2019

@vpulim School just started for me recently so it could be a while before I get a lot of work on this. Since the priority is high, I'd recommend someone else to work on it as well. If that's not very efficient I can also give up the task if needed.

@cgewecke cgewecke self-assigned this Jun 9, 2020
@holgerd77 holgerd77 transferred this issue from ethereumjs/ethereumjs-client Dec 4, 2020
@holgerd77 holgerd77 changed the title Implement state downloading Client: implement state downloading Dec 4, 2020
@holgerd77
Copy link
Member

Superseeded by #1848 (implementation not yet done), will close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants