-
Notifications
You must be signed in to change notification settings - Fork 575
refactor(PXE): sync from PXE instead of from contracts #19193
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
base: next
Are you sure you want to change the base?
Conversation
237ef24 to
1c4f126
Compare
| // All private functions perform message discovery, since they may need to access notes. This is slightly | ||
| // inefficient and could be improved by only doing it once we actually attempt to read any. Note that the message | ||
| // discovery call syncs private events as well. We do not sync those here if there are no notes because we don't | ||
| // have an API that would access events from private functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: check that we're fine not handling this case with this new implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked: this is indeed an optimization, if the contract doesn't have any notes, discovery isn't necessary. We should discuss if it's worth keeping it now that we control this process from TS world
Moves the responsibility of deciding when to trigger a contract sync from Aztec.nr to PXE.
sync_private_statefrom PXE at a few key points: before running a private function, before running a nested private function, before running a utility functionsync_private_statefrom being invoke unless it's from PXE itself, to ensure consistent and controlled synchronizationCloses F-162