Skip to main content

dispatch_version_verification

Function dispatch_version_verification 

Source
fn dispatch_version_verification(
    tx: &Transaction,
    nu: NetworkUpgrade,
    script_verifier: Verifier,
    cached_ffi_transaction: Arc<CachedFfiTransaction>,
    tx_id: UnminedTxId,
) -> Result<AsyncChecks, TransactionError>
Expand description

Dispatches version-specific async verification checks for tx.

nu is the network upgrade active at the transaction’s verification height, pre-computed by the caller using NetworkUpgrade::current.

tx_id must be the unmined ID of tx: the shielded verifiers key their caches on it, so an ID that does not identify tx would let one transaction’s bundle be answered from another’s verification. A v5 or v6 transaction’s witnessed ID is passed down to the Halo2 verifier, which needs the transaction’s authorizing-data digest; a legacy ID has none, so those bundles are verified without consulting the Halo2 cache.

Returns TransactionError::WrongVersion for V1-V3 transactions, which are not supported by any network upgrade Zebra verifies.