Skip to content

Commit

Permalink
Change current network protocol version for NU5 testnet (#2803)
Browse files Browse the repository at this point in the history
* Set the CURRENT_NETWORK_PROTOCOL_VERSION to 170_-014

* Adjust verify_v5_transaction()
  • Loading branch information
upbqdn authored Sep 27, 2021
1 parent b42ab67 commit 952da4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,29 +366,29 @@ where

let shielded_sighash = transaction.sighash(upgrade, HashType::ALL, None);

let _async_checks = Self::verify_transparent_inputs_and_outputs(
&request,
network,
inputs,
script_verifier,
)?
.and(Self::verify_sapling_shielded_data(
sapling_shielded_data,
&shielded_sighash,
)?)
.and(Self::verify_orchard_shielded_data(
orchard_shielded_data,
&shielded_sighash,
)?);
Ok(
Self::verify_transparent_inputs_and_outputs(
&request,
network,
inputs,
script_verifier,
)?
.and(Self::verify_sapling_shielded_data(
sapling_shielded_data,
&shielded_sighash,
)?)
.and(Self::verify_orchard_shielded_data(
orchard_shielded_data,
&shielded_sighash,
)?),
)

// TODO:
// - verify orchard shielded pool (ZIP-224) (#2105)
// - ZIP-216 (#1798)
// - ZIP-244 (#1874)
// - remaining consensus rules (#2379)
// - remove `should_panic` from tests

unimplemented!("V5 transaction validation is not yet complete");
}

/// Verifies if a V5 `transaction` is supported by `network_upgrade`.
Expand Down
2 changes: 1 addition & 1 deletion zebra-network/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub const USER_AGENT: &str = "/Zebra:1.0.0-alpha.17/";
///
/// The current protocol version typically changes before Mainnet and Testnet
/// network upgrades.
pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_013);
pub const CURRENT_NETWORK_PROTOCOL_VERSION: Version = Version(170_014);

/// The minimum network protocol version accepted by this crate for each network,
/// represented as a network upgrade.
Expand Down

0 comments on commit 952da4c

Please sign in to comment.