Skip to content

Commit

Permalink
Merge pull request #1577 from zcash/pczt-format
Browse files Browse the repository at this point in the history
pczt: Define the structure and semantics of the PCZT format
  • Loading branch information
daira authored Dec 9, 2024
2 parents e0f04e6 + 0cceac1 commit 9e51039
Show file tree
Hide file tree
Showing 45 changed files with 5,228 additions and 23 deletions.
140 changes: 136 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ bitvec = "1"
blake2s_simd = "1"
bls12_381 = "0.8"
jubjub = "0.10"
redjubjub = "0.7"
sapling = { package = "sapling-crypto", version = "0.3", default-features = false }

# - Orchard
Expand All @@ -66,10 +67,13 @@ orchard = { version = "0.10", default-features = false }
pasta_curves = "0.5"

# - Transparent
bip32 = { version = "0.5", default-features = false, features = ["secp256k1-ffi"] }
bip32 = { version = "0.5", default-features = false }
ripemd = "0.1"
secp256k1 = "0.27"

# Boilerplate
getset = "0.1"

# CSPRNG
rand = "0.8"
rand_core = "0.6"
Expand Down Expand Up @@ -181,3 +185,7 @@ debug = true

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("zfuture"))'] }

[patch.crates-io]
orchard = { git = "https://github.com/zcash/orchard.git", rev = "bcd08e1d23e70c42a338f3e3f79d6f4c0c219805" }
sapling-crypto = { git = "https://github.com/zcash/sapling-crypto.git", rev = "f228f52542749ea89f4a7cffbc0682ed9ea4b8d1" }
67 changes: 67 additions & 0 deletions pczt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,70 @@ license.workspace = true
categories.workspace = true

[dependencies]
zcash_note_encryption = { workspace = true, optional = true }
zcash_primitives = { workspace = true, optional = true }
zcash_protocol = { workspace = true, optional = true }

blake2b_simd = { workspace = true, optional = true }
rand_core = { workspace = true, optional = true }

# Encoding
postcard = { version = "1", features = ["alloc"] }
serde.workspace = true
serde_with = "3"

# Payment protocols
# - Transparent
secp256k1 = { workspace = true, optional = true }

# - Sapling
bls12_381 = { workspace = true, optional = true }
ff = { workspace = true, optional = true }
jubjub = { workspace = true, optional = true }
redjubjub = { workspace = true, optional = true }
sapling = { workspace = true, optional = true }

# - Orchard
nonempty = { workspace = true, optional = true }
orchard = { workspace = true, optional = true }
pasta_curves = { workspace = true, optional = true }

# - Bolierplate
getset = "0.1"

[dev-dependencies]
incrementalmerkletree.workspace = true
secp256k1 = { workspace = true, features = ["rand"] }
shardtree.workspace = true
zcash_primitives = { workspace = true, features = ["test-dependencies", "transparent-inputs"] }
zcash_proofs = { workspace = true, features = ["bundled-prover"] }
zip32.workspace = true

[features]
orchard = [
"dep:ff",
"dep:nonempty",
"dep:orchard",
"dep:pasta_curves",
"dep:zcash_protocol",
]
sapling = [
"dep:bls12_381",
"dep:ff",
"dep:jubjub",
"dep:redjubjub",
"dep:sapling",
"dep:zcash_note_encryption",
"dep:zcash_protocol",
]
transparent = ["dep:secp256k1", "dep:zcash_primitives", "dep:zcash_protocol"]
zcp-builder = ["dep:zcash_primitives", "dep:zcash_protocol"]
io-finalizer = ["orchard", "sapling"]
prover = ["dep:rand_core", "sapling?/temporary-zcashd"]
signer = ["dep:blake2b_simd", "dep:rand_core", "orchard", "sapling", "transparent"]
spend-finalizer = ["transparent"]
tx-extractor = ["dep:rand_core", "orchard", "sapling", "transparent"]

[[test]]
name = "end_to_end"
required-features = ["io-finalizer", "prover", "signer", "tx-extractor"]
Loading

0 comments on commit 9e51039

Please sign in to comment.