2358 Commits

Author SHA1 Message Date
Moudy
00cae12d41 docs: drop "wallet" references from nssa crate
Addresses the following review comments:

- "I'd keep this crate independent of wallet references"
  I replaced all with "supplied npk".

- Rename request on locals attested_keys/wallet_keys
  In mask_3_wallet_npk_mismatch_panics the two key sets play distinct
  roles, one produces the pre_state's account_id (the registered pair)
  and the other is supplied in private_account_keys as the mismatched
  npk. Collapsing both to `keys` would be misleading. I renamed to
  keys_a and keys_b with an inline comment noting which one is the
  registered one and which one is mismatched.
2026-04-21 01:02:22 +02:00
Moudy
34f8b6cac8 docs: split miscoupled private-PDA test docs and clean phrasing
Addresses the following review comments:

- "Isn't two_mask_3_claims_under_same_seed_are_rejected already checking
  that there's a mechanism protecting against this exploit scenario?"
  The doc block at nssa/src/state.rs:2488-2504 mixes three paragraphs,
  one about reuse, one TODO about wallet side input, one exploit pin,
  all attached to two_mask_3_claims_under_same_seed_are_rejected. The
  reuse test below it had no doc at all. I split as follows: the
  exploit-pin paragraph stays on two_mask_3_claims_..., the reuse
  paragraph moves to a fresh docstring on
  mask_3_reuse_across_txs_currently_unsupported.

- "I don't understand this. I think this should fail because ... the
  input pre_state which is marked with is_authorized=true will make
  things fail."
  The reuse test's new docstring cites the actual reject site, the
  post-loop private_pda_bound_positions assertion in
  privacy_preserving_circuit.rs:185-192. At top level the Entry::Vacant
  arm accepts is_authorized=true unconditionally, the rejection comes
  from the bound-positions check firing because noop emits no Claim::Pda
  and there is no caller ChainedCall.pda_seeds.

- "let's dont have this TODO as part of the doc"
  The block is moved out into regular // comments immediately above
  mask_3_reuse_across_txs_currently_unsupported.

- "let's not add implementation details to docs"
  In caller_pda_seeds_authorize_mask_3_private_pda_for_callee's
  docstring, I dropped the parenthetical "(Occupied branch)" and the
  trailing sentence about which validate_and_sync_states code path gets
  exercised.

- "what does \`Claim::Pda(seed)\` / \`pda_seeds\` mean?"
  I rewrote the pda_family_binding docstring at
  privacy_preserving_circuit.rs:33-39: replaced the ambiguous
  "Claim::PrivatePda and ChainedCall's private seeds into plain
  Claim::Pda(seed) / pda_seeds" phrase with "a Claim::Pda(seed) in a
  program's post_state or a caller's ChainedCall.pda_seeds entry".

- Suggestion on nssa/src/validated_state_diff.rs:226 rewriting
  "The public-execution path only sees mask-0 accounts" to
  "The public-execution path only sees public accounts".
  Applied: "The public-execution path only sees public accounts".

- Clarification requested on the private_pda_bound_positions field:
  I expanded the docstring at privacy_preserving_circuit.rs:26-31 to
  state that binding is an idempotent property, not an event, and to
  enumerate the two proof paths that populate it (a Claim::Pda on a
  mask-3 pre_state, or a caller's pda_seeds matching under the private
  derivation).
2026-04-21 00:37:06 +02:00
Moudy
9e4e546c9e ci: reduce debug info in dev/test profiles to avoid LLD OOM 2026-04-17 16:10:20 +02:00
Moudy
d5f97c3de4 fix: rebuild artifacts 2026-04-17 15:38:50 +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
48478ca21e fix: rebuild artifacts 2026-04-16 20:12:39 +02:00
Moudy
ca5f421188 fix: add private_pda_seeds to ChainedCall literals in example guests 2026-04-16 19:41:26 +02:00
Moudy
4b09aae852 fix: doc backticks and rebuild artifacts 2026-04-16 19:26:27 +02:00
Moudy
390bf59660 fix: nightly fmt 2026-04-16 19:11:46 +02:00
Moudy
d1fd6fe945 fix: clippy issue 2026-04-16 19:07:27 +02:00
Moudy
bbb0aae17a fix: rebuild artifacts 2026-04-16 19:02:54 +02:00
Moudy
ba93ec6f3e fix: clippy issue 2026-04-16 19:00:11 +02:00
Moudy
8da04ac898 fix: nightly fmt 2026-04-16 18:45:19 +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
ac09e785a9 fix: rebuild artifacts 2026-04-16 18:07:46 +02:00
Moudy
526c3cd978 test: add private PDA circuit tests and two guest programs 2026-04-16 18:07:32 +02:00
Moudy
f1b2c04f3d fix: rebuild artifacts 2026-04-16 17:38:41 +02:00
Moudy
1fd4e4e8d9 test: pin private_pda_account_id formula against hardcoded value 2026-04-16 17:15:34 +02:00
Moudy
661ef7c4e9 fix: rebuild artifacts 2026-04-16 16:54:02 +02:00
Moudy
bda21fb5c5 refactor: move private PDA npk into proven ChainedCall and Claim 2026-04-16 16:53:54 +02:00
Daniil Polyakov
c6f8890473
Merge pull request #433 from logos-blockchain/arjentix/descriptive-invalid-program-behavior-error
feat: introduce more descriptive error messages for public execution
v0.2.0-rc2
2026-04-16 02:51:21 +03:00
Moudy
e08c8f93b4 fix: rebuild artifacts 2026-04-16 00:23:08 +02:00
Moudy
b1553109ae fix: validate no duplicate entries in private_pda_info 2026-04-16 00:01:25 +02:00
Moudy
8b9cc5accf fix: rebuild artifacts 2026-04-15 23:29:13 +02:00
Moudy
a27da19a45 fix: nightly fmt 2026-04-15 22:10:02 +02:00
Moudy
40a1227871 fix: clippy lint issues 2026-04-15 22:08:26 +02:00
Moudy
4bdb1e7a22 fix: rebuild artifacts for CI 2026-04-15 21:31:33 +02:00
Moudy
47843eaa3e fix: nightly fmt and clippy issues (item ordering, doc backticks, integer suffix) 2026-04-15 21:10:22 +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
Moudy
7e63f9ddcd test: add unit tests for private PDA AccountId derivation and compute_authorized_pdas 2026-04-15 21:10:21 +02:00
Moudy
cee9608ea7 feat: enable PDA claim verification for private PDA accounts 2026-04-15 21:10:21 +02:00
Moudy
308e1ebebf feat: add mask 3 branch in compute_circuit_output for private PDAs 2026-04-15 21:10:21 +02:00
Moudy
10b26ca223 feat: thread private_pda_info through the privacy circuit and extend compute_authorized_pdas 2026-04-15 21:10:21 +02:00
Moudy
3b78462e2d feat: add private_pda_info field to PrivacyPreservingCircuitInput 2026-04-15 21:10:21 +02:00
Moudy
ac98fba1b1 feat: add private PDA AccountId derivation function 2026-04-15 21:10:21 +02:00
Moudy
3bc371fbc0
Merge pull request #448 from logos-blockchain/schouhy/fix-deny
Fix deny by updating `rustls-webpki` and `multihash`
2026-04-15 20:38:58 +02:00
Sergio Chouhy
db46dcc481 ignore rand deny 2026-04-15 14:25:19 -03:00
Sergio Chouhy
a6194ad447 fix deny by updating rustls-webpki and multihash 2026-04-15 14:08:35 -03:00
Daniil Polyakov
699e91363e feat: introduce more descriptive error messages for public execution 2026-04-13 21:25:18 +03:00
Daniil Polyakov
190c811f10
Merge pull request #439 from logos-blockchain/pr/enable-indexer-tests
chore(ci): enable indexer integration tests with new docker image
2026-04-13 21:00:42 +03:00
Petar Radovic
910d23821a rm cfgsync config 2026-04-13 12:56:45 +02:00
Petar Radovic
c15c6f09de settings 2026-04-13 12:49:37 +02:00
Petar Radovic
6cb2713356 port mappingS 2026-04-13 12:41:14 +02:00
Petar Radovic
e9878b5e9d user config 2026-04-13 12:30:55 +02:00
Petar Radovic
4d71492b4a user config 2026-04-13 12:30:40 +02:00
Petar Radovic
97653a938a sed fix 2026-04-13 12:16:29 +02:00
Petar Radovic
e6ebad31f9 config file 2026-04-13 11:47:33 +02:00
Petar Radovic
078c4726e4 simplify run script 2026-04-13 11:46:29 +02:00
Moudy
7a29b45cf4
Merge pull request #440 from logos-blockchain/schouhy/fix-main 2026-04-10 23:14:14 +02:00