Function do_sync_state
pub unconstrained fn do_sync_state<ComputeNoteHashAndNullifierEnv, CustomMessageHandlerEnv>(
contract_address: AztecAddress,
compute_note_hash_and_nullifier: ComputeNoteHashAndNullifier<ComputeNoteHashAndNullifierEnv>,
process_custom_message: Option<CustomMessageHandler<CustomMessageHandlerEnv>>,
)
Synchronizes the contract's private state with the network.
As blocks are mined, it is possible for a contract's private state to change (e.g. with new notes being created), but because these changes are private they will be invisible to most actors. This is the function that processes new transactions in order to discover new notes, events, and other kinds of private state changes.
The private state will be synchronized up to the block that will be used for private transactions (i.e. the anchor block. This will typically be close to the tip of the chain.