fn verify_orchard_shielded_data(
        orchard_shielded_data: &Option<orchard::ShieldedData>,
        shielded_sighash: &SigHash,
    ) -> Result<AsyncChecks, TransactionError> {
        let mut async_checks = AsyncChecks::new();

        if let Some(orchard_shielded_data) = orchard_shielded_data {
            for authorized_action in orchard_shielded_data.actions.iter().cloned() {
                let (action, spend_auth_sig) = authorized_action.into_parts();

                // Consensus rule: The proof 𝜋 MUST be valid given a primary
                // input (cv, rtOrchard, nf, rk, cm𝑥, enableSpends, enableOutputs)
                //
                // https://zips.z.cash/protocol/protocol.pdf#actiondesc
                //
                // Queue the verification of the Halo2 proof for each Action
                // description while adding the resulting future to our
                // collection of async checks that (at a minimum) must pass for
                // the transaction to verify.
                async_checks.push(
                    primitives::halo2::VERIFIER
                        .clone()
                        .oneshot(primitives::halo2::Item::from(orchard_shielded_data)),
                );

                // Consensus rule: The spend authorization signature
                // MUST be a valid SpendAuthSig signature over
                // SigHash using rk as the validating key.
                //
                // Queue the validation of the RedPallas spend
                // authorization signature for each Action
                // description while adding the resulting future to
                // our collection of async checks that (at a
                // minimum) must pass for the transaction to verify.
                async_checks.push(
                    primitives::redpallas::VERIFIER
                        .clone()
                        .oneshot((action.rk, spend_auth_sig, &shielded_sighash).into()),
                );
            }

            let bvk = orchard_shielded_data.binding_verification_key();

            async_checks.push(
                primitives::redpallas::VERIFIER
                    .clone()
                    .oneshot((bvk, orchard_shielded_data.binding_sig, &shielded_sighash).into()),
            );
        }

        Ok(async_checks)
    }
/// Verifies a transaction's Orchard shielded data.
Verifies a transaction's Orchard shielded data.
Verifies a transaction ' s Orchard shielded data .
fn verify_orchard_shielded_data(
        orchard_shielded_data: &Option<orchard::ShieldedData>,
        shielded_sighash: &SigHash,
    ) -> Result<AsyncChecks, TransactionError> {
        let mut async_checks = AsyncChecks::new();
        if let Some(orchard_shielded_data) = orchard_shielded_data {
            for authorized_action in orchard_shielded_data.actions.iter().cloned() {
                let (action, spend_auth_sig) = authorized_action.into_parts();
                // Consensus rule: The proof 𝜋 MUST be valid given a primary
                // input (cv, rtOrchard, nf, rk, cm𝑥, enableSpends, enableOutputs)
                //
                // https://zips.z.cash/protocol/protocol.pdf#actiondesc
                //
                // Queue the verification of the Halo2 proof for each Action
                // description while adding the resulting future to our
                // collection of async checks that (at a minimum) must pass for
                // the transaction to verify.
                async_checks.push(
                    primitives::halo2::VERIFIER
                        .clone()
                        .oneshot(primitives::halo2::Item::from(orchard_shielded_data)),
                );
                // Consensus rule: The spend authorization signature
                // MUST be a valid SpendAuthSig signature over
                // SigHash using rk as the validating key.
                //
                // Queue the validation of the RedPallas spend
                // authorization signature for each Action
                // description while adding the resulting future to
                // our collection of async checks that (at a
                // minimum) must pass for the transaction to verify.
                async_checks.push(
                    primitives::redpallas::VERIFIER
                        .clone()
                        .oneshot((action.rk, spend_auth_sig, &shielded_sighash).into()),
                );
            }
            let bvk = orchard_shielded_data.binding_verification_key();
            async_checks.push(
                primitives::redpallas::VERIFIER
                    .clone()
                    .oneshot((bvk, orchard_shielded_data.binding_sig, &shielded_sighash).into()),
            );
        }
        Ok(async_checks)
    }
fn verify_orchard_shielded_data ( orchard_shielded_data : & Option < orchard :: ShieldedData > , shielded_sighash : & SigHash , ) -> Result < AsyncChecks , TransactionError > { let mut async_checks = AsyncChecks :: new ( ) ; if let Some ( orchard_shielded_data ) = orchard_shielded_data { for authorized_action in orchard_shielded_data . actions . iter ( ) . cloned ( ) { let ( action , spend_auth_sig ) = authorized_action . into_parts ( ) ; // Consensus rule: The proof 𝜋 MUST be valid given a primary // input (cv, rtOrchard, nf, rk, cm𝑥, enableSpends, enableOutputs) // // https://zips.z.cash/protocol/protocol.pdf#actiondesc // // Queue the verification of the Halo2 proof for each Action // description while adding the resulting future to our // collection of async checks that (at a minimum) must pass for // the transaction to verify. async_checks . push ( primitives :: halo2 :: VERIFIER . clone ( ) . oneshot ( primitives :: halo2 :: Item :: from ( orchard_shielded_data ) ) , ) ; // Consensus rule: The spend authorization signature // MUST be a valid SpendAuthSig signature over // SigHash using rk as the validating key. // // Queue the validation of the RedPallas spend // authorization signature for each Action // description while adding the resulting future to // our collection of async checks that (at a // minimum) must pass for the transaction to verify. async_checks . push ( primitives :: redpallas :: VERIFIER . clone ( ) . oneshot ( ( action . rk , spend_auth_sig , & shielded_sighash ) . into ( ) ) , ) ; } let bvk = orchard_shielded_data . binding_verification_key ( ) ; async_checks . push ( primitives :: redpallas :: VERIFIER . clone ( ) . oneshot ( ( bvk , orchard_shielded_data . binding_sig , & shielded_sighash ) . into ( ) ) , ) ; } Ok ( async_checks ) }
Verifies a transaction's Orchard shielded data.
Verifies a transaction ' s Orchard shielded data .
orchard_shielded_data
&Option<orchard::ShieldedData>
shielded_sighash
&SigHash