change(deps): Upgrade to the zcash_primitives 0.10 API (#6087)
* bump zcash_primitives and proofs to 0.10.0 * Update to latest Sapling API * Update Cargo.lock
This commit is contained in:
parent
c4032e2b7f
commit
8c0176fca5
|
|
@ -5359,9 +5359,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zcash_primitives"
|
name = "zcash_primitives"
|
||||||
version = "0.9.1"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0f9a45953c4ddd81d68f45920955707f45c8926800671f354dd13b97507edf28"
|
checksum = "b6879bd4026d9269a41ca91858f453b523f30824288248148211e1cab23b3e0d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"bip0039",
|
"bip0039",
|
||||||
|
|
@ -5395,9 +5395,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zcash_proofs"
|
name = "zcash_proofs"
|
||||||
version = "0.9.0"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "77381adc72286874e563ee36ba99953946abcbd195ada45440a2754ca823d407"
|
checksum = "28ca180a8138ae6e2de2b88573ed19dd57798f42a79a00d992b4d727132c7081"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bellman",
|
"bellman",
|
||||||
"blake2b_simd",
|
"blake2b_simd",
|
||||||
|
|
@ -5410,7 +5410,7 @@ dependencies = [
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"redjubjub",
|
"redjubjub",
|
||||||
"tracing",
|
"tracing",
|
||||||
"zcash_primitives 0.9.1",
|
"zcash_primitives 0.10.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -5492,7 +5492,7 @@ dependencies = [
|
||||||
"zcash_encoding",
|
"zcash_encoding",
|
||||||
"zcash_history",
|
"zcash_history",
|
||||||
"zcash_note_encryption",
|
"zcash_note_encryption",
|
||||||
"zcash_primitives 0.9.1",
|
"zcash_primitives 0.10.0",
|
||||||
"zebra-test",
|
"zebra-test",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ orchard = "0.3.0"
|
||||||
zcash_encoding = "0.2.0"
|
zcash_encoding = "0.2.0"
|
||||||
zcash_history = "0.3.0"
|
zcash_history = "0.3.0"
|
||||||
zcash_note_encryption = "0.2.0"
|
zcash_note_encryption = "0.2.0"
|
||||||
zcash_primitives = { version = "0.9.1", features = ["transparent-inputs"] }
|
zcash_primitives = { version = "0.10.0", features = ["transparent-inputs"] }
|
||||||
|
|
||||||
# Time
|
# Time
|
||||||
chrono = { version = "0.4.23", default-features = false, features = ["clock", "std", "serde"] }
|
chrono = { version = "0.4.23", default-features = false, features = ["clock", "std", "serde"] }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//! Contains code that interfaces with the zcash_note_encryption crate from
|
//! Contains code that interfaces with the zcash_note_encryption crate from
|
||||||
//! librustzcash.
|
//! librustzcash.
|
||||||
//!
|
|
||||||
use crate::{
|
use crate::{
|
||||||
block::Height,
|
block::Height,
|
||||||
parameters::{Network, NetworkUpgrade},
|
parameters::{Network, NetworkUpgrade},
|
||||||
|
|
@ -24,7 +24,7 @@ pub fn decrypts_successfully(transaction: &Transaction, network: Network, height
|
||||||
let null_sapling_ovk = zcash_primitives::keys::OutgoingViewingKey([0u8; 32]);
|
let null_sapling_ovk = zcash_primitives::keys::OutgoingViewingKey([0u8; 32]);
|
||||||
|
|
||||||
if let Some(bundle) = alt_tx.sapling_bundle() {
|
if let Some(bundle) = alt_tx.sapling_bundle() {
|
||||||
for output in bundle.shielded_outputs.iter() {
|
for output in bundle.shielded_outputs().iter() {
|
||||||
let recovery = match network {
|
let recovery = match network {
|
||||||
Network::Mainnet => {
|
Network::Mainnet => {
|
||||||
zcash_primitives::sapling::note_encryption::try_sapling_output_recovery(
|
zcash_primitives::sapling::note_encryption::try_sapling_output_recovery(
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ use crate::{
|
||||||
transparent::{self, Script},
|
transparent::{self, Script},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO: move copied and modified code to a separate module.
|
||||||
|
//
|
||||||
// Used by boilerplate code below.
|
// Used by boilerplate code below.
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
|
@ -87,10 +89,18 @@ impl
|
||||||
zp_tx::components::sapling::Authorized,
|
zp_tx::components::sapling::Authorized,
|
||||||
> for IdentityMap
|
> for IdentityMap
|
||||||
{
|
{
|
||||||
fn map_proof(
|
fn map_spend_proof(
|
||||||
&self,
|
&self,
|
||||||
p: <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::Proof,
|
p: <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::SpendProof,
|
||||||
) -> <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::Proof
|
) -> <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::SpendProof
|
||||||
|
{
|
||||||
|
p
|
||||||
|
}
|
||||||
|
|
||||||
|
fn map_output_proof(
|
||||||
|
&self,
|
||||||
|
p: <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::OutputProof,
|
||||||
|
) -> <zp_tx::components::sapling::Authorized as zp_tx::components::sapling::Authorization>::OutputProof
|
||||||
{
|
{
|
||||||
p
|
p
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ tracing-futures = "0.2.5"
|
||||||
|
|
||||||
orchard = "0.3.0"
|
orchard = "0.3.0"
|
||||||
|
|
||||||
zcash_proofs = { version = "0.9.0", features = ["local-prover", "multicore", "download-params"] }
|
zcash_proofs = { version = "0.10.0", features = ["local-prover", "multicore", "download-params"] }
|
||||||
|
|
||||||
tower-fallback = { path = "../tower-fallback/" }
|
tower-fallback = { path = "../tower-fallback/" }
|
||||||
tower-batch = { path = "../tower-batch/" }
|
tower-batch = { path = "../tower-batch/" }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue