Skip to content

Commit 640d321

Browse files
committed
Post-rebase fixes.
1 parent fbef780 commit 640d321

File tree

23 files changed

+51
-121
lines changed

23 files changed

+51
-121
lines changed

Cargo.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ dependencies = [
12931293
[[package]]
12941294
name = "equihash"
12951295
version = "0.2.0"
1296-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
1296+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
12971297
dependencies = [
12981298
"blake2b_simd",
12991299
"byteorder",
@@ -1328,7 +1328,7 @@ dependencies = [
13281328
[[package]]
13291329
name = "f4jumble"
13301330
version = "0.1.0"
1331-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
1331+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
13321332
dependencies = [
13331333
"blake2b_simd",
13341334
]
@@ -5780,7 +5780,7 @@ dependencies = [
57805780
[[package]]
57815781
name = "zcash_address"
57825782
version = "0.6.0"
5783-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5783+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
57845784
dependencies = [
57855785
"bech32",
57865786
"bs58",
@@ -5792,7 +5792,7 @@ dependencies = [
57925792
[[package]]
57935793
name = "zcash_client_backend"
57945794
version = "0.15.0"
5795-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5795+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
57965796
dependencies = [
57975797
"base64 0.22.1",
57985798
"bech32",
@@ -5831,7 +5831,7 @@ dependencies = [
58315831
[[package]]
58325832
name = "zcash_encoding"
58335833
version = "0.2.1"
5834-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5834+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
58355835
dependencies = [
58365836
"byteorder",
58375837
"nonempty",
@@ -5840,7 +5840,7 @@ dependencies = [
58405840
[[package]]
58415841
name = "zcash_history"
58425842
version = "0.4.0"
5843-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5843+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
58445844
dependencies = [
58455845
"blake2b_simd",
58465846
"byteorder",
@@ -5850,7 +5850,7 @@ dependencies = [
58505850
[[package]]
58515851
name = "zcash_keys"
58525852
version = "0.5.0"
5853-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5853+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
58545854
dependencies = [
58555855
"bech32",
58565856
"blake2b_simd",
@@ -5888,15 +5888,15 @@ dependencies = [
58885888
[[package]]
58895889
name = "zcash_primitives"
58905890
version = "0.20.0"
5891-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5891+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
58925892
dependencies = [
58935893
"aes",
58945894
"bip32",
58955895
"blake2b_simd",
58965896
"bs58",
58975897
"byteorder",
58985898
"document-features",
5899-
"equihash 0.2.0 (git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work)",
5899+
"equihash 0.2.0 (git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm)",
59005900
"ff",
59015901
"fpe",
59025902
"group",
@@ -5926,7 +5926,7 @@ dependencies = [
59265926
[[package]]
59275927
name = "zcash_proofs"
59285928
version = "0.20.0"
5929-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5929+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
59305930
dependencies = [
59315931
"bellman",
59325932
"blake2b_simd",
@@ -5948,7 +5948,7 @@ dependencies = [
59485948
[[package]]
59495949
name = "zcash_protocol"
59505950
version = "0.4.1"
5951-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
5951+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
59525952
dependencies = [
59535953
"document-features",
59545954
"memuse",
@@ -6536,7 +6536,7 @@ dependencies = [
65366536
[[package]]
65376537
name = "zip321"
65386538
version = "0.2.0"
6539-
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm-work#d5bf1a26bcc768f2bd957c01ba917cffd94be14e"
6539+
source = "git+https://github.com/ShieldedLabs/librustzcash/?branch=nsm#dd96084ceb4b64ba4640e8e1c092c65ea773bd6f"
65406540
dependencies = [
65416541
"base64 0.22.1",
65426542
"nom",

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ incrementalmerkletree = { version = "0.7.1", features = ["legacy-api"] }
2626
orchard = "0.10.0"
2727
sapling-crypto = "0.3.0"
2828
# TODO: Revert to a release once librustzcash is released (#8749).
29-
zcash_address = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
30-
zcash_client_backend = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
31-
zcash_encoding = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
32-
zcash_history = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
33-
zcash_keys = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
34-
zcash_primitives = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
35-
zcash_proofs = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
36-
zcash_protocol = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm-work" }
29+
zcash_address = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
30+
zcash_client_backend = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
31+
zcash_encoding = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
32+
zcash_history = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
33+
zcash_keys = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
34+
zcash_primitives = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
35+
zcash_proofs = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
36+
zcash_protocol = { git = "https://github.com/ShieldedLabs/librustzcash/", branch = "nsm" }
3737
abscissa_core = "0.7.0"
3838
atty = "0.2.14"
3939
base64 = "0.22.1"

zebra-chain/src/block/commitment.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ impl Commitment {
139139
(Nu5 | Nu6 | Nu7, _) => Ok(ChainHistoryBlockTxAuthCommitment(
140140
ChainHistoryBlockTxAuthCommitmentHash(bytes),
141141
)),
142-
#[cfg(zcash_unstable = "nsm")]
143-
(ZFuture, _) => Ok(ChainHistoryBlockTxAuthCommitment(
144-
ChainHistoryBlockTxAuthCommitmentHash(bytes),
145-
)),
146142
}
147143
}
148144

zebra-chain/src/block/subsidy/general.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,6 @@ pub fn num_halvings(height: Height, network: &Network) -> u32 {
5757
.expect("already checked for negatives")
5858
}
5959

60-
#[cfg(zcash_unstable = "nsm")]
61-
pub fn block_subsidy(
62-
height: Height,
63-
network: &Network,
64-
money_reserve: Amount<NonNegative>,
65-
) -> Result<Amount<NonNegative>, SubsidyError> {
66-
let nsm_activation_height = ZFuture
67-
.activation_height(network)
68-
.expect("ZFuture activation height should be available");
69-
70-
if height < nsm_activation_height {
71-
block_subsidy_pre_nsm(height, network)
72-
} else {
73-
let money_reserve: i64 = money_reserve.into();
74-
let money_reserve: i128 = money_reserve.into();
75-
const BLOCK_SUBSIDY_DENOMINATOR: i128 = 10_000_000_000;
76-
const BLOCK_SUBSIDY_NUMERATOR: i128 = 4_126;
77-
78-
// calculate the block subsidy (in zatoshi) using the money reserve, note the rounding up
79-
let subsidy = (money_reserve * BLOCK_SUBSIDY_NUMERATOR + (BLOCK_SUBSIDY_DENOMINATOR - 1))
80-
/ BLOCK_SUBSIDY_DENOMINATOR;
81-
82-
Ok(subsidy.try_into().expect("subsidy should fit in Amount"))
83-
}
84-
}
85-
8660
#[cfg(zcash_unstable = "zip234")]
8761
pub fn block_subsidy(
8862
height: Height,

zebra-chain/src/primitives/zcash_history.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -291,21 +291,6 @@ impl Version for zcash_history::V1 {
291291
end_height: height.0 as u64,
292292
sapling_tx: sapling_tx_count,
293293
},
294-
#[cfg(zcash_unstable = "nsm")]
295-
NetworkUpgrade::ZFuture => zcash_history::NodeData {
296-
consensus_branch_id: branch_id.into(),
297-
subtree_commitment: block_hash,
298-
start_time: time,
299-
end_time: time,
300-
start_target: target,
301-
end_target: target,
302-
start_sapling_root: sapling_root,
303-
end_sapling_root: sapling_root,
304-
subtree_total_work: work,
305-
start_height: height.0 as u64,
306-
end_height: height.0 as u64,
307-
sapling_tx: sapling_tx_count,
308-
},
309294
}
310295
}
311296
}

zebra-chain/src/primitives/zcash_primitives.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ impl TryFrom<&Transaction> for zp_tx::Transaction {
168168
| Transaction::V6 {
169169
network_upgrade, ..
170170
} => network_upgrade,
171-
#[cfg(zcash_unstable = "nsm")]
172-
Transaction::ZFuture {
173-
network_upgrade, ..
174-
} => network_upgrade,
175171
Transaction::V1 { .. }
176172
| Transaction::V2 { .. }
177173
| Transaction::V3 { .. }

zebra-chain/src/transaction/arbitrary.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,6 @@ impl Arbitrary for Transaction {
783783
Self::v5_strategy(ledger_state)
784784
]
785785
.boxed(),
786-
#[cfg(zcash_unstable = "nsm")]
787-
NetworkUpgrade::ZFuture => prop_oneof![
788-
Self::v4_strategy(ledger_state.clone()),
789-
Self::v5_strategy(ledger_state)
790-
]
791-
.boxed(),
792786
}
793787
}
794788

zebra-chain/src/transaction/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ impl Transaction {
1616
height: Height,
1717
outputs: impl IntoIterator<Item = (Amount<NonNegative>, transparent::Script)>,
1818
extra_coinbase_data: Vec<u8>,
19-
#[cfg(zcash_unstable = "zip235")]
20-
miner_fee: Amount<NonNegative>,
19+
#[cfg(zcash_unstable = "zip235")] miner_fee: Amount<NonNegative>,
2120
zip233_amount: Option<Amount<NonNegative>>,
2221
) -> Transaction {
2322
// # Consensus

zebra-chain/src/transaction/tests/vectors.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -947,27 +947,6 @@ fn binding_signatures() {
947947
}
948948
}
949949
}
950-
#[cfg(zcash_unstable = "nsm")]
951-
Transaction::ZFuture {
952-
sapling_shielded_data,
953-
..
954-
} => {
955-
if let Some(sapling_shielded_data) = sapling_shielded_data {
956-
let shielded_sighash =
957-
tx.sighash(upgrade.branch_id().unwrap(), HashType::ALL, &[], None);
958-
959-
let bvk = redjubjub::VerificationKey::try_from(
960-
sapling_shielded_data.binding_verification_key(),
961-
)
962-
.expect("a valid redjubjub::VerificationKey");
963-
964-
bvk.verify(
965-
shielded_sighash.as_ref(),
966-
&sapling_shielded_data.binding_sig,
967-
)
968-
.expect("must pass verification");
969-
}
970-
}
971950
}
972951
}
973952

zebra-consensus/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ categories = ["asynchronous", "cryptography::cryptocurrencies"]
1717
[features]
1818
default = []
1919

20-
nsm = []
21-
2220
# Production features that activate extra dependencies, or extra features in dependencies
2321

2422
progress-bar = [

0 commit comments

Comments
 (0)