diff --git a/src/main.cpp b/src/main.cpp index a3032ed84..2e35d00e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1318,12 +1318,7 @@ bool ContextualCheckShieldedInputs( if (!tx.vShieldedSpend.empty() || !tx.vShieldedOutput.empty()) { - // The nu5Active flag passed in here enables the new consensus rules from ZIP 216 - // (https://zips.z.cash/zip-0216#specification) on the following fields: - // - // - spendAuthSig in Sapling Spend descriptions - // - bindingSigSapling - auto ctx = sapling::init_verifier(nu5Active); + auto ctx = sapling::init_verifier(); for (const SpendDescription &spend : tx.vShieldedSpend) { if (!ctx->check_spend( diff --git a/src/rust/src/sapling.rs b/src/rust/src/sapling.rs index a3066c6a3..081180938 100644 --- a/src/rust/src/sapling.rs +++ b/src/rust/src/sapling.rs @@ -23,7 +23,7 @@ mod ffi { extern "Rust" { type Verifier; - fn init_verifier(zip216_enabled: bool) -> Box; + fn init_verifier() -> Box; fn check_spend( &mut self, cv: &[u8; 32], @@ -52,8 +52,11 @@ mod ffi { struct Verifier(SaplingVerificationContext); -fn init_verifier(zip216_enabled: bool) -> Box { - Box::new(Verifier(SaplingVerificationContext::new(zip216_enabled))) +fn init_verifier() -> Box { + // We consider ZIP 216 active all of the time because blocks prior to NU5 + // activation (on mainnet and testnet) did not contain Sapling transactions + // that violated its canonicity rule. + Box::new(Verifier(SaplingVerificationContext::new(true))) } impl Verifier {