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

fix: Fix race condition between RPC Server and Aztec Node #1700

Merged
merged 23 commits into from
Aug 22, 2023

Conversation

PhilWindle
Copy link
Collaborator

@PhilWindle PhilWindle commented Aug 21, 2023

This PR introduces the following changes:

  1. Refactored the way in which the world-state syncs it's blocks from the configured block source.
  2. When the world state is accessed, the node first checks to see if it is in sync. If not then it performs an immediate sync to bring it up to the latest state.

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@PhilWindle PhilWindle marked this pull request as ready for review August 21, 2023 17:05
@PhilWindle PhilWindle requested a review from spalladino August 21, 2023 17:21
@PhilWindle
Copy link
Collaborator Author

@spalladino Would appreciate your review of this one please. Thanks.

@PhilWindle PhilWindle changed the title Attempt to force sync world sate Fix race condition between RPC Server and Aztec Node Aug 22, 2023
@PhilWindle PhilWindle changed the title Fix race condition between RPC Server and Aztec Node fix: Fix race condition between RPC Server and Aztec Node Aug 22, 2023
Copy link
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just found some typos.

Copy link
Collaborator

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

yarn-project/aztec-node/src/aztec-node/server.ts Outdated Show resolved Hide resolved
Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com>
@PhilWindle PhilWindle enabled auto-merge (squash) August 22, 2023 17:36
@PhilWindle PhilWindle merged commit 4c89941 into master Aug 22, 2023
@PhilWindle PhilWindle deleted the pw/aztec-node-block-height branch August 22, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants