Skip to content

Commit 571f123

Browse files
authored
Merge pull request #89 from anoma/tomas/pre-pub
prepare to publish on crates.io
2 parents 0d0da35 + 2bcb198 commit 571f123

File tree

11 files changed

+522
-202
lines changed

11 files changed

+522
-202
lines changed

Cargo.lock

Lines changed: 497 additions & 175 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ members = [
66
"masp_primitives"
77
]
88

9+
10+
[workspace.package]
11+
version = "1.2.0"
12+
913
[profile.release]
1014
lto = true
1115
panic = 'abort'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# MASP Rust crates
44

5-
This repository contains a (work-in-progress) set of Rust crates for
5+
This repository contains a set of Rust crates for
66
working with the Multi Asset Shielded Pool extensions of the Sapling circuits from Zcash.
77

88
## MASP Description

masp_note_encryption/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "masp_note_encryption"
33
description = "Note encryption for MASP transactions"
4-
version = "1.0.0"
4+
version.workspace = true
55
authors = [
66
"Jack Grigg <jack@electriccoin.co>",
77
"Kris Nuttycombe <kris@electriccoin.co>",

masp_primitives/Cargo.toml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "masp_primitives"
33
description = "Rust implementations of the experimental MASP primitives (derived from zcash_primitives)"
4-
version = "1.0.0"
4+
version.workspace = true
55
authors = [
66
"Jack Grigg <jack@z.cash>",
77
"Kris Nuttycombe <kris@electriccoin.co>",
@@ -21,7 +21,7 @@ categories = ["cryptography::cryptocurrencies"]
2121
all-features = true
2222

2323
[dependencies]
24-
zcash_encoding = { version = "0.2", git = "https://github.com/zcash/librustzcash", rev = "bd7f9d7" }
24+
zcash_encoding = { version = "0.2.2" }
2525

2626
# Dependencies exposed in a public API:
2727
# (Breaking upgrades to these require a breaking upgrade to this crate.)
@@ -37,20 +37,18 @@ sha2 = "0.10"
3737
memuse = "0.2.1"
3838

3939
# - Checked arithmetic
40-
num-traits = { version = "0.2.19", git = "https://github.com/heliaxdev/num-traits", rev = "3f3657caa34b8e116fdf3f8a3519c4ac29f012fe" }
40+
num-traits = { package = "nam-num-traits", version = "0.2.20-nam.0" }
4141

4242
# - Secret management
4343
subtle = "2.2.3"
4444

4545
# - Shielded protocols
46-
# branch "tomas/arbitrary"
47-
bls12_381 = { git = "https://github.com/heliaxdev/bls12_381.git", rev = "d3ebe9dd6488fac1923db120a7498079e55dd838" }
46+
bls12_381 = { package = "nam-bls12_381", version = "0.8.1-nam.0" }
4847
ff = "0.13"
4948
group = { version = "0.13", features = ["wnaf-memuse"] }
5049
incrementalmerkletree = "0.3"
51-
# branch "tomas/arbitrary"
52-
jubjub = { git = "https://github.com/heliaxdev/jubjub.git", rev = "a373686962f4e9d0edb3b4716f86ff6bbd9aa86c" }
53-
nonempty = "0.7"
50+
jubjub = { package = "nam-jubjub", version = "0.10.1-nam.0" }
51+
nonempty = "0.11"
5452

5553
# - Static constants
5654
lazy_static = "1"
@@ -85,7 +83,7 @@ features = ["pre-zip-212"]
8583

8684
[dev-dependencies]
8785
chacha20poly1305 = "0.10"
88-
criterion = "0.4"
86+
criterion = "0.5"
8987
proptest = "1.0.0"
9088
assert_matches = "1.3.0"
9189
rand_xorshift = "0.3"

masp_primitives/src/consensus.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ pub mod testing {
372372
.height_bounds(params)
373373
.map_or(Strategy::boxed(Just(None)), |(lower, upper)| {
374374
Strategy::boxed(
375-
(lower.0..upper.map_or(std::u32::MAX, |u| u.0))
376-
.prop_map(|h| Some(BlockHeight(h))),
375+
(lower.0..upper.map_or(u32::MAX, |u| u.0)).prop_map(|h| Some(BlockHeight(h))),
377376
)
378377
})
379378
}

masp_primitives/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ mod tests {
277277
let gh = group_hash(&tag, personalization);
278278

279279
// We don't want to overflow and start reusing generators
280-
assert!(tag[i] != u8::max_value());
280+
assert!(tag[i] != u8::MAX);
281281
tag[i] += 1;
282282

283283
if let Some(gh) = gh {

masp_primitives/src/test_vectors/note_encryption.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[allow(dead_code)]
12
pub struct TestVector {
23
pub ovk: [u8; 32],
34
pub ivk: [u8; 32],

masp_primitives/src/transaction/sighash.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use super::{
1212
};
1313

1414
use crate::asset_type::AssetType;
15-
#[cfg(feature = "zfuture")]
16-
use crate::extensions::transparent::Precondition;
1715

1816
pub const SIGHASH_ALL: u8 = 0x01;
1917
pub const SIGHASH_NONE: u8 = 0x02;

masp_proofs/Cargo.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "masp_proofs"
33
description = "Experimental MASP zk-SNARK circuits and proving APIs, based on zcash_proofs"
4-
version = "1.0.0"
4+
version.workspace = true
55
authors = ["Jack Grigg <jack@z.cash>", "joe <joe@heliax.dev>"]
66
homepage = "https://github.com/anoma/masp"
77
repository = "https://github.com/anoma/masp"
@@ -20,11 +20,9 @@ masp_primitives = { version = "1.0.0", path = "../masp_primitives" }
2020
# Dependencies exposed in a public API:
2121
# (Breaking upgrades to these require a breaking upgrade to this crate.)
2222
bellman = { version = "0.14", default-features = false, features = ["groth16"] }
23-
# branch "tomas/arbitrary"
24-
bls12_381 = { git = "https://github.com/heliaxdev/bls12_381.git", rev = "d3ebe9dd6488fac1923db120a7498079e55dd838" }
23+
bls12_381 = { package = "nam-bls12_381", version = "0.8.1-nam.0" }
2524
group = "0.13"
26-
# branch "tomas/arbitrary"
27-
jubjub = { git = "https://github.com/heliaxdev/jubjub.git", rev = "a373686962f4e9d0edb3b4716f86ff6bbd9aa86c" }
25+
jubjub = { package = "nam-jubjub", version = "0.10.1-nam.0" }
2826
lazy_static = "1"
2927
minreq = { version = "2.11.0", features = ["https"], optional = true }
3028
rand_core = "0.6"
@@ -33,19 +31,19 @@ tracing = "0.1"
3331
# Dependencies used internally:
3432
# (Breaking upgrades to these are usually backwards-compatible, but check MSRVs.)
3533
blake2b_simd = "1"
36-
directories = { version = "4", optional = true }
34+
directories = { version = "5.0", optional = true }
3735
# This pulls the reddsa library that contains hardcoded personalizations and basepoints. If you need to work on a new project consider forking `reddsa`, modifying it to your needs and patching it in the root manifest
38-
redjubjub = "0.7"
36+
redjubjub = {package = "nam-redjubjub", version = "0.7.1-nam.0" }
3937
getrandom = { version = "0.2" }
40-
itertools = "0.11"
38+
itertools = "0.14"
4139

4240
[dev-dependencies]
4341
byteorder = "1"
44-
criterion = "0.4"
42+
criterion = "0.5"
4543
rand_xorshift = "0.3"
4644

4745
[target.'cfg(unix)'.dev-dependencies]
48-
pprof = { version = "0.11", features = ["criterion", "flamegraph"] } # MSRV 1.56
46+
pprof = { version = "0.14", features = ["criterion", "flamegraph"] }
4947

5048
[features]
5149
default = ["local-prover", "multicore"]

0 commit comments

Comments
 (0)