Reviewed against logos-blockchain/logos-execution-zone, tag v0.3.0
(commit db66590ab821a4e142c211017a3866d007f6fa77, 2026-09-29) — the same clone and ref used
for the #507 review. The issue pins its cited tests at commit f7fda38a4428b9989f1db1dbf5d2411484848fd4
(already confirmed in the #507 review as an ancestor of v0.3.0). Fully Docker-free; this is a
code-and-test validation, no sequencer/indexer stand-up needed for this journey.
Scope note: per instructions, this review validates that the documented journey is
accurate, runnable, and reproducible for Docs' purposes — it does not audit the cryptographic soundness
of the ask/nsk/npk/vsk scheme itself, and does not treat testnet-v0.3 incompleteness as a defect.
ask ⇒ still spendable, a tx signer does not substitute for
it, authorization is opt-in per program) is confirmed exactly in execution_state.rs's code,
not just in test behavior. One precise reproducibility gap was found in the issue's own stated success
command (see Findings #1), and the issue's "Failure modes and limits" section is confirmed blank, which is
exactly where the fail-open behavior needs to be documented.
| # | Finding | Severity | Status |
|---|---|---|---|
| 1 | The issue's own success command doesn't reach 2 of its 6 cited tests: one misses the ask substring filter, the other lives in a different crate (lee_core, not lee) and needs a feature flag to even compile standalone | Medium (doc accuracy) | reproduced |
| 2 | Blank "Failure modes and limits" section — the fail-open behavior (no ask ⇒ unauthorized but still spendable) is exactly the kind of thing that belongs there | Medium (doc gap) | confirmed blank |
| 3 | Private-PDA authorization (WitnessKind::Pda) is a structurally separate scheme from ask, with its own per-call scoping — worth a doc pointer so readers don't conflate the two | Low (doc clarity) | confirmed |
| — | All 5 named circuit tests + the engine test: exist at cited lines, assert exactly what's claimed | Good | reproduced |
| — | Key-derivation hierarchy (domain strings, ask→nsk→npk, vsk sibling) | Good | confirmed by direct code reading |
| — | execution_state.rs::initialize enforcement, and the authorize() function's exact "authorized ⇔ ask present" mapping | Good | confirmed |
$ RISC0_DEV_MODE=1 cargo test --release -p lee ask running 4 tests test ...::regular_init_with_non_chaining_ask_npk_is_rejected ... ok test ...::regular_update_with_wrong_ask_nsk_is_rejected ... ok test ...::a_signer_entry_does_not_authorize_a_private_witness_without_ask ... ok test ...::private_regular_update_without_ask_is_spendable ... ok test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 279 filtered out; finished in 0.11s
PASS as stated — but see finding #1: this command's own ask substring
filter only ever catches 4 of the 6 tests the issue cites by name (full log in
evidence/ask-test.log).
reproduced
The issue cites 6 tests by name as evidence for the journey, but its own stated success command
(cargo test --release -p lee ask) only ever runs 4 of them:
auth_asserting_program_rejects_unauthorized_regular_private_account — exists exactly at
line 837 as cited, in the lee crate, but its name contains no literal substring
"ask", so cargo's test filter silently skips it. (It passes fine when named exactly —
confirmed below — this is a filter-matching gap, not a test failure.)duplicate_witnesses_and_unlinked_authorization_keys_are_rejected — exists exactly where
cited in execution_state/tests.rs, but that file belongs to the lee_core
crate, not lee (lee/state_machine/core/Cargo.toml names its package
lee_core). -p lee cannot reach it at all, with or without a name filter. Running
it standalone also needs a feature flag: lee_core's own Cargo.toml gates the
code this test's helpers need behind test_utils (default = [],
test_utils = ["host"]) — cargo test -p lee_core with no features fails to
compile (no associated function ... encapsulate ... found), not just fails to run.evidence/all-6-named-tests.log):
$ cargo test --release -p lee -- --exact \
...::auth_asserting_program_rejects_unauthorized_regular_private_account
test ...::auth_asserting_program_rejects_unauthorized_regular_private_account ... ok
$ cargo test --release -p lee_core --features test_utils -- --exact \
execution_state::tests::duplicate_witnesses_and_unlinked_authorization_keys_are_rejected
test execution_state::tests::duplicate_witnesses_and_unlinked_authorization_keys_are_rejected ... ok
Why this matters for Docs: a reader following only the issue's stated command gets a clean "4 passed" and would reasonably believe they've reproduced everything the issue cites — when 2 of the 6 named tests silently never ran. Nothing is wrong with the tests or the code; the gap is purely in the issue's own repro instructions.
Suggested fix: either broaden the success command (e.g.
cargo test --release -p lee -p lee_core --features lee_core/test_utils, or just list the two
exact test names separately), or drop the implication that the single stated command covers all 6 cited
tests.
confirmed blank on the issue; confirmed in code
The issue's own code and tests describe a deliberate, correctly-implemented fail-open
boundary, confirmed directly in lee/state_machine/core/src/execution_state.rs:
// inside ExecutionState::initialize's witness loop:
WitnessKind::Regular { ask: Some(ask) } => {
let derived = NullifierSecretKey::from(ask);
let linked = /* does derived chain to this witness's nsk/npk? */;
if !linked { return Err(ExecutionError::InvalidAuthorizationKey { account_id }); }
}
WitnessKind::Regular { ask: None } => {} // <-- no error. Spending proceeds.
And later, in authorize() — the exact source of the program-visible
AccountMeta.is_authorized flag:
Origin::Private(index) => {
let witness = &self.witnesses[index];
(matches!(witness.kind, WitnessKind::Regular { ask: Some(_) }), ...)
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "authorized" IS "ask was Some"
This precisely matches the issue's own claim, and is confirmed live by the 5 circuit tests: an account
with ask: None and a plain noop program spends successfully
(private_regular_update_without_ask_is_spendable); the SAME witness, with a tx-level signer
entry added, is still rejected by a program that checks authorization
(a_signer_entry_does_not_authorize_a_private_witness_without_ask — the signer entry does
nothing for private-witness authorization); and the rejection in both "no ask" cases comes from the
program panicking (auth_asserting_noop asserting
account.is_authorized), via LeeError::ProgramProveFailed — never from the engine
itself, which only ever raises InvalidAuthorizationKey when a wrong ask is supplied,
not when none is.
This is a deliberate, sound design (delegation requires it — a tracking-only holder must be able to drive unauthorized state updates for the owner to later see/finalize). But it is a genuine trap for a reader who assumes "no credential ⇒ locked," and the issue's "Failure modes and limits" field is confirmed blank (the GitHub page shows "No response" under that heading) — this is exactly the content that belongs there.
Suggested fix: add to "Failure modes and limits": "An account with no ask
witnessed is NOT locked — it can still be spent/updated via its nsk alone. This is
intentional (it's what makes delegation possible) but means authorization is purely opt-in: only a
program that explicitly checks account.is_authorized on its inputs will ever reject an
unauthorized update. A transaction's top-level signer list does not substitute for a missing
ask on a private witness."
ask — worth a pointerconfirmed
WitnessKind (lee/state_machine/core/src/circuit_io.rs:143) has exactly two
variants:
pub enum WitnessKind {
Regular { ask: Option<AuthorizationSecretKey> },
Pda { binding: (AccountId, PdaSeed) },
}
A private PDA's credential is its (program, seed) binding, not an ask/nsk
chain at all, and its grant is scoped narrowly per call — confirmed in private_seed_grant():
fn private_seed_grant(caller_account_id, pda_seeds, witness) -> Option<(AccountId, PdaSeed)> {
witness.pda_binding()
.filter(|&(program, seed)| Some(program) == caller_account_id && pda_seeds.contains(&seed))
}
i.e. a PDA is only authorized within a call whose caller is the PDA's own owning program AND
which explicitly passed that seed down via ChainedCall.pda_seeds — a per-call, subtree-scoped
grant, composed with the ask-based credential via OR (credential || grants.contains(&account_id)
in authorize()), not derived from or related to ask in any way. The issue doesn't
claim otherwise, but doesn't mention this sibling mechanism either; a reader moving from "ask" docs to
"private PDA" docs could reasonably wonder if they're the same credential. They aren't.
Suggested fix: one sentence and a link: "Private PDAs use a separate,
call-scoped seed-grant mechanism, not ask — see [private-PDA doc]."
| Claim | Status | Where checked |
|---|---|---|
| 5 named circuit tests exist at their exact cited lines (702/731/763/800/837) and assert what's claimed | reproduced | lee/state_machine/src/privacy_preserving_transaction/circuit/tests.rs; all 5 run and pass individually |
Engine test duplicate_witnesses_and_unlinked_authorization_keys_are_rejected exists and asserts both DuplicateWitness and InvalidAuthorizationKey | reproduced | lee/state_machine/core/src/execution_state/tests.rs:1020 (note: needs -p lee_core --features test_utils, see finding #1) |
generate_authorization_secret_key = sha256("/LEE-Keys/v1/Authorization/Secret" || ssk || index) | confirmed, exact bytes | lee/key_protocol/src/key_management/secret_holders.rs:92-103 |
nsk derived from ask via impl From<&AuthorizationSecretKey> for NullifierSecretKey | confirmed | lee/state_machine/core/src/nullifier.rs:144-155 (domain "/LEE-Keys/v1/Nullifier/Secret") |
| npk derived from nsk | confirmed | nullifier.rs:157-170 (domain "/LEE-Keys/v1/Nullifier/Public") |
| vsk is a sibling off ssk, never through ask/nsk | confirmed | secret_holders.rs:112-125: generate_viewing_secret_seed_key hashes ssk.0 directly under domain "/LEE-Keys/v1/Viewing/Secret", independent of generate_authorization_secret_key |
PrivateKeyHolder { authorization_secret_key, viewing_secret_key } field names/order | confirmed, exact match | secret_holders.rs:40-43 |
A supplied ask that doesn't chain to the witness's nsk/npk fails the whole execution with InvalidAuthorizationKey | confirmed | execution_state.rs:212-223, plus 2 tests + the engine test |
"Authorized" for a private account ⇔ a (validated) ask was witnessed | confirmed, literal code match | execution_state.rs:343-349 (authorize()) |
No ask ⇒ account is still spendable (fail-open), not locked | confirmed | execution_state.rs:224 (no-op branch) + private_regular_update_without_ask_is_spendable |
A tx-level signer entry does not back-stop a missing ask | confirmed | a_signer_entry_does_not_authorize_a_private_witness_without_ask — rejection comes from the program (auth_asserting_noop), not the engine; a bare signer entry has no effect on private-witness authorization |
| Authorization is only meaningful to programs that explicitly assert it | confirmed | same witness (ask: None) succeeds against noop, fails against auth_asserting_noop — the only difference is whether the program checks is_authorized |
Private-PDA path (WitnessKind::Pda) is a separate scheme from ask, seed grants scoped to the callee subtree | confirmed | circuit_io.rs:143-151, execution_state.rs:570-578 (private_seed_grant) — see finding #3 |
execution_state.rs's witness loop + authorize()) and the test suite exercises
every branch of it.ask (e.g. does the wallet crate expose a way to hold only
nsk+vsk and hand out tracking-only access in practice) — the issue's scope is the engine-level mechanism
and its tests, not wallet UX, so this wasn't pursued.# Toolchain (one-time, if not already set up — see the #507 review for the full list)
export PATH="$HOME/.risc0/bin:$HOME/.cargo/bin:$PATH"
git clone https://github.com/logos-blockchain/logos-execution-zone.git lez
cd lez
git checkout v0.3.0 # db66590ab821a4e142c211017a3866d007f6fa77
# The issue's own stated success command:
RISC0_DEV_MODE=1 cargo test --release -p lee ask
# -> 4 passed (misses 2 of the 6 cited tests — see finding #1)
# All 6 cited tests, run explicitly and exactly:
RISC0_DEV_MODE=1 cargo test --release -p lee -- --exact \
privacy_preserving_transaction::circuit::tests::private_regular_update_without_ask_is_spendable \
privacy_preserving_transaction::circuit::tests::a_signer_entry_does_not_authorize_a_private_witness_without_ask \
privacy_preserving_transaction::circuit::tests::regular_update_with_wrong_ask_nsk_is_rejected \
privacy_preserving_transaction::circuit::tests::regular_init_with_non_chaining_ask_npk_is_rejected \
privacy_preserving_transaction::circuit::tests::auth_asserting_program_rejects_unauthorized_regular_private_account
# -> 5 passed
RISC0_DEV_MODE=1 cargo test --release -p lee_core --features test_utils -- --exact \
execution_state::tests::duplicate_witnesses_and_unlinked_authorization_keys_are_rejected
# -> 1 passed