pub fn orchard_v5_verifier_for(
network_upgrade: NetworkUpgrade,
) -> &'static VerifierServiceExpand description
Returns the global Halo2 verifier for the Orchard-pool bundle of a v5 transaction in a
block at network_upgrade.
The Orchard Action circuit — and therefore its verifying key — changes with the block era, and a proof produced under one circuit does not verify under another era’s key. The era is a function of the block’s network upgrade, not the transaction version, so each v5 Orchard bundle is checked against the key for the upgrade of the block it appears in:
- upgrades before NU6.2 →
VERIFIER_PRE_NU6_2(the historical insecure key), so pre-soft-fork Orchard history still verifies on re-sync; - NU6.2 until NU6.3 →
VERIFIER_NU6_2(the fixed key); - NU6.3 onward →
VERIFIER_NU6_3_ONWARD(the NU6.3 circuit). The Orchard-pool cross-address restriction is enforced for every Orchard Action from NU6.3 onward regardless of transaction version, “so that it cannot be bypassed by using a version 5 transaction” (ZIP 229); that restriction lives in the NU6.3 circuit, which the NU6.2 fixed key cannot verify. So a v5 Orchard bundle at NU6.3 uses the same key as v6 Orchard and Ironwood bundles.
v6 Orchard and Ironwood bundles use orchard_v6_verifier, which returns that same
NU6.3-onward key.
The mapping is an explicit, exhaustive match on every NetworkUpgrade variant: there is no
version-comparison fallthrough and no default arm, so adding a future upgrade is a compile error
here until it is bound to a key on purpose.