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
Moudy
d3577f02bc
fix: reject multiple family members under same (program, seed) in one tx
2026-04-17 15:36:20 +02:00
Moudy
f9a5a7635e
refactor: make programs privacy-agnostic in the privacy circuit
2026-04-17 07:29:40 +02:00
Moudy
4b09aae852
fix: doc backticks and rebuild artifacts
2026-04-16 19:26:27 +02:00
Moudy
bbb0aae17a
fix: rebuild artifacts
2026-04-16 19:02:54 +02:00
Moudy
93c6921eaf
Merge remote-tracking branch 'origin/main' into moudy/feat-private-pdas
...
# Conflicts:
# artifacts/program_methods/amm.bin
# artifacts/program_methods/associated_token_account.bin
# artifacts/program_methods/authenticated_transfer.bin
# artifacts/program_methods/clock.bin
# artifacts/program_methods/pinata.bin
# artifacts/program_methods/pinata_token.bin
# artifacts/program_methods/privacy_preserving_circuit.bin
# artifacts/program_methods/token.bin
# artifacts/test_program_methods/burner.bin
# artifacts/test_program_methods/chain_caller.bin
# artifacts/test_program_methods/changer_claimer.bin
# artifacts/test_program_methods/claimer.bin
# artifacts/test_program_methods/clock_chain_caller.bin
# artifacts/test_program_methods/data_changer.bin
# artifacts/test_program_methods/extra_output.bin
# artifacts/test_program_methods/flash_swap_callback.bin
# artifacts/test_program_methods/flash_swap_initiator.bin
# artifacts/test_program_methods/malicious_authorization_changer.bin
# artifacts/test_program_methods/malicious_caller_program_id.bin
# artifacts/test_program_methods/malicious_self_program_id.bin
# artifacts/test_program_methods/minter.bin
# artifacts/test_program_methods/missing_output.bin
# artifacts/test_program_methods/modified_transfer.bin
# artifacts/test_program_methods/nonce_changer.bin
# artifacts/test_program_methods/noop.bin
# artifacts/test_program_methods/pinata_cooldown.bin
# artifacts/test_program_methods/program_owner_changer.bin
# artifacts/test_program_methods/simple_balance_transfer.bin
# artifacts/test_program_methods/time_locked_transfer.bin
# artifacts/test_program_methods/validity_window.bin
# artifacts/test_program_methods/validity_window_chain_caller.bin
# nssa/core/src/program.rs
# nssa/src/state.rs
2026-04-16 18:25:57 +02:00
Moudy
f1b2c04f3d
fix: rebuild artifacts
2026-04-16 17:38:41 +02:00
Moudy
661ef7c4e9
fix: rebuild artifacts
2026-04-16 16:54:02 +02:00
Moudy
4bdb1e7a22
fix: rebuild artifacts for CI
2026-04-15 21:31:33 +02:00
Moudy
b0c10ee5a2
fix: cargo fmt, add #[must_use] to private_pda_account_id, rebuild artifacts
2026-04-15 21:10:22 +02:00
Daniil Polyakov
699e91363e
feat: introduce more descriptive error messages for public execution
2026-04-13 21:25:18 +03:00
Moudy
56ee93b5b7
merge main into feat-caller-program-id-and-flash-swap
2026-04-07 19:44:55 +02:00
Moudy
b22a989fbc
merge main into feat-caller-program-id-and-flash-swap
2026-04-07 19:27:27 +02:00
Sergio Chouhy
34de497d4d
add test
2026-04-03 18:44:28 -03:00
Sergio Chouhy
4d5010f044
Merge branch 'main' into schouhy/add-block-context-system-accounts
2026-04-02 19:48:55 -03:00
Sergio Chouhy
b525447e2d
refactor so that indexer checks clock constraints
2026-04-02 18:30:10 -03:00
Sergio Chouhy
29d66d2c2d
small refactor
2026-04-02 17:40:58 -03:00
Sergio Chouhy
3c5a1c9d0a
Merge branch 'main' into schouhy/add-block-context-system-accounts
2026-03-31 20:53:10 -03:00
Sergio Chouhy
867d8dac90
artifacts
2026-03-31 01:57:57 -03:00
Sergio Chouhy
d8ffa22b81
add more clock accounts
2026-03-31 01:39:02 -03:00
Sergio Chouhy
7078e403ed
add timestamp to clock
2026-03-30 23:50:54 -03:00
Sergio Chouhy
3324bcf391
add sequencer checks
2026-03-25 20:02:13 -03:00
Sergio Chouhy
79d70b3a66
add test for empty intersection in circuit
2026-03-25 17:33:27 -03:00