Merge pull request #995 from zcash/workspace-dependencies

Move common package and dependency configs into workspace config
This commit is contained in:
str4d 2023-09-27 15:29:37 +01:00 committed by GitHub
commit 8d264ac452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 235 additions and 146 deletions

2
Cargo.lock generated
View File

@ -2968,12 +2968,10 @@ dependencies = [
"proptest",
"prost",
"rand_core",
"rand_xorshift",
"rayon",
"secrecy",
"shardtree",
"subtle",
"tempfile",
"time",
"tonic",
"tonic-build",

View File

@ -13,6 +13,97 @@ members = [
"zcash_proofs",
]
[workspace.package]
edition = "2021"
rust-version = "1.65"
repository = "https://github.com/zcash/librustzcash"
license = "MIT OR Apache-2.0"
categories = ["cryptography::cryptocurrencies"]
# Common dependencies across all of our crates. Dependencies used only by a single crate
# (and that don't have cross-crate versioning needs) are specified by the crate itself.
#
# See the individual crate `Cargo.toml` files for information about which dependencies are
# part of a public API, and which can be updated without a SemVer bump.
[workspace.dependencies]
# Intra-workspace dependencies
equihash = { version = "0.2", path = "components/equihash" }
zcash_address = { version = "0.3", path = "components/zcash_address" }
zcash_client_backend = { version = "0.10", path = "zcash_client_backend" }
zcash_encoding = { version = "0.2", path = "components/zcash_encoding" }
zcash_note_encryption = "0.4"
zcash_primitives = { version = "0.13", path = "zcash_primitives", default-features = false }
zcash_proofs = { version = "0.13", path = "zcash_proofs", default-features = false }
# Shielded protocols
ff = "0.13"
group = "0.13"
incrementalmerkletree = "0.5"
shardtree = "0.1"
# Payment protocols
# - Sapling
bitvec = "1"
blake2s_simd = "1"
bls12_381 = "0.8"
jubjub = "0.10"
# - Orchard
nonempty = "0.7"
orchard = { version = "0.6", default-features = false }
# - Transparent
hdwallet = "0.4"
ripemd = "0.1"
secp256k1 = "0.26"
# CSPRNG
rand = "0.8"
rand_core = "0.6"
# Digests
blake2b_simd = "1"
sha2 = "0.10"
# Encodings
base64 = "0.21"
bech32 = "0.9"
bs58 = { version = "0.5", features = ["check"] }
byteorder = "1"
hex = "0.4"
percent-encoding = "2.1.0"
# Logging and metrics
memuse = "0.2.1"
tracing = "0.1"
# Parallel processing
crossbeam-channel = "0.5"
maybe-rayon = { version = "0.1.0", default-features = false }
rayon = "1.5"
# Protobuf and gRPC
prost = "0.12"
tonic = "0.10"
tonic-build = "0.10"
# Secret management
secrecy = "0.8"
subtle = "2.2.3"
# Static constants
lazy_static = "1"
# Tests and benchmarks
assert_matches = "1.5"
criterion = "0.4"
proptest = "1"
rand_xorshift = "0.3"
# ZIP 32
aes = "0.8"
fpe = "0.6"
[profile.release]
lto = true
panic = 'abort'

View File

@ -7,11 +7,12 @@ authors = [
"Kris Nuttycombe <kris@electriccoin.co>"
]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
repository.workspace = true
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
categories.workspace = true
# Exclude proto files so crates.io consumers don't need protoc.
exclude = ["*.proto"]
@ -20,10 +21,10 @@ exclude = ["*.proto"]
development = ["zcash_proofs"]
[dependencies]
zcash_address = { version = "0.3", path = "../components/zcash_address" }
zcash_encoding = { version = "0.2", path = "../components/zcash_encoding" }
zcash_note_encryption = "0.4"
zcash_primitives = { version = "0.13", path = "../zcash_primitives", default-features = false }
zcash_address.workspace = true
zcash_encoding.workspace = true
zcash_note_encryption.workspace = true
zcash_primitives.workspace = true
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
@ -31,37 +32,37 @@ zcash_primitives = { version = "0.13", path = "../zcash_primitives", default-fea
time = "0.3.22"
# - Encodings
base64 = "0.21"
bech32 = "0.9"
bs58 = { version = "0.5", features = ["check"] }
base64.workspace = true
bech32.workspace = true
bs58.workspace = true
# - Errors
hdwallet = { version = "0.4", optional = true }
hdwallet = { workspace = true, optional = true }
# - Logging and metrics
memuse = "0.2"
tracing = "0.1"
memuse.workspace = true
tracing.workspace = true
# - Protobuf interfaces and gRPC bindings
hex = "0.4"
prost = "0.12"
tonic = { version = "0.10", optional = true }
hex.workspace = true
prost.workspace = true
tonic = { workspace = true, optional = true }
# - Secret management
secrecy = "0.8"
subtle = "2.2.3"
secrecy.workspace = true
subtle.workspace = true
# - Shielded protocols
bls12_381 = "0.8"
group = "0.13"
orchard = { version = "0.6", default-features = false }
bls12_381.workspace = true
group.workspace = true
orchard.workspace = true
# - Note commitment trees
incrementalmerkletree = "0.5"
shardtree = "0.1"
incrementalmerkletree.workspace = true
shardtree.workspace = true
# - Test dependencies
proptest = { version = "1.0.0", optional = true }
proptest = { workspace = true, optional = true }
# - ZIP 321
nom = "7"
@ -69,27 +70,25 @@ nom = "7"
# Dependencies used internally:
# (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.)
# - Encodings
byteorder = { version = "1", optional = true }
percent-encoding = "2.1.0"
byteorder = { workspace = true, optional = true }
percent-encoding.workspace = true
# - Scanning
crossbeam-channel = "0.5"
rayon = "1.5"
crossbeam-channel.workspace = true
rayon.workspace = true
[build-dependencies]
tonic-build = "0.10"
tonic-build.workspace = true
which = "4"
[dev-dependencies]
assert_matches = "1.5"
assert_matches.workspace = true
gumdrop = "0.8"
jubjub = "0.10"
proptest = "1.0.0"
rand_core = "0.6"
rand_xorshift = "0.3"
tempfile = "3.5.0"
zcash_proofs = { version = "0.13", path = "../zcash_proofs", default-features = false }
zcash_address = { version = "0.3", path = "../components/zcash_address", features = ["test-dependencies"] }
jubjub.workspace = true
proptest.workspace = true
rand_core.workspace = true
zcash_proofs.workspace = true
zcash_address = { workspace = true, features = ["test-dependencies"] }
time = ">=0.3.22, <0.3.24" # time 0.3.24 has MSRV 1.67

View File

@ -127,7 +127,6 @@ where
/// ```
/// # #[cfg(all(feature = "test-dependencies", feature = "local-prover"))]
/// # {
/// use tempfile::NamedTempFile;
/// use zcash_primitives::{
/// consensus::{self, Network},
/// constants::testnet::COIN_TYPE,

View File

@ -7,38 +7,39 @@ authors = [
"Kris Nuttycombe <kris@electriccoin.co>"
]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
repository.workspace = true
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
license.workspace = true
edition.workspace = true
rust-version.workspace = true
categories.workspace = true
[dependencies]
zcash_client_backend = { version = "0.10", path = "../zcash_client_backend", features = ["unstable-serialization", "unstable-spanning-tree"]}
zcash_encoding = { version = "0.2", path = "../components/zcash_encoding" }
zcash_primitives = { version = "0.13", path = "../zcash_primitives", default-features = false }
zcash_client_backend = { workspace = true, features = ["unstable-serialization", "unstable-spanning-tree"] }
zcash_encoding.workspace = true
zcash_primitives.workspace = true
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
# - Errors
bs58 = { version = "0.5", features = ["check"] }
hdwallet = { version = "0.4", optional = true }
bs58.workspace = true
hdwallet = { workspace = true, optional = true }
# - Logging and metrics
tracing = "0.1"
tracing.workspace = true
# - Serialization
byteorder = "1"
prost = "0.12"
group = "0.13"
jubjub = "0.10"
byteorder.workspace = true
prost.workspace = true
group.workspace = true
jubjub.workspace = true
# - Secret management
secrecy = "0.8"
secrecy.workspace = true
# - Note commitment trees
incrementalmerkletree = "0.5"
shardtree = { version = "0.1", features = ["legacy-api"] }
incrementalmerkletree.workspace = true
shardtree = { workspace = true, features = ["legacy-api"] }
# - SQLite databases
rusqlite = { version = "0.29.0", features = ["bundled", "time", "array"] }
@ -49,21 +50,21 @@ uuid = "1.1"
# Dependencies used internally:
# (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.)
maybe-rayon = {version = "0.1.0", default-features = false}
maybe-rayon.workspace = true
[dev-dependencies]
assert_matches = "1.5"
incrementalmerkletree = { version = "0.5", features = ["test-dependencies"] }
shardtree = { version = "0.1", features = ["legacy-api", "test-dependencies"] }
proptest = "1.0.0"
rand_core = "0.6"
assert_matches.workspace = true
incrementalmerkletree = { workspace = true, features = ["test-dependencies"] }
shardtree = { workspace = true, features = ["legacy-api", "test-dependencies"] }
proptest.workspace = true
rand_core.workspace = true
regex = "1.4"
tempfile = "3.5.0"
zcash_note_encryption = "0.4"
zcash_proofs = { version = "0.13", path = "../zcash_proofs" }
zcash_primitives = { version = "0.13", path = "../zcash_primitives", features = ["test-dependencies"] }
zcash_client_backend = { version = "0.10", path = "../zcash_client_backend", features = ["test-dependencies", "unstable-serialization", "unstable-spanning-tree"] }
zcash_address = { version = "0.3", path = "../components/zcash_address", features = ["test-dependencies"] }
zcash_note_encryption.workspace = true
zcash_proofs.workspace = true
zcash_primitives = { workspace = true, features = ["test-dependencies"] }
zcash_client_backend = { workspace = true, features = ["test-dependencies", "unstable-serialization", "unstable-spanning-tree"] }
zcash_address = { workspace = true, features = ["test-dependencies"] }
[features]
default = ["multicore"]

View File

@ -4,21 +4,22 @@ description = "Zcash Extension implementations & consensus node integration laye
version = "0.0.0"
authors = ["Jack Grigg <jack@z.cash>", "Kris Nuttycombe <kris@z.cash>"]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
repository.workspace = true
license.workspace = true
edition.workspace = true
rust-version.workspace = true
categories.workspace = true
[dependencies]
blake2b_simd = "1"
zcash_primitives = { version = "0.13", path = "../zcash_primitives", default-features = false, features = ["zfuture" ] }
blake2b_simd.workspace = true
zcash_primitives = { workspace = true, features = ["zfuture" ] }
[dev-dependencies]
ff = "0.13"
jubjub = "0.10"
rand_core = "0.6"
zcash_address = { version = "0.3", path = "../components/zcash_address" }
zcash_proofs = { version = "0.13", path = "../zcash_proofs" }
ff.workspace = true
jubjub.workspace = true
rand_core.workspace = true
zcash_address.workspace = true
zcash_proofs.workspace = true
[features]
transparent-inputs = []

View File

@ -2,22 +2,22 @@
name = "zcash_history"
version = "0.3.0"
authors = ["NikVolf <nikvolf@gmail.com>"]
edition = "2021"
rust-version = "1.65"
license = "MIT/Apache-2.0"
documentation = "https://docs.rs/zcash_history/"
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true
description = "Library for Zcash blockchain history tools"
categories = ["cryptography::cryptocurrencies"]
categories.workspace = true
[dev-dependencies]
assert_matches = "1.3.0"
proptest = "1.0.0"
assert_matches.workspace = true
proptest.workspace = true
[dependencies]
primitive-types = { version = "0.12", default-features = false }
byteorder = "1"
blake2 = { package = "blake2b_simd", version = "1" }
proptest = { version = "1.0.0", optional = true }
byteorder.workspace = true
blake2b_simd.workspace = true
proptest = { workspace = true, optional = true }
[features]
test-dependencies = ["proptest"]

View File

@ -1,7 +1,7 @@
use std::fmt;
use std::io;
use blake2::Params as Blake2Params;
use blake2b_simd::Params as Blake2Params;
use byteorder::{ByteOrder, LittleEndian};
use crate::{node_data, NodeData, MAX_NODE_DATA_SIZE};

View File

@ -7,59 +7,59 @@ authors = [
"Kris Nuttycombe <kris@electriccoin.co>"
]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
repository.workspace = true
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
categories = ["cryptography::cryptocurrencies"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true
categories.workspace = true
[package.metadata.docs.rs]
all-features = true
[dependencies]
equihash = { version = "0.2", path = "../components/equihash" }
zcash_address = { version = "0.3", path = "../components/zcash_address" }
zcash_encoding = { version = "0.2", path = "../components/zcash_encoding" }
equihash.workspace = true
zcash_address.workspace = true
zcash_encoding.workspace = true
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
# - CSPRNG
rand = "0.8"
rand_core = "0.6"
rand.workspace = true
rand_core.workspace = true
# - Digests (output types exposed)
blake2b_simd = "1"
sha2 = "0.10"
blake2b_simd.workspace = true
sha2.workspace = true
# - Metrics
memuse = "0.2.1"
memuse.workspace = true
# - Secret management
subtle = "2.2.3"
subtle.workspace = true
# - Shielded protocols
bls12_381 = "0.8"
ff = "0.13"
group = { version = "0.13", features = ["wnaf-memuse"] }
jubjub = "0.10"
nonempty = "0.7"
orchard = { version = "0.6", default-features = false }
bls12_381.workspace = true
ff.workspace = true
group = { workspace = true, features = ["wnaf-memuse"] }
jubjub.workspace = true
nonempty.workspace = true
orchard.workspace = true
# - Note Commitment Trees
incrementalmerkletree = { version = "0.5", features = ["legacy-api"] }
incrementalmerkletree = { workspace = true, features = ["legacy-api"] }
# - Static constants
lazy_static = "1"
lazy_static.workspace = true
# - Test dependencies
proptest = { version = "1.0.0", optional = true }
proptest = { workspace = true, optional = true }
# - Transparent inputs
# - `Error` type exposed
hdwallet = { version = "0.4", optional = true }
hdwallet = { workspace = true, optional = true }
# - `SecretKey` and `PublicKey` types exposed
secp256k1 = { version = "0.26", optional = true }
secp256k1 = { workspace = true, optional = true }
# - ZIP 339
bip0039 = { version = "0.10", features = ["std", "all-languages"] }
@ -67,32 +67,32 @@ bip0039 = { version = "0.10", features = ["std", "all-languages"] }
# Dependencies used internally:
# (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.)
# - Encodings
byteorder = "1"
hex = "0.4"
byteorder.workspace = true
hex.workspace = true
# - Shielded protocols
bitvec = "1"
blake2s_simd = "1"
bitvec.workspace = true
blake2s_simd.workspace = true
# - Transparent inputs
ripemd = { version = "0.1", optional = true }
ripemd = { workspace = true, optional = true }
# - ZIP 32
aes = "0.8"
fpe = "0.6"
aes.workspace = true
fpe.workspace = true
[dependencies.zcash_note_encryption]
version = "0.4"
workspace = true
features = ["pre-zip-212"]
[dev-dependencies]
chacha20poly1305 = "0.10"
criterion = "0.4"
incrementalmerkletree = { version = "0.5", features = ["legacy-api", "test-dependencies"] }
proptest = "1.0.0"
assert_matches = "1.3.0"
rand_xorshift = "0.3"
orchard = { version = "0.6", default-features = false, features = ["test-dependencies"] }
criterion.workspace = true
incrementalmerkletree = { workspace = true, features = ["legacy-api", "test-dependencies"] }
proptest.workspace = true
assert_matches.workspace = true
rand_xorshift.workspace = true
orchard = { workspace = true, features = ["test-dependencies"] }
[target.'cfg(unix)'.dev-dependencies]
pprof = { version = "0.11", features = ["criterion", "flamegraph"] } # MSRV 1.56

View File

@ -6,33 +6,33 @@ authors = [
"Jack Grigg <jack@z.cash>",
]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
repository.workspace = true
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
categories = ["cryptography::cryptocurrencies"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true
categories.workspace = true
[package.metadata.docs.rs]
all-features = true
[dependencies]
zcash_primitives = { version = "0.13", path = "../zcash_primitives", default-features = false }
zcash_primitives.workspace = true
# Dependencies exposed in a public API:
# (Breaking upgrades to these require a breaking upgrade to this crate.)
bellman = { version = "0.14", default-features = false, features = ["groth16"] }
bls12_381 = "0.8"
group = "0.13"
jubjub = "0.10"
lazy_static = "1"
bls12_381.workspace = true
group.workspace = true
jubjub.workspace = true
lazy_static.workspace = true
minreq = { version = "2", features = ["https"], optional = true }
rand_core = "0.6"
tracing = "0.1"
rand_core.workspace = true
tracing.workspace = true
# Dependencies used internally:
# (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.)
blake2b_simd = "1"
blake2b_simd.workspace = true
home = { version = "0.5", optional = true }
known-folders = { version = "1", optional = true }
redjubjub = "0.7"
@ -40,9 +40,9 @@ wagyu-zcash-parameters = { version = "0.2", optional = true }
xdg = { version = "2.5", optional = true }
[dev-dependencies]
byteorder = "1"
criterion = "0.4"
rand_xorshift = "0.3"
byteorder.workspace = true
criterion.workspace = true
rand_xorshift.workspace = true
[target.'cfg(unix)'.dev-dependencies]
pprof = { version = "0.11", features = ["criterion", "flamegraph"] } # MSRV 1.56