build(deps): Bump `zcash_proofs` to 0.8.0 (#5481)

* Put `tor` behind its own `--cfg` flag

* Bump x25519-dalek from 1.2.0 to 2.0.0-pre.1

* Bump zcash_proofs to 0.8.0

* Update `deny.toml`

* Update `Cargo.lock`

* Fix missing doc link warning

* Mention a ticket that tracks the dep. conflict

* Update `.codespellrc`

* Disable the other tor dependency

* Clarify a comment

* Add Tor x25519-dalek issue to README

* Update Cargo.lock

Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
Marek 2022-10-27 23:58:02 -07:00 committed by GitHub
parent 7b47aac370
commit be84853872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 231 additions and 1226 deletions

View File

@ -1,3 +1,3 @@
[codespell]
ignore-words-list=crate,Sur
ignore-words-list=crate,Sur,inout
exclude-file=book/mermaid.min.js

1410
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -235,6 +235,9 @@ There are a few bugs in Zebra that we're still working on fixing:
- If Zebra fails downloading the Zcash parameters, use [the Zcash parameters download script](https://github.com/zcash/zcash/blob/master/zcutil/fetch-params.sh) instead. This script might be needed on macOS, even with Rust 1.63.
- No Windows support [#3801](https://github.com/ZcashFoundation/zebra/issues/3801)
- We used to test with Windows Server 2019, but not anymore; see issue for details
- Experimental Tor support is disabled until [`arti-client` upgrades to `x25519-dalek` 2.0.0 or later](https://github.com/ZcashFoundation/zebra/issues/5492)
- This happens due to a Rust dependency conflict, which can only be resolved by changing the dependencies of `x25519-dalek`
## Future Work

View File

@ -30,10 +30,7 @@ highlight = "all"
skip = [
# ECC crates only
# wait for zcash_proofs to be published
{ name = "equihash", version = "=0.2.0"},
{ name = "zcash_encoding", version = "=0.1.0"},
{ name = "zcash_note_encryption", version = "=0.1.0"},
{ name = "zcash_primitives", version = "=0.7.0"},
]
@ -87,12 +84,10 @@ skip-tree = [
# upgrade abscissa (required dependency) and arti (optional dependency)
{ name = "darling", version = "=0.10.2" },
{ name = "darling", version = "=0.12.4" },
{ name = "semver", version = "=0.9.0" },
{ name = "tracing-subscriber", version = "=0.1.6" },
# upgrade metrics-util (required dependency) and arti (optional dependency)
{ name = "hashbrown", version = "=0.11.2" },
{ name = "orchard", version = "=0.2.0" },
]
# This section is considered when running `cargo deny check sources`.
@ -110,8 +105,6 @@ unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories
allow-git = [
# for zcash_proofs > 0.7.1 while it's still not published
"https://github.com/zcash/librustzcash.git"
]
[sources.allow-org]

View File

@ -38,7 +38,7 @@ secp256k1 = { version = "0.21.3", features = ["serde"] }
sha2 = { version = "0.9.9", features = ["compress"] }
subtle = "2.4.1"
uint = "0.9.4"
x25519-dalek = { version = "1.2.0", features = ["serde"] }
x25519-dalek = { version = "2.0.0-pre.1", features = ["serde"] }
# ECC deps
halo2 = { package = "halo2_proofs", version = "0.2.0" }

View File

@ -36,7 +36,7 @@ tracing-futures = "0.2.5"
orchard = "0.2.0"
zcash_proofs = { git = "https://github.com/zcash/librustzcash.git", rev = "ca84123038b64f0f4aa5615f7cf224fbf7ece766", features = ["local-prover", "multicore", "download-params"] }
zcash_proofs = { version = "0.8.0", features = ["local-prover", "multicore", "download-params"] }
tower-fallback = { path = "../tower-fallback/" }
tower-batch = { path = "../tower-batch/" }
@ -57,7 +57,6 @@ tinyvec = { version = "1.6.0", features = ["rustc_1_55"] }
hex = "0.4.3"
proptest = "0.10.1"
proptest-derive = "0.3.0"
rand07 = { package = "rand", version = "0.7" }
spandoc = "0.2.2"
tokio = { version = "1.21.2", features = ["full", "tracing", "test-util"] }

View File

@ -1873,8 +1873,7 @@ fn mock_sprout_join_split_data() -> (JoinSplitData<Groth16Proof>, ed25519::Signi
let first_nullifier = sprout::note::Nullifier([0u8; 32]);
let second_nullifier = sprout::note::Nullifier([1u8; 32]);
let commitment = sprout::commitment::NoteCommitment::from([0u8; 32]);
let ephemeral_key =
x25519::PublicKey::from(&x25519::EphemeralSecret::new(rand07::thread_rng()));
let ephemeral_key = x25519::PublicKey::from(&x25519::EphemeralSecret::new(rand::thread_rng()));
let random_seed = sprout::RandomSeed::from([0u8; 32]);
let mac = sprout::note::Mac::zcash_deserialize(&[0u8; 32][..])
.expect("Failure to deserialize dummy MAC");

View File

@ -9,7 +9,8 @@ edition = "2021"
[features]
default = []
tor = ["arti-client", "tor-rtcompat"]
# Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492)
# tor = ["arti-client", "tor-rtcompat"]
proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"]
[dependencies]
@ -41,8 +42,9 @@ tracing-error = { version = "0.2.0", features = ["traced-error"] }
tracing = "0.1.37"
# tor dependencies
arti-client = { version = "0.0.2", optional = true }
tor-rtcompat = { version = "0.0.2", optional = true }
# Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492)
# arti-client = { version = "0.0.2", optional = true }
# tor-rtcompat = { version = "0.0.2", optional = true }
# proptest dependencies
proptest = { version = "0.10.1", optional = true }

View File

@ -14,7 +14,9 @@ use crate::{
BoxError, Config, Request, Response,
};
#[cfg(feature = "tor")]
// Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492)
// #[cfg(feature = "tor")]
#[cfg(tor)]
pub(crate) mod tor;
#[cfg(test)]

View File

@ -60,6 +60,8 @@
//! The [`isolated`] APIs provide anonymised TCP and [Tor](https://crates.io/crates/arti)
//! connections to individual peers.
//! These isolated connections can be used to send user-generated transactions anonymously.
//! Tor connections are currently disabled until `arti-client`'s dependency `x25519-dalek v1.2.0`
//! is updated to a higher version. See #5492.
//!
//! ### Individual Peer Connections
//!
@ -152,10 +154,14 @@ mod peer_set;
mod policies;
mod protocol;
#[cfg(feature = "tor")]
// Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492)
// #[cfg(feature = "tor")]
#[cfg(tor)]
pub use crate::isolated::tor::connect_isolated_tor;
#[cfg(all(feature = "tor", any(test, feature = "proptest-impl")))]
// Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492)
// #[cfg(all(feature = "tor", any(test, feature = "proptest-impl")))]
#[cfg(tor)]
pub use crate::isolated::tor::connect_isolated_tor_with_inbound;
#[cfg(any(test, feature = "proptest-impl"))]

View File

@ -788,7 +788,8 @@ where
PeerTransport: AsyncRead + AsyncWrite + Unpin + Send + 'static,
{
/// The tokio [`TcpStream`](tokio::net::TcpStream) or Tor
/// [`DataStream`](arti_client::DataStream) to the peer.
/// `arti_client::DataStream` to the peer.
// Use [`arti_client::DataStream`] when #5492 is done.
pub data_stream: PeerTransport,
/// The address of the peer, and other related information.