Skip to content

Conversation

@mverzilli
Copy link
Contributor

@mverzilli mverzilli commented Dec 22, 2025

Moves the responsibility of deciding when to trigger a contract sync from Aztec.nr to PXE.

  • Removes generated calls to trigger message discovery from Aztec.nr
  • Adds invocations to sync_private_state from PXE at a few key points: before running a private function, before running a nested private function, before running a utility function
  • Adds guardrails to prevent sync_private_state from being invoke unless it's from PXE itself, to ensure consistent and controlled synchronization

Closes F-162

@mverzilli mverzilli added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Dec 22, 2025
@AztecBot AztecBot force-pushed the martin/refactor-pxe-oracle-interface-away branch 2 times, most recently from 237ef24 to 1c4f126 Compare December 22, 2025 16:44
Base automatically changed from martin/refactor-pxe-oracle-interface-away to next December 22, 2025 17:18
Comment on lines -123 to -126
// 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.
Copy link
Contributor Author

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

Copy link
Contributor Author

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

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

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants