152 Commits

Author SHA1 Message Date
Marvin Jones
fa569dab41 updates from main and ci 2026-05-21 14:22:09 -04:00
Marvin Jones
cf0ef6f3b8 Merge branch 'main' into marvin/pq-privacy-encryption
Binary artifact conflicts resolved by keeping branch versions (compiled
against the PQ codebase). All source conflicts auto-merged cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 14:06:23 -04:00
jonesmarvin8
694e484228
fix(nssa): audit 91 issue fix (#489)
* address audit-issue-91

* add privacy test version

* addressed comments
2026-05-21 09:00:27 -04:00
jonesmarvin8
8492f995df ci fixes 2026-05-20 16:36:24 -04:00
ygd58
94096bcdc6
fix(workspace): disable risc0-zkvm default features to avoid ring in guest builds
- Cargo.toml: add default-features = false to risc0-zkvm
- nssa/Cargo.toml: add explicit prove feature for ExecutorEnv/default_prover
- Regenerate artifacts

Fixes #468
2026-05-20 17:23:51 +02:00
Sergio Chouhy
58226fd0f7 fix test 2026-05-15 20:11:11 -03:00
Sergio Chouhy
57173cc140 make authorization propagate transitively through chain calls in the circuit like in the public execution 2026-05-15 17:24:24 -03:00
Daniil Polyakov
8c8f5b57af fixup! refactor: use faucet program to manage faucet account 2026-05-15 01:46:39 +03:00
Daniil Polyakov
ee5a98fc48 refactor: use faucet program to manage faucet account 2026-05-15 01:34:07 +03:00
Daniil Polyakov
9075f30f19 refactor: use system faucet and vaults to supply accounts from genesis
Co-authored-by: Copilot <copilot@github.com>
2026-05-15 01:34:01 +03:00
Daniil Polyakov
5f207a3f02 feat: move initial accounts data into genesis 2026-05-15 01:33:50 +03:00
moudyellaz
ba84ba60ce fix(privacy_preserving_circuit): refresh artifact 2026-05-14 23:45:52 +02:00
moudyellaz
3c8ff78319 merge: resolve conflicts with main 2026-05-14 18:40:49 +02:00
Sergio Chouhy
b3acd46f11 artifacts 2026-05-11 20:00:20 -03:00
Sergio Chouhy
355fe3842d rename program 2026-05-11 19:38:28 -03:00
Sergio Chouhy
927c24de68 Merge branch 'main' into schouhy/diversify-private-pdas-by-identifier 2026-05-11 18:57:44 -03:00
Sergio Chouhy
a9baf5d3dc rename progam 2026-05-11 17:09:46 -03:00
Sergio Chouhy
54c039f639 artifacts 2026-05-08 22:31:38 -03:00
Moudy
cf699fde7c refactor: rename private_pda_spender to auth_transfer_proxy 2026-05-08 18:18:40 +02:00
moudyellaz
06fd4fc12e fix: artifacts and deny
Refs: #454
2026-05-08 17:32:28 +02:00
Moudy
4e7963c655 feat: add dedicated sealing key for GMS distribution 2026-05-08 08:19:55 +02:00
moudyellaz
01eb4a58b8 fix(privacy_preserving_circuit): satisfy CI lints and refresh artifact for #454
Refs: #454
2026-05-07 21:23:35 +02:00
Sergio Chouhy
75ab606dcf artifacts 2026-05-07 15:28:00 -03:00
Sergio Chouhy
8f6a519f0e clippy 2026-05-07 13:45:51 -03:00
Sergio Chouhy
2d7d50646d add tests 2026-05-07 12:27:51 -03:00
Sergio Chouhy
d24931c643 refactor proxy program 2026-05-06 15:59:42 -03:00
Moudy
f73cd6738f refactor: delegate to auth-transfer, add shared account test 2026-05-06 14:22:50 +02:00
Sergio Chouhy
fb4ddb055a Merge branch 'main' into schouhy/diversify-private-pdas-by-identifier 2026-05-06 00:22:58 -03:00
Sergio Chouhy
1599fc655c add tests 2026-05-05 21:17:15 -03:00
Moudy
9e207450d6 fix: resolve merge conflicts with main 2026-05-05 12:37:54 +02:00
Sergio Chouhy
95afb2065d use privateaccuontkind in privacy circuit 2026-05-04 18:07:56 -03:00
Sergio Chouhy
dd4670ab2f encrypt privateaccountkind instead of identifier 2026-05-01 01:21:48 -03:00
Sergio Chouhy
8d9fa1224e remove fixed identifier for pdas 2026-05-01 00:26:38 -03:00
Sergio Chouhy
fb48c82717 add identifier to private pda formula 2026-05-01 00:06:23 -03:00
Moudy
8a8bac8b69 ci: address fmt-rs, lint, and unit-tests failures from the merge 2026-04-30 22:16:26 +02:00
Moudy
8517906025 Merge branch 'main' into moudy/feat-strong-type-circuit-input 2026-04-30 20:17:47 +02:00
Moudy
b9ceda98cf fix: rebuild artifacts 2026-04-30 16:04:48 +02:00
Moudy
98da9b26cc fix: address PR review feedback
- Rename PrivacyPreservingCircuitInputAccount to InputAccountIdentity (drop the PrivacyPreservingCircuit prefix; add Identity suffix)
- Rename PrivacyPreservingCircuitInput.accounts to account_identities
- Rename AccountManager.accounts() to account_identities() and loop variables to account_identity
- Drop legacy mask-1/2/3 references from variant doc comments and guest comments
- Remove the explanatory comments about deleted parallel-vec tests; moved to the PR description
- Rebake privacy_preserving_circuit and test program artifacts
2026-04-30 15:46:36 +02:00
Moudy
4c28133448 fix: resolve merge conflicts 2026-04-30 15:04:33 +02:00
Moudy
f375a35929 fix: address PR review feedback
- Add SealingPublicKey/SealingSecretKey type aliases for seal_for/unseal
- Generalize PrivateGroupPda to PrivatePda with pre-resolved keys
- Rename group_pda_spender to private_pda_spender
- Rename group_pda_accounts to pda_accounts with serde alias
- Remove unused storage_mut()
- Remove stale group_pda_router.bin artifact
2026-04-30 09:11:08 +02:00
Sergio Chouhy
18642f9b6c artifacts 2026-04-29 13:31:22 -03:00
Moudy
55a4a1d83b ci: fix fmt-rs, deny advisory, and rebake artifacts 2026-04-29 08:54:19 +02:00
Moudy
f7349656c7 refactor: strong-type PrivacyPreservingCircuitInput with per-account enum 2026-04-29 07:37:30 +02:00
Sergio Chouhy
924b30650c change pda reserved identifier 2026-04-27 18:45:19 -03:00
Moudy
9927e6e690 fix: rebuild artifacts 2026-04-27 14:37:15 +02:00
Moudy
636fc9dd30 fix: rebuild artifacts 2026-04-27 02:45:06 +02:00
Sergio Chouhy
85a6763490 artifacts 2026-04-24 19:31:13 -03:00
Sergio Chouhy
52992a124a fix identifier for pda 2026-04-24 17:04:40 -03:00
Moudy
e5b77a27d5 refactor: localize private_pda_npk_by_position and extract authorization helper
Addresses the following review comments from @Arjentix:

- "I think we can move this into `derive_from_outputs()`"
  (on the position → npk map construction in main())
  I moved the construction inside ExecutionState::derive_from_outputs
  and stored the map as a field of ExecutionState. derive_from_outputs
  now takes `private_account_keys` directly and builds the map as part
  of state initialization. main() no longer owns the intermediate
  structure. validate_and_sync_states reads the npk through
  self.private_pda_npk_by_position.

- "Let's move this whole `is_authorized` computation into a separate
  function. This became really bulky"
  I extracted the caller-seeds resolution, family-binding recording,
  and is_authorized computation into a free function
  `resolve_authorization_and_record_bindings`. It takes the three
  field borrows it needs (`&mut pda_family_binding`, `&mut
  private_pda_bound_positions`, `&private_pda_npk_by_position`), same
  shape as `assert_family_binding`. A method would have conflicted
  with the `&mut self.post_states` borrow held by the Occupied match
  arm; the free function lets rustc split-borrow the self fields.
2026-04-22 15:55:35 +02:00
Moudy
0183eac5cc refactor: unify PDA AccountId construction via AccountId::for_{public,private}_pda
Addresses the following review comment:

- "I think this should be a constructor `AccountId::for_private_pda`.
  Consider also removing the existing `impl From<(ProgramId, Seed)> for
  AccountId` for public pdas in favor of a `AccountId::for_public_pda`
  to have a unified way of constructing pdas"

I replaced `impl From<(&ProgramId, &PdaSeed)> for AccountId` with
`AccountId::for_public_pda(program_id: &ProgramId, seed: &PdaSeed) ->
Self` and replaced the free function `private_pda_account_id(...)`
with `AccountId::for_private_pda(program_id: &ProgramId, seed:
&PdaSeed, npk: &NullifierPublicKey) -> Self`. Both live in an inherent
`impl AccountId` block in nssa/core/src/program.rs next to the PDA
derivation logic. Migrated all call sites across nssa/core,
nssa/src/state.rs, nssa/src/validated_state_diff.rs,
program_methods/guest/src/bin/privacy_preserving_circuit.rs,
programs/amm/core, programs/associated_token_account/core, the example
tail-call binary, and the ATA tutorial doc. Test function names that
referenced the old free function were also renamed
(private_pda_account_id_* to for_private_pda_*).
2026-04-21 12:35:19 +02:00