fix!: protocol fixes

BREAKING CHANGE
  - Nonce init (PrivateAuthorizedInit): the initial nonce for PrivateAuthorizedInit accounts was incorrectly computed. Privacy preserving circuit code changed, as well as its id.
  - Authorization bidirectional check: programs must now set is_authorized = true for every authorized account in pre-states, not just avoid marking unauthorized ones as authorized.
  - Authorization in chained calls: authorized-account set is now the union across the call chain instead of being reset at each hop.
This commit is contained in:
Sergio Chouhy
2026-05-29 02:08:14 -03:00
parent 84bda7be34
commit 48da4b5119
46 changed files with 34 additions and 9 deletions
@@ -62,7 +62,7 @@ pub fn compute_circuit_output(
Nullifier::for_account_initialization(&account_id),
DUMMY_COMMITMENT_HASH,
);
let new_nonce = pre_state.account.nonce.private_account_nonce_increment(nsk);
let new_nonce = Nonce::private_account_nonce_init(&account_id);
emit_private_output(
&mut output,