pub fn verifier_for(
network_upgrade: NetworkUpgrade,
) -> &'static Fallback<Batch<Verifier, Item>, OrchardFallback>Expand description
Returns the global Halo2 verifier for Orchard bundles in blocks at network_upgrade.
The Orchard Action circuit — and therefore its verifying key — changed at NU6.2 (the fixed variable-base scalar-multiplication circuit; see GHSA-jfw5-j458-pfv6), and a proof produced under one circuit does not verify under the other key. So each bundle must be checked against the key for the upgrade of the block it appears in:
- upgrades before NU6.2 are routed to
VERIFIER_PRE_NU6_2(the historical insecure key), so pre-soft-fork Orchard history still verifies on re-sync; - NU6.2 and every later upgrade are routed to
VERIFIER_POST_NU6_2(the fixed key).
The mapping is an explicit, exhaustive match on every NetworkUpgrade variant: there is
no version-comparison fallthrough and no default-to-insecure arm, so adding a future upgrade
is a compile error here until it is bound to a key on purpose.