Expand description
Common validation logic shared by shielded transitions (proof verification)
Constants§
- FLAGS_
OUTPUTS_ ONLY - Orchard bundle flags byte: only outputs are real (spends are dummy). Used for shield and shield-from-asset-lock transitions where funds enter the pool.
- FLAGS_
SPENDS_ AND_ OUTPUTS - Orchard bundle flags byte: both spends and outputs are real. Used for shielded transfers, unshield, and shielded-withdrawal transitions.
Functions§
- compute_
platform_ sighash - Computes the platform sighash from an Orchard bundle commitment and optional transparent field data.
- read_
pool_ total_ balance - Read the current shielded pool total balance from GroveDB. Returns 0 if the balance key doesn’t exist yet.
- reconstruct_
and_ verify_ bundle - Reconstructs an orchard
Bundle<Authorized, i64, DashMemo>from the serialized fields of a shielded state transition and verifies the Halo 2 ZK proof along with all RedPallas signatures (spend auth + binding). - validate_
anchor_ exists - Verify that the anchor exists in the recorded anchors tree. Uses O(1) key lookup instead of scanning the entire tree. Returns a consensus error if the anchor is not found.
- validate_
minimum_ pool_ notes - Check minimum notes threshold for outgoing transitions (anonymity set).
- validate_
nullifiers - Defense-in-depth: reject duplicate nullifiers within the same bundle, then check that no nullifier has already been spent in state.
- warmup_
shielded_ verifying_ key - Pre-builds the shielded verifying key so that the first shielded transaction does not pay the ~5-15 s construction cost at check_tx time.