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

L2 sync: Parallel fetching of blocks, classes, state updates #15

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

cchudant
Copy link
Member

What is the current behavior?

  • Blocks are fetched from the sequencer sequentially.

What is the new behavior?

  • L2 sync fetching of blocks, classes, state updates is now parallel.

Does this introduce a breaking change?

N/A (project is in alpha)

Other information

  • Usage of futures stream buffered() for parallel fetching,
  • Error handling is still a mess, but I've started moving to thiserror-based error handling. I am not opposed to use anyhow instead, but I feel like thiserror is more appropriate here.
  • verify_l2 is sync and takes a long time, so I have put it in a tokio blocking task (see https://docs.rs/tokio/latest/tokio/index.html#cpu-bound-tasks-and-blocking-code)
  • Rate limits could be handled better

@Trantorian1
Copy link
Collaborator

Don't forget to update CHANGELOG.md with a short description of the changes made, as well as linting the project (you can use ./scripts/deoxys lint for that purpose)

@antiyro antiyro merged commit b1dad99 into madara-alliance:main Mar 15, 2024
6 checks passed
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.

3 participants