Files
logos-execution-zone/lee
Marvin Jones 2cf467d5d6 fix(lee): restore per-branch PDA authorization scoping in privacy circuit
derive_from_outputs's rewrite for ProgramImageClaim support collapsed
three distinct authorization sources into one flat, mutable
authorized_accounts set shared across the whole call tree: a
caller_pda_seeds match (call-specific, never cached), a truly-global
first-sight non-PDA authorization, and a per-branch caller-authorized
set inherited only down one lineage. Caching a PDA match into that
shared set meant a PDA delegated to one program became falsely
authorized for any other program elsewhere in the same transaction
that happened to include the same account in its own pre_states - an
authorization bypass, not just a test-semantics quirk.

Restores the three-way split (globally_authorized field plus a local
CallerData carrying caller_account_id/caller_image_id/
authorized_accounts, threaded per-branch through the traversal and
returned from validate_and_sync_states), matching the pattern already
used correctly in validated_state_diff::from_public_transaction's
public-dispatch path. Keeps derive_from_outputs's ProgramImageClaim
image-id resolution unchanged.
2026-08-22 21:14:29 -04:00
..