Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZSA integration (step 2): Add Network Upgrade 7 (Nu7) support to Zebra #15

Open
wants to merge 33 commits into
base: zsa-integration-zsadeps
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
054e655
Merge remote-tracking branch 'origin/main' into switch-to-zsa-crates-…
dmidem Aug 18, 2024
50190a3
Introduce Nu7
dmidem Aug 18, 2024
2d3845d
Introduce Nu7 fo other crates of Zebra
dmidem Aug 19, 2024
2d23d6b
Merge branch 'zsa1' into switch-to-zsa-crates-nu6
dmidem Sep 2, 2024
7d79143
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Sep 2, 2024
53c65b6
Trigger CI
dmidem Sep 2, 2024
d659628
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Sep 2, 2024
c238847
Add basic CI checks workflow
dmidem Sep 3, 2024
2c13ae9
Fix ci-basic.yml
dmidem Sep 3, 2024
5a839c6
Fix ci-basic.yml (2)
dmidem Sep 3, 2024
367a14b
Add installing of build-essential to ci-basic.yml
dmidem Sep 3, 2024
f425747
Try to use librocksdb-dev in ci-basic.yml
dmidem Sep 3, 2024
831c847
Run ci-basic.yml on ubuntu-24.04
dmidem Sep 3, 2024
ecaf98d
Enable nu6 cfg flag in ci-basic.yml
dmidem Sep 3, 2024
7d11159
Adjust the code with librustzcash/zcash_protocol nu6 related changes
dmidem Sep 4, 2024
6a0196e
Add RUSTDOCFLAGS to ci-basic.yml
dmidem Sep 4, 2024
faec84b
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Sep 9, 2024
1526276
Merge remote-tracking branch 'origin/main' into switch-to-zsa-crates-nu6
dmidem Sep 22, 2024
509d525
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Sep 22, 2024
9e94dc5
Merge remote-tracking branch 'zcash/main' into switch-to-zsa-crates-nu6
dmidem Sep 22, 2024
0bcf59a
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Sep 22, 2024
12ade98
Merge branch 'main' into switch-to-zsa-crates-nu6
dmidem Oct 2, 2024
ab1838d
Merge branch 'main' into switch-to-zsa-crates-nu7
dmidem Oct 2, 2024
0a8cfe0
Merge branch 'switch-to-zsa-crates-nu6' into switch-to-zsa-crates-nu7
dmidem Oct 2, 2024
bb1395c
Merge branch 'main' into switch-to-zsa-crates-nu6
dmidem Oct 17, 2024
1b8e9e9
Merge branch 'zsa-integration-zsadeps' into zsa-integration-nu7
dmidem Oct 17, 2024
d8964e7
Fix of new_regtest call (as it additionally needs Nu7 arg now)
dmidem Oct 17, 2024
e8abddd
Fix of new_regtest call (as it additionally needs Nu7 arg now) (2)
dmidem Oct 17, 2024
23d9e77
Set Nu7 as a network update for testnet in zebra-chain network tests
dmidem Oct 17, 2024
e0adb4c
Fix serde names for NU7
dmidem Oct 17, 2024
0daf0ce
Update test snapshot in zebra-rpc to use NU7
dmidem Oct 17, 2024
24f5e85
Merge branch 'zsa-integration-zsadeps' into zsa-integration-nu7
dmidem Oct 29, 2024
d0ecf96
Merge branch 'zsa-integration-zsadeps' into zsa-integration-nu7
dmidem Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zebra-chain/src/block/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl Commitment {
// NetworkUpgrade::current() returns the latest network upgrade that's activated at the provided height, so
// on Regtest for heights above height 0, it could return NU6, and it's possible for the current network upgrade
// to be NU6 (or Canopy, or any network upgrade above Heartwood) at the Heartwood activation height.
(Canopy | Nu5 | Nu6, activation_height)
(Canopy | Nu5 | Nu6 | Nu7, activation_height)
if height == activation_height
&& Some(height) == Heartwood.activation_height(network) =>
{
Expand All @@ -136,7 +136,7 @@ impl Commitment {
}
}
(Heartwood | Canopy, _) => Ok(ChainHistoryRoot(ChainHistoryMmrRootHash(bytes))),
(Nu5 | Nu6, _) => Ok(ChainHistoryBlockTxAuthCommitment(
(Nu5 | Nu6 | Nu7, _) => Ok(ChainHistoryBlockTxAuthCommitment(
ChainHistoryBlockTxAuthCommitmentHash(bytes),
)),
}
Expand Down
4 changes: 2 additions & 2 deletions zebra-chain/src/history_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl NonEmptyHistoryTree {
)?;
InnerHistoryTree::PreOrchard(tree)
}
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 => {
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => {
let tree = Tree::<OrchardOnward>::new_from_cache(
network,
network_upgrade,
Expand Down Expand Up @@ -156,7 +156,7 @@ impl NonEmptyHistoryTree {
)?;
(InnerHistoryTree::PreOrchard(tree), entry)
}
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 => {
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => {
let (tree, entry) = Tree::<OrchardOnward>::new_from_block(
network,
block,
Expand Down
2 changes: 2 additions & 0 deletions zebra-chain/src/parameters/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ impl Network {
pub fn new_regtest(
nu5_activation_height: Option<u32>,
nu6_activation_height: Option<u32>,
nu7_activation_height: Option<u32>,
) -> Self {
Self::new_configured_testnet(testnet::Parameters::new_regtest(
nu5_activation_height,
nu6_activation_height,
nu7_activation_height,
))
}

Expand Down
9 changes: 8 additions & 1 deletion zebra-chain/src/parameters/network/testnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ pub struct ConfiguredActivationHeights {
/// Activation height for `NU6` network upgrade.
#[serde(rename = "NU6")]
pub nu6: Option<u32>,
/// Activation height for `NU7` network upgrade.
#[serde(rename = "NU7")]
pub nu7: Option<u32>,
}

/// Builder for the [`Parameters`] struct.
Expand Down Expand Up @@ -336,6 +339,7 @@ impl ParametersBuilder {
canopy,
nu5,
nu6,
nu7,
}: ConfiguredActivationHeights,
) -> Self {
use NetworkUpgrade::*;
Expand All @@ -358,6 +362,7 @@ impl ParametersBuilder {
.chain(canopy.into_iter().map(|h| (h, Canopy)))
.chain(nu5.into_iter().map(|h| (h, Nu5)))
.chain(nu6.into_iter().map(|h| (h, Nu6)))
.chain(nu7.into_iter().map(|h| (h, Nu7)))
.map(|(h, nu)| (h.try_into().expect("activation height must be valid"), nu))
.collect();

Expand Down Expand Up @@ -588,6 +593,7 @@ impl Parameters {
pub fn new_regtest(
nu5_activation_height: Option<u32>,
nu6_activation_height: Option<u32>,
nu7_activation_height: Option<u32>,
) -> Self {
#[cfg(any(test, feature = "proptest-impl"))]
let nu5_activation_height = nu5_activation_height.or(Some(100));
Expand All @@ -604,6 +610,7 @@ impl Parameters {
canopy: Some(1),
nu5: nu5_activation_height,
nu6: nu6_activation_height,
nu7: nu7_activation_height,
..Default::default()
})
.with_halving_interval(PRE_BLOSSOM_REGTEST_HALVING_INTERVAL);
Expand Down Expand Up @@ -647,7 +654,7 @@ impl Parameters {
disable_pow,
pre_blossom_halving_interval,
post_blossom_halving_interval,
} = Self::new_regtest(None, None);
} = Self::new_regtest(None, None, None);

self.network_name == network_name
&& self.genesis_hash == genesis_hash
Expand Down
6 changes: 3 additions & 3 deletions zebra-chain/src/parameters/network/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn activates_network_upgrades_correctly() {
let expected_activation_height = 1;
let network = testnet::Parameters::build()
.with_activation_heights(ConfiguredActivationHeights {
nu6: Some(expected_activation_height),
nu7: Some(expected_activation_height),
..Default::default()
})
.to_network();
Expand Down Expand Up @@ -147,7 +147,7 @@ fn activates_network_upgrades_correctly() {
(Network::Mainnet, MAINNET_ACTIVATION_HEIGHTS),
(Network::new_default_testnet(), TESTNET_ACTIVATION_HEIGHTS),
(
Network::new_regtest(None, None),
Network::new_regtest(None, None, None),
expected_default_regtest_activation_heights,
),
] {
Expand Down Expand Up @@ -198,7 +198,7 @@ fn check_configured_network_name() {
"Mainnet should be displayed as 'Mainnet'"
);
assert_eq!(
Network::new_regtest(None, None).to_string(),
Network::new_regtest(None, None, None).to_string(),
"Regtest",
"Regtest should be displayed as 'Regtest'"
);
Expand Down
21 changes: 18 additions & 3 deletions zebra-chain/src/parameters/network_upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use hex::{FromHex, ToHex};
use proptest_derive::Arbitrary;

/// A list of network upgrades in the order that they must be activated.
pub const NETWORK_UPGRADES_IN_ORDER: [NetworkUpgrade; 9] = [
pub const NETWORK_UPGRADES_IN_ORDER: [NetworkUpgrade; 10] = [
Genesis,
BeforeOverwinter,
Overwinter,
Expand All @@ -25,6 +25,7 @@ pub const NETWORK_UPGRADES_IN_ORDER: [NetworkUpgrade; 9] = [
Canopy,
Nu5,
Nu6,
Nu7,
];

/// A Zcash network upgrade.
Expand Down Expand Up @@ -61,6 +62,9 @@ pub enum NetworkUpgrade {
/// The Zcash protocol after the NU6 upgrade.
#[serde(rename = "NU6")]
Nu6,
/// The Zcash protocol after the NU7 upgrade.
#[serde(rename = "NU7")]
Nu7,
}

impl fmt::Display for NetworkUpgrade {
Expand Down Expand Up @@ -90,6 +94,8 @@ pub(super) const MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)]
(block::Height(1_046_400), Canopy),
(block::Height(1_687_104), Nu5),
(block::Height(2_726_400), Nu6),
// FIXME: TODO: Add NU7 with a correct value
// (block::Height(2_726_401), Nu7),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an estimated value under the flag #[cfg(zcash_unstable = "nu6" /* TODO nu7 */ )]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37

];

/// Fake mainnet network upgrade activation heights, used in tests.
Expand All @@ -104,6 +110,7 @@ const FAKE_MAINNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] = &[
(block::Height(30), Canopy),
(block::Height(35), Nu5),
(block::Height(40), Nu6),
(block::Height(45), Nu7),
];

/// Testnet network upgrade activation heights.
Expand All @@ -126,6 +133,8 @@ pub(super) const TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)]
(block::Height(1_028_500), Canopy),
(block::Height(1_842_420), Nu5),
(block::Height(2_976_000), Nu6),
// FIXME: TODO: Set a correct value for NU7
(block::Height(2_942_001), Nu7),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to defer setting this at all until the release PR for a version that deploys NU7 on Testnet and to set this in the configuration until then.

NetworkUpgrade::current() will return NU6 as the current network upgrade if the activation height is higher than NU7, so this should be set above the NU6 activation height.

Suggested change
(block::Height(2_942_001), Nu7),
// (block::Height(2_976_001), Nu7),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or consider putting this under the nu7 flag :#[cfg(zcash_unstable = "nu6" /* TODO nu7 */ )]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37

];

/// Fake testnet network upgrade activation heights, used in tests.
Expand All @@ -140,6 +149,7 @@ const FAKE_TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] = &[
(block::Height(30), Canopy),
(block::Height(35), Nu5),
(block::Height(40), Nu6),
(block::Height(45), Nu7),
];

/// The Consensus Branch Id, used to bind transactions and blocks to a
Expand Down Expand Up @@ -216,6 +226,8 @@ pub(crate) const CONSENSUS_BRANCH_IDS: &[(NetworkUpgrade, ConsensusBranchId)] =
(Canopy, ConsensusBranchId(0xe9ff75a6)),
(Nu5, ConsensusBranchId(0xc2d6d0b4)),
(Nu6, ConsensusBranchId(0xc8e71055)),
// FIXME: use a proper value below
(Nu7, ConsensusBranchId(0xc8e71056)),
Copy link
Collaborator

@arya2 arya2 Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zebra will panic if this doesn't match the one in zcash_protocol, so it would be good to generate a random one now, get started on the NU7 deployment ZIP, and make the change there as well (behind the compilation cfg flag).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, let's add a random number and the flag

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a PR adding a draft NU7 deployment ZIP with 0x77190AD8 as the consensus branch id, it could still change, but we may as well use it here as it's much less likely to need an update later than a random number.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37

];

/// The target block spacing before Blossom.
Expand Down Expand Up @@ -332,7 +344,8 @@ impl NetworkUpgrade {
Heartwood => Some(Canopy),
Canopy => Some(Nu5),
Nu5 => Some(Nu6),
Nu6 => None,
Nu6 => Some(Nu7),
Nu7 => None,
}
}

Expand Down Expand Up @@ -409,7 +422,9 @@ impl NetworkUpgrade {
pub fn target_spacing(&self) -> Duration {
let spacing_seconds = match self {
Genesis | BeforeOverwinter | Overwinter | Sapling => PRE_BLOSSOM_POW_TARGET_SPACING,
Blossom | Heartwood | Canopy | Nu5 | Nu6 => POST_BLOSSOM_POW_TARGET_SPACING.into(),
Blossom | Heartwood | Canopy | Nu5 | Nu6 | Nu7 => {
POST_BLOSSOM_POW_TARGET_SPACING.into()
}
};

Duration::seconds(spacing_seconds)
Expand Down
3 changes: 2 additions & 1 deletion zebra-chain/src/primitives/zcash_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ impl Version for zcash_history::V1 {
NetworkUpgrade::Heartwood
| NetworkUpgrade::Canopy
| NetworkUpgrade::Nu5
| NetworkUpgrade::Nu6 => zcash_history::NodeData {
| NetworkUpgrade::Nu6
| NetworkUpgrade::Nu7 => zcash_history::NodeData {
consensus_branch_id: branch_id.into(),
subtree_commitment: block_hash,
start_time: time,
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/transaction/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ impl Arbitrary for Transaction {
NetworkUpgrade::Blossom | NetworkUpgrade::Heartwood | NetworkUpgrade::Canopy => {
Self::v4_strategy(ledger_state)
}
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 => prop_oneof![
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => prop_oneof![
Self::v4_strategy(ledger_state.clone()),
Self::v5_strategy(ledger_state)
]
Expand Down
2 changes: 1 addition & 1 deletion zebra-consensus/src/checkpoint/list/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ fn checkpoint_list_load_hard_coded() -> Result<(), BoxError> {

let _ = Mainnet.checkpoint_list();
let _ = Network::new_default_testnet().checkpoint_list();
let _ = Network::new_regtest(None, None).checkpoint_list();
let _ = Network::new_regtest(None, None, None).checkpoint_list();

Ok(())
}
Expand Down
5 changes: 3 additions & 2 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ where
| NetworkUpgrade::Heartwood
| NetworkUpgrade::Canopy
| NetworkUpgrade::Nu5
| NetworkUpgrade::Nu6 => Ok(()),
| NetworkUpgrade::Nu6
| NetworkUpgrade::Nu7 => Ok(()),

// Does not support V4 transactions
NetworkUpgrade::Genesis
Expand Down Expand Up @@ -766,7 +767,7 @@ where
//
// Note: Here we verify the transaction version number of the above rule, the group
// id is checked in zebra-chain crate, in the transaction serialize.
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 => Ok(()),
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => Ok(()),

// Does not support V5 transactions
NetworkUpgrade::Genesis
Expand Down
3 changes: 2 additions & 1 deletion zebra-consensus/src/transaction/tests/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ fn sanitize_transaction_version(
BeforeOverwinter => 2,
Overwinter => 3,
Sapling | Blossom | Heartwood | Canopy => 4,
Nu5 | Nu6 => 5,
// FIXME: Use 6 for Nu7
Nu5 | Nu6 | Nu7 => 5,
}
};

Expand Down
17 changes: 11 additions & 6 deletions zebra-network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,17 @@ impl<'de> Deserialize<'de> for Config {
(NetworkKind::Mainnet, _) => Network::Mainnet,
(NetworkKind::Testnet, None) => Network::new_default_testnet(),
(NetworkKind::Regtest, testnet_parameters) => {
let (nu5_activation_height, nu6_activation_height) = testnet_parameters
.and_then(|params| params.activation_heights)
.map(|ConfiguredActivationHeights { nu5, nu6, .. }| (nu5, nu6))
.unwrap_or_default();

Network::new_regtest(nu5_activation_height, nu6_activation_height)
let (nu5_activation_height, nu6_activation_height, nu7_activation_height) =
testnet_parameters
.and_then(|params| params.activation_heights)
.map(|ConfiguredActivationHeights { nu5, nu6, nu7, .. }| (nu5, nu6, nu7))
.unwrap_or_default();

Network::new_regtest(
nu5_activation_height,
nu6_activation_height,
nu7_activation_height,
)
}
(
NetworkKind::Testnet,
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 @@ -403,7 +403,7 @@ lazy_static! {

hash_map.insert(NetworkKind::Mainnet, Version::min_specified_for_upgrade(&Mainnet, Nu5));
hash_map.insert(NetworkKind::Testnet, Version::min_specified_for_upgrade(&Network::new_default_testnet(), Nu5));
hash_map.insert(NetworkKind::Regtest, Version::min_specified_for_upgrade(&Network::new_regtest(None, None), Nu5));
hash_map.insert(NetworkKind::Regtest, Version::min_specified_for_upgrade(&Network::new_regtest(None, None, None), Nu5));

hash_map
};
Expand Down
3 changes: 3 additions & 0 deletions zebra-network/src/protocol/external/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ impl Version {
(Mainnet, Nu5) => 170_100,
(Testnet(params), Nu6) if params.is_default_testnet() => 170_110,
(Mainnet, Nu6) => 170_120,
// FIXME: use proper values for Nu7
(Testnet(params), Nu7) if params.is_default_testnet() => 170_111,
(Mainnet, Nu7) => 170_121,
Comment on lines +110 to +111
Copy link
Collaborator

@arya2 arya2 Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only requirement here is that there should be some versions between the prior min specified protocol versions and new ones in case something goes wrong with the prior NU deployment.

This PR could also update the CURRENT_NETWORK_PROTOCOL_VERSION (and should if it includes an NU7 activation height on Testnet, though it would be better to remove the Testnet activation height).

Update: 170_130 & 170_140 are the currently the values prescribed in the draft ZIP for NU7 deployment, though they may still change before it's out of draft status.

Suggested change
(Testnet(params), Nu7) if params.is_default_testnet() => 170_111,
(Mainnet, Nu7) => 170_121,
(Testnet(params), Nu7) if params.is_default_testnet() => 170_130,
(Mainnet, Nu7) => 170_140,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37


// It should be fine to reject peers with earlier network protocol versions on custom testnets for now.
(Testnet(_), _) => CURRENT_NETWORK_PROTOCOL_VERSION.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub fn proposal_block_from_template(
| NetworkUpgrade::Blossom
| NetworkUpgrade::Heartwood => panic!("pre-Canopy block templates not supported"),
NetworkUpgrade::Canopy => chain_history_root.bytes_in_serialized_order().into(),
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 => {
NetworkUpgrade::Nu5 | NetworkUpgrade::Nu6 | NetworkUpgrade::Nu7 => {
block_commitments_hash.bytes_in_serialized_order().into()
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: zebra-rpc/src/methods/tests/snapshot.rs
assertion_line: 562
expression: info
---
{
Expand Down Expand Up @@ -69,6 +70,11 @@ expression: info
"name": "NU6",
"activationheight": 2976000,
"status": "pending"
},
"c8e71056": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for a new random string

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37

"name": "NU7",
"activationheight": 2942001,
"status": "pending"
}
},
"consensus": {
Expand Down
4 changes: 2 additions & 2 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ async fn fully_synced_rpc_z_getsubtreesbyindex_snapshot_test() -> Result<()> {
async fn validate_regtest_genesis_block() {
let _init_guard = zebra_test::init();

let network = Network::new_regtest(None, None);
let network = Network::new_regtest(None, None, None);
let state = zebra_state::init_test(&network);
let (
block_verifier_router,
Expand Down Expand Up @@ -2982,7 +2982,7 @@ async fn trusted_chain_sync_handles_forks_correctly() -> Result<()> {
use zebra_state::{ReadResponse, Response};

let _init_guard = zebra_test::init();
let mut config = os_assigned_rpc_port_config(false, &Network::new_regtest(None, None))?;
let mut config = os_assigned_rpc_port_config(false, &Network::new_regtest(None, None, None))?;
config.state.ephemeral = false;
let network = config.network.network.clone();

Expand Down
2 changes: 2 additions & 0 deletions zebrad/tests/common/configs/v1.9.0.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Heartwood = 903_800
Canopy = 1_028_500
NU5 = 1_842_420
NU6 = 2_000_000
# FIXME: Use a proper value for NU7.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is already okay. These test configs are just meant to ensure that valid past configs can still be parsed whenever the config is changed and, secondarily, to provide examples.

Suggested change
# FIXME: Use a proper value for NU7.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to this comment copied to #37

NU7 = 2_000_001

[network.testnet_parameters.pre_nu6_funding_streams.height_range]
start = 0
Expand Down
2 changes: 1 addition & 1 deletion zebrad/tests/common/regtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub(crate) async fn submit_blocks_test() -> Result<()> {
let _init_guard = zebra_test::init();
info!("starting regtest submit_blocks test");

let network = Network::new_regtest(None, None);
let network = Network::new_regtest(None, None, None);
let mut config = os_assigned_rpc_port_config(false, &network)?;
config.mempool.debug_enable_at_height = Some(0);

Expand Down