diff --git a/zebra-chain/src/parameters/network/subsidy.rs b/zebra-chain/src/parameters/network/subsidy.rs index 1112ac1cf..6506d6640 100644 --- a/zebra-chain/src/parameters/network/subsidy.rs +++ b/zebra-chain/src/parameters/network/subsidy.rs @@ -69,23 +69,33 @@ pub enum FundingStreamReceiver { impl FundingStreamReceiver { /// Returns a human-readable name and a specification URL for the receiver, as described in - /// [ZIP-1014] and [`zcashd`]. + /// [ZIP-1014] and [`zcashd`] before NU6. After NU6, the specification is in the [ZIP-lockbox]. /// /// [ZIP-1014]: https://zips.z.cash/zip-1014#abstract /// [`zcashd`]: https://github.com/zcash/zcash/blob/3f09cfa00a3c90336580a127e0096d99e25a38d6/src/consensus/funding.cpp#L13-L32 - // TODO: Update method documentation with a reference to https://zips.z.cash/draft-nuttycom-funding-allocation once its - // status is updated to 'Proposed'. - pub fn info(&self) -> (&'static str, &'static str) { - ( - match self { - FundingStreamReceiver::Ecc => "Electric Coin Company", - FundingStreamReceiver::ZcashFoundation => "Zcash Foundation", - FundingStreamReceiver::MajorGrants => "Major Grants", - // TODO: Find out what this should be called and update the funding stream name - FundingStreamReceiver::Deferred => "Lockbox", - }, - FUNDING_STREAM_SPECIFICATION, - ) + /// [ZIP-lockbox]: https://zips.z.cash/draft-nuttycom-funding-allocation#alternative-2-hybrid-deferred-dev-fund-transitioning-to-a-non-direct-funding-model + pub fn info(&self, is_nu6: bool) -> (&'static str, &'static str) { + if is_nu6 { + ( + match self { + FundingStreamReceiver::Ecc => "Electric Coin Company", + FundingStreamReceiver::ZcashFoundation => "Zcash Foundation", + FundingStreamReceiver::MajorGrants => "Zcash Community Grants NU6", + FundingStreamReceiver::Deferred => "Lockbox NU6", + }, + LOCKBOX_SPECIFICATION, + ) + } else { + ( + match self { + FundingStreamReceiver::Ecc => "Electric Coin Company", + FundingStreamReceiver::ZcashFoundation => "Zcash Foundation", + FundingStreamReceiver::MajorGrants => "Major Grants", + FundingStreamReceiver::Deferred => "Lockbox NU6", + }, + FUNDING_STREAM_SPECIFICATION, + ) + } } } @@ -94,12 +104,16 @@ impl FundingStreamReceiver { /// [7.10.1]: https://zips.z.cash/protocol/protocol.pdf#zip214fundingstreams pub const FUNDING_STREAM_RECEIVER_DENOMINATOR: u64 = 100; -// TODO: Update the link for post-NU6 funding streams. -/// The specification for all current funding stream receivers, a URL that links to [ZIP-214]. +/// The specification for pre-NU6 funding stream receivers, a URL that links to [ZIP-214]. /// /// [ZIP-214]: https://zips.z.cash/zip-0214 pub const FUNDING_STREAM_SPECIFICATION: &str = "https://zips.z.cash/zip-0214"; +/// The specification for post-NU6 funding stream and lockbox receivers, a URL that links to [ZIP-lockbox]. +/// +/// [ZIP-lockbox]: https://zips.z.cash/draft-nuttycom-funding-allocation#alternative-2-hybrid-deferred-dev-fund-transitioning-to-a-non-direct-funding-model +pub const LOCKBOX_SPECIFICATION: &str = "https://zips.z.cash/draft-nuttycom-funding-allocation#alternative-2-hybrid-deferred-dev-fund-transitioning-to-a-non-direct-funding-model"; + /// Funding stream recipients and height ranges. #[derive(Deserialize, Clone, Debug, Eq, PartialEq)] pub struct FundingStreams { diff --git a/zebra-chain/src/parameters/network_upgrade.rs b/zebra-chain/src/parameters/network_upgrade.rs index 73c027877..c3f62e9a6 100644 --- a/zebra-chain/src/parameters/network_upgrade.rs +++ b/zebra-chain/src/parameters/network_upgrade.rs @@ -125,8 +125,7 @@ pub(super) const TESTNET_ACTIVATION_HEIGHTS: &[(block::Height, NetworkUpgrade)] (block::Height(903_800), Heartwood), (block::Height(1_028_500), Canopy), (block::Height(1_842_420), Nu5), - // TODO: Add NU6 - // (block::Height(2_942_000), Nu6), + // TODO: Add NU6 activation height once it's been specified. ]; /// Fake testnet network upgrade activation heights, used in tests. diff --git a/zebra-network/src/protocol/external/types.rs b/zebra-network/src/protocol/external/types.rs index 7ac76d767..168d6418f 100644 --- a/zebra-network/src/protocol/external/types.rs +++ b/zebra-network/src/protocol/external/types.rs @@ -194,7 +194,7 @@ mod test { let _init_guard = zebra_test::init(); let highest_network_upgrade = NetworkUpgrade::current(network, block::Height::MAX); - assert!(highest_network_upgrade == Nu5 || highest_network_upgrade == Canopy, + assert!(highest_network_upgrade == Nu6 || highest_network_upgrade == Nu5, "expected coverage of all network upgrades: add the new network upgrade to the list in this test"); for &network_upgrade in &[ @@ -205,6 +205,7 @@ mod test { Heartwood, Canopy, Nu5, + Nu6, ] { let height = network_upgrade.activation_height(network); if let Some(height) = height { diff --git a/zebra-rpc/src/methods/get_block_template_rpcs.rs b/zebra-rpc/src/methods/get_block_template_rpcs.rs index fd4dffc42..464018979 100644 --- a/zebra-rpc/src/methods/get_block_template_rpcs.rs +++ b/zebra-rpc/src/methods/get_block_template_rpcs.rs @@ -10,11 +10,14 @@ use tower::{Service, ServiceExt}; use zcash_address::{unified::Encoding, TryFromAddress}; use zebra_chain::{ - amount::Amount, + amount::{self, Amount, NonNegative}, block::{self, Block, Height, TryIntoHeight}, chain_sync_status::ChainSyncStatus, chain_tip::ChainTip, - parameters::{subsidy::ParameterSubsidy, Network, NetworkKind, POW_AVERAGING_WINDOW}, + parameters::{ + subsidy::{FundingStreamReceiver, ParameterSubsidy}, + Network, NetworkKind, NetworkUpgrade, POW_AVERAGING_WINDOW, + }, primitives, serialization::ZcashDeserializeInto, transparent::{ @@ -31,6 +34,7 @@ use zebra_state::{ReadRequest, ReadResponse}; use crate::methods::{ best_chain_tip_height, + errors::MapServerError, get_block_template_rpcs::{ constants::{ DEFAULT_SOLUTION_RATE_WINDOW_SIZE, GET_BLOCK_TEMPLATE_MEMPOOL_LONG_POLL_INTERVAL, @@ -1178,35 +1182,27 @@ where }); } - let expected_block_subsidy = - block_subsidy(height, &network).map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })?; - - let miner_subsidy = - miner_subsidy(height, &network, expected_block_subsidy).map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })?; // Always zero for post-halving blocks let founders = Amount::zero(); - let funding_streams = funding_stream_values(height, &network, expected_block_subsidy) - .map_err(|error| Error { - code: ErrorCode::ServerError(0), - message: error.to_string(), - data: None, - })?; - let mut funding_streams: Vec<_> = funding_streams - .iter() - .filter_map(|(receiver, value)| { - let address = funding_stream_address(height, &network, *receiver)?; - Some((*receiver, FundingStream::new(*receiver, *value, address))) - }) - .collect(); + let total_block_subsidy = block_subsidy(height, &network).map_server_error()?; + let miner_subsidy = + miner_subsidy(height, &network, total_block_subsidy).map_server_error()?; + + let (lockbox_streams, mut funding_streams): (Vec<_>, Vec<_>) = + funding_stream_values(height, &network, total_block_subsidy) + .map_server_error()? + .into_iter() + // Separate the funding streams into deferred and non-deferred streams + .partition(|(receiver, _)| matches!(receiver, FundingStreamReceiver::Deferred)); + + let is_nu6 = NetworkUpgrade::current(&network, height) == NetworkUpgrade::Nu6; + + let [lockbox_total, funding_streams_total]: [std::result::Result< + Amount, + amount::Error, + >; 2] = [&lockbox_streams, &funding_streams] + .map(|streams| streams.iter().map(|&(_, amount)| amount).sum()); // Use the same funding stream order as zcashd funding_streams.sort_by_key(|(receiver, _funding_stream)| { @@ -1215,12 +1211,26 @@ where .position(|zcashd_receiver| zcashd_receiver == receiver) }); - let (_receivers, funding_streams): (Vec<_>, _) = funding_streams.into_iter().unzip(); + // Format the funding streams and lockbox streams + let [funding_streams, lockbox_streams]: [Vec<_>; 2] = + [funding_streams, lockbox_streams].map(|streams| { + streams + .into_iter() + .map(|(receiver, value)| { + let address = funding_stream_address(height, &network, receiver); + FundingStream::new(is_nu6, receiver, value, address) + }) + .collect() + }); Ok(BlockSubsidy { miner: miner_subsidy.into(), founders: founders.into(), funding_streams, + lockbox_streams, + funding_streams_total: funding_streams_total.map_server_error()?.into(), + lockbox_total: lockbox_total.map_server_error()?.into(), + total_block_subsidy: total_block_subsidy.into(), }) } .boxed() diff --git a/zebra-rpc/src/methods/get_block_template_rpcs/types/subsidy.rs b/zebra-rpc/src/methods/get_block_template_rpcs/types/subsidy.rs index 51ff30053..d7e491de5 100644 --- a/zebra-rpc/src/methods/get_block_template_rpcs/types/subsidy.rs +++ b/zebra-rpc/src/methods/get_block_template_rpcs/types/subsidy.rs @@ -9,13 +9,18 @@ use zebra_chain::{ use crate::methods::get_block_template_rpcs::types::zec::Zec; /// A response to a `getblocksubsidy` RPC request -#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Default, serde::Serialize, serde::Deserialize)] pub struct BlockSubsidy { /// An array of funding stream descriptions. - /// Always present, because Zebra returns an error for heights before the first halving. - #[serde(rename = "fundingstreams")] + /// Always present before NU6, because Zebra returns an error for heights before the first halving. + #[serde(rename = "fundingstreams", skip_serializing_if = "Vec::is_empty")] pub funding_streams: Vec, + /// An array of lockbox stream descriptions. + /// Always present after NU6. + #[serde(rename = "lockboxstreams", skip_serializing_if = "Vec::is_empty")] + pub lockbox_streams: Vec, + /// The mining reward amount in ZEC. /// /// This does not include the miner fee. @@ -26,16 +31,20 @@ pub struct BlockSubsidy { /// Zebra returns an error when asked for founders reward heights, /// because it checkpoints those blocks instead. pub founders: Zec, -} -impl Default for BlockSubsidy { - fn default() -> Self { - Self { - funding_streams: vec![], - miner: Zec::from_lossy_zec(0.0).unwrap(), - founders: Zec::from_lossy_zec(0.0).unwrap(), - } - } + /// The total funding stream amount in ZEC. + #[serde(rename = "fundingstreamstotal")] + pub funding_streams_total: Zec, + + /// The total lockbox stream amount in ZEC. + #[serde(rename = "lockboxtotal")] + pub lockbox_total: Zec, + + /// The total block subsidy amount in ZEC. + /// + /// This does not include the miner fee. + #[serde(rename = "totalblocksubsidy")] + pub total_block_subsidy: Zec, } /// A single funding stream's information in a `getblocksubsidy` RPC request @@ -58,24 +67,28 @@ pub struct FundingStream { /// /// The current Zcash funding streams only use transparent addresses, /// so Zebra doesn't support Sapling addresses in this RPC. - pub address: transparent::Address, + /// + /// This is optional so we can support funding streams with no addresses (lockbox streams). + #[serde(skip_serializing_if = "Option::is_none")] + pub address: Option, } impl FundingStream { /// Convert a `receiver`, `value`, and `address` into a `FundingStream` response. pub fn new( + is_nu6: bool, receiver: FundingStreamReceiver, value: Amount, - address: &transparent::Address, + address: Option<&transparent::Address>, ) -> FundingStream { - let (name, specification) = receiver.info(); + let (name, specification) = receiver.info(is_nu6); FundingStream { recipient: name.to_string(), specification: specification.to_string(), value: value.into(), value_zat: value, - address: address.clone(), + address: address.cloned(), } } } diff --git a/zebra-rpc/src/methods/get_block_template_rpcs/types/zec.rs b/zebra-rpc/src/methods/get_block_template_rpcs/types/zec.rs index 7aea6da72..91ab818b2 100644 --- a/zebra-rpc/src/methods/get_block_template_rpcs/types/zec.rs +++ b/zebra-rpc/src/methods/get_block_template_rpcs/types/zec.rs @@ -37,7 +37,7 @@ pub const MAX_ZEC_FORMAT_PRECISION: usize = 8; /// Unlike `zcashd`, Zebra doesn't have control over its JSON number precision, /// because it uses `serde_json`'s formatter. But `zcashd` uses a fixed-point calculation: /// -#[derive(Clone, Copy, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Copy, serde::Serialize, serde::Deserialize, Default)] #[serde(try_from = "f64")] #[serde(into = "f64")] #[serde(bound = "C: Constraint + Clone")] diff --git a/zebra-rpc/src/methods/tests/snapshot.rs b/zebra-rpc/src/methods/tests/snapshot.rs index eed914c78..55c4fee86 100644 --- a/zebra-rpc/src/methods/tests/snapshot.rs +++ b/zebra-rpc/src/methods/tests/snapshot.rs @@ -15,7 +15,8 @@ use zebra_chain::{ chain_tip::mock::MockChainTip, orchard, parameters::{ - testnet::{ConfiguredActivationHeights, Parameters}, + subsidy::POST_NU6_FUNDING_STREAMS_TESTNET, + testnet::{self, ConfiguredActivationHeights, Parameters}, Network::Mainnet, }, sapling, @@ -40,10 +41,19 @@ pub const EXCESSIVE_BLOCK_HEIGHT: u32 = MAX_ON_DISK_HEIGHT.0 + 1; async fn test_rpc_response_data() { let _init_guard = zebra_test::init(); let default_testnet = Network::new_default_testnet(); + let nu6_testnet = testnet::Parameters::build() + .with_network_name("NU6Testnet") + .with_activation_heights(ConfiguredActivationHeights { + blossom: Some(584_000), + nu6: Some(POST_NU6_FUNDING_STREAMS_TESTNET.height_range().start.0), + ..Default::default() + }) + .to_network(); tokio::join!( test_rpc_response_data_for_network(&Mainnet), test_rpc_response_data_for_network(&default_testnet), + test_rpc_response_data_for_network(&nu6_testnet), test_mocked_rpc_response_data_for_network(&Mainnet), test_mocked_rpc_response_data_for_network(&default_testnet), ); @@ -196,6 +206,16 @@ async fn test_rpc_response_data_for_network(network: &Network) { latest_chain_tip, ); + // We only want a snapshot of the `getblocksubsidy` and `getblockchaininfo` methods for the non-default Testnet (with an NU6 activation height). + if network.is_a_test_network() && !network.is_default_testnet() { + let get_blockchain_info = rpc + .get_blockchain_info() + .expect("We should have a GetBlockChainInfo struct"); + snapshot_rpc_getblockchaininfo("_future_nu6_height", get_blockchain_info, &settings); + + return; + } + // `getinfo` let get_info = rpc.get_info().expect("We should have a GetInfo struct"); snapshot_rpc_getinfo(get_info, &settings); @@ -204,7 +224,7 @@ async fn test_rpc_response_data_for_network(network: &Network) { let get_blockchain_info = rpc .get_blockchain_info() .expect("We should have a GetBlockChainInfo struct"); - snapshot_rpc_getblockchaininfo(get_blockchain_info, &settings); + snapshot_rpc_getblockchaininfo("", get_blockchain_info, &settings); // get the first transaction of the first block which is not the genesis let first_block_first_transaction = &blocks[1].transactions[0]; @@ -531,9 +551,13 @@ fn snapshot_rpc_getinfo(info: GetInfo, settings: &insta::Settings) { } /// Snapshot `getblockchaininfo` response, using `cargo insta` and JSON serialization. -fn snapshot_rpc_getblockchaininfo(info: GetBlockChainInfo, settings: &insta::Settings) { +fn snapshot_rpc_getblockchaininfo( + variant_suffix: &str, + info: GetBlockChainInfo, + settings: &insta::Settings, +) { settings.bind(|| { - insta::assert_json_snapshot!("get_blockchain_info", info, { + insta::assert_json_snapshot!(format!("get_blockchain_info{variant_suffix}"), info, { ".estimatedheight" => dynamic_redaction(|value, _path| { // assert that the value looks like a valid height here assert!(u32::try_from(value.as_u64().unwrap()).unwrap() < Height::MAX_AS_U32); diff --git a/zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs b/zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs index 93343d605..8afb7dd31 100644 --- a/zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs +++ b/zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs @@ -148,6 +148,18 @@ pub async fn test_responses( mock_address_book, ); + if network.is_a_test_network() && !network.is_default_testnet() { + let fake_future_nu6_block_height = + NetworkUpgrade::Nu6.activation_height(network).unwrap().0 + 100_000; + let get_block_subsidy = get_block_template_rpc + .get_block_subsidy(Some(fake_future_nu6_block_height)) + .await + .expect("We should have a success response"); + snapshot_rpc_getblocksubsidy("future_nu6_height", get_block_subsidy, &settings); + // We only want a snapshot of the `getblocksubsidy` method for the non-default Testnet (with an NU6 activation height). + return; + } + // `getblockcount` let get_block_count = get_block_template_rpc .get_block_count() diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@mainnet_10.snap index 3d1b21907..0183f2cd2 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@mainnet_10.snap @@ -3,7 +3,9 @@ source: zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs expression: get_block_subsidy --- { - "fundingstreams": [], "miner": 0.00610351, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.0, + "lockboxtotal": 0.0, + "totalblocksubsidy": 0.00610351 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@testnet_10.snap index 3d1b21907..0183f2cd2 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_excessive_height@testnet_10.snap @@ -3,7 +3,9 @@ source: zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs expression: get_block_subsidy --- { - "fundingstreams": [], "miner": 0.00610351, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.0, + "lockboxtotal": 0.0, + "totalblocksubsidy": 0.00610351 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@mainnet_10.snap index 023860146..4491a0f6d 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@mainnet_10.snap @@ -27,5 +27,8 @@ expression: get_block_subsidy } ], "miner": 2.5, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.625, + "lockboxtotal": 0.0, + "totalblocksubsidy": 3.125 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@testnet_10.snap index ff14493b2..fe8d38492 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_height@testnet_10.snap @@ -27,5 +27,8 @@ expression: get_block_subsidy } ], "miner": 2.5, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.625, + "lockboxtotal": 0.0, + "totalblocksubsidy": 3.125 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_nu6_height@nu6testnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_nu6_height@nu6testnet_10.snap new file mode 100644 index 000000000..aba4f4d5a --- /dev/null +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_future_nu6_height@nu6testnet_10.snap @@ -0,0 +1,28 @@ +--- +source: zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs +expression: get_block_subsidy +--- +{ + "fundingstreams": [ + { + "recipient": "Zcash Community Grants NU6", + "specification": "https://zips.z.cash/draft-nuttycom-funding-allocation#alternative-2-hybrid-deferred-dev-fund-transitioning-to-a-non-direct-funding-model", + "value": 0.125, + "valueZat": 12500000, + "address": "t2HifwjUj9uyxr9bknR8LFuQbc98c3vkXtu" + } + ], + "lockboxstreams": [ + { + "recipient": "Lockbox NU6", + "specification": "https://zips.z.cash/draft-nuttycom-funding-allocation#alternative-2-hybrid-deferred-dev-fund-transitioning-to-a-non-direct-funding-model", + "value": 0.1875, + "valueZat": 18750000 + } + ], + "miner": 1.25, + "founders": 0.0, + "fundingstreamstotal": 0.125, + "lockboxtotal": 0.1875, + "totalblocksubsidy": 1.5625 +} diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@mainnet_10.snap index 41879958b..73ba8847d 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@mainnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@mainnet_10.snap @@ -27,5 +27,8 @@ expression: get_block_subsidy } ], "miner": 2.5, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.625, + "lockboxtotal": 0.0, + "totalblocksubsidy": 3.125 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@testnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@testnet_10.snap index 14404c99b..e556992fe 100644 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@testnet_10.snap +++ b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_block_subsidy_tip_height@testnet_10.snap @@ -27,5 +27,8 @@ expression: get_block_subsidy } ], "miner": 2.5, - "founders": 0.0 + "founders": 0.0, + "fundingstreamstotal": 0.625, + "lockboxtotal": 0.0, + "totalblocksubsidy": 3.125 } diff --git a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_difficulty_invalid_populated@mainnet_10.snap b/zebra-rpc/src/methods/tests/snapshot/snapshots/get_difficulty_invalid_populated@mainnet_10.snap deleted file mode 100644 index 0216bc8b2..000000000 --- a/zebra-rpc/src/methods/tests/snapshot/snapshots/get_difficulty_invalid_populated@mainnet_10.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: zebra-rpc/src/methods/tests/snapshot/get_block_template_rpcs.rs -expression: difficulty ---- -{ - "Err": { - "code": 0, - "message": "Zebra's state only has a few blocks, wait until it syncs to the chain tip" - } -} diff --git a/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info_future_nu6_height@nu6testnet_10.snap b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info_future_nu6_height@nu6testnet_10.snap new file mode 100644 index 000000000..d2250e7fe --- /dev/null +++ b/zebra-rpc/src/methods/tests/snapshots/get_blockchain_info_future_nu6_height@nu6testnet_10.snap @@ -0,0 +1,51 @@ +--- +source: zebra-rpc/src/methods/tests/snapshot.rs +expression: info +--- +{ + "chain": "test", + "blocks": 10, + "bestblockhash": "079f4c752729be63e6341ee9bce42fbbe37236aba22e3deb82405f3c2805c112", + "estimatedheight": "[Height]", + "upgrades": { + "5ba81b19": { + "name": "Overwinter", + "activationheight": 584000, + "status": "pending" + }, + "76b809bb": { + "name": "Sapling", + "activationheight": 584000, + "status": "pending" + }, + "2bb40e60": { + "name": "Blossom", + "activationheight": 584000, + "status": "pending" + }, + "f5b9230b": { + "name": "Heartwood", + "activationheight": 2942000, + "status": "pending" + }, + "e9ff75a6": { + "name": "Canopy", + "activationheight": 2942000, + "status": "pending" + }, + "c2d6d0b4": { + "name": "NU5", + "activationheight": 2942000, + "status": "pending" + }, + "c8e71055": { + "name": "Nu6", + "activationheight": 2942000, + "status": "pending" + } + }, + "consensus": { + "chaintip": "00000000", + "nextblock": "00000000" + } +}