Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pczt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ zip32.workspace = true
[features]
default = ["std"]
std = ["document-features"]
zip-233 = ["zcash_primitives/zip-233"]

## Enables functionality that requires Orchard protocol types.
orchard = [
Expand Down
4 changes: 4 additions & 0 deletions pczt/src/roles/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ use zcash_primitives::transaction::{
TransactionData, TxDigests, TxVersion,
};
use zcash_protocol::consensus::BranchId;
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
use zcash_protocol::value::Zatoshis;

use crate::{
common::{
Expand Down Expand Up @@ -283,6 +285,8 @@ pub(crate) fn pczt_to_tx_data(
consensus_branch_id,
determine_lock_time(global, transparent.inputs()).ok_or(Error::IncompatibleLockTimes)?,
global.expiry_height.into(),
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
Zatoshis::ZERO,
transparent_bundle,
None,
sapling_bundle,
Expand Down
4 changes: 4 additions & 0 deletions pczt/src/roles/tx_extractor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use zcash_primitives::transaction::{
txid::TxIdDigester,
Authorization, Transaction, TransactionData, TxVersion,
};
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
use zcash_protocol::value::Zatoshis;
use zcash_protocol::{
consensus::BranchId,
constants::{V5_TX_VERSION, V5_VERSION_GROUP_ID},
Expand Down Expand Up @@ -104,6 +106,8 @@ impl<'a> TransactionExtractor<'a> {
consensus_branch_id,
lock_time,
pczt.global.expiry_height.into(),
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
Zatoshis::ZERO,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Zatoshis::ZERO,
Zatoshis::ZERO, // TODO: change when PCZTs add v6 transaction support

transparent_bundle,
None,
sapling_bundle,
Expand Down
1 change: 1 addition & 0 deletions zcash_client_sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ zip321 = { workspace = true }

[features]
default = ["multicore"]
zip-233 = ["zcash_primitives/zip-233"]

## Enables multithreading support for creating proofs and building subtrees.
multicore = ["maybe-rayon/threads", "zcash_primitives/multicore"]
Expand Down
9 changes: 8 additions & 1 deletion zcash_client_sqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ use zcash_primitives::{
use zcash_protocol::{
consensus::{self, BlockHeight},
memo::Memo,
value::Zatoshis,
ShieldedProtocol,
};
use zip32::{fingerprint::SeedFingerprint, DiversifierIndex};
Expand Down Expand Up @@ -125,6 +124,14 @@ use crate::wallet::encoding::KeyScope;
#[cfg(any(test, feature = "test-dependencies", not(feature = "orchard")))]
use zcash_protocol::PoolType;

#[cfg(any(
test,
feature = "transparent-inputs",
feature = "unstable",
feature = "test-dependencies"
))]
use zcash_protocol::value::Zatoshis;

/// `maybe-rayon` doesn't provide this as a fallback, so we have to.
#[cfg(not(feature = "multicore"))]
trait ParallelSliceMut<T> {
Expand Down
6 changes: 4 additions & 2 deletions zcash_client_sqlite/src/testing/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ use zcash_primitives::{
transaction::{Transaction, TxId},
};
use zcash_protocol::{
consensus::BlockHeight, local_consensus::LocalNetwork, memo::Memo, value::Zatoshis,
ShieldedProtocol,
consensus::BlockHeight, local_consensus::LocalNetwork, memo::Memo, ShieldedProtocol,
};
use zip32::{fingerprint::SeedFingerprint, DiversifierIndex};

Expand All @@ -48,6 +47,9 @@ use {
testing::transparent::GapLimits,
};

#[cfg(feature = "test-dependencies")]
use crate::Zatoshis;

/// Tuesday, 25 February 2025 00:00:00Z (the day the clock code was added).
const TEST_EPOCH_SECONDS_OFFSET: Duration = Duration::from_secs(1740441600);

Expand Down
2 changes: 2 additions & 0 deletions zcash_client_sqlite/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,8 @@ pub(crate) fn get_transaction<P: Parameters>(
BranchId::for_height(params, expiry_height),
tx_data.lock_time(),
expiry_height,
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
tx_data.zip233_amount(),
tx_data.transparent_bundle().cloned(),
tx_data.sprout_bundle().cloned(),
tx_data.sapling_bundle().cloned(),
Expand Down
5 changes: 5 additions & 0 deletions zcash_client_sqlite/src/wallet/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ mod tests {
zip32::DiversifierIndex,
};

#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
use zcash_protocol::value::Zatoshis;

pub(crate) fn describe_tables(conn: &Connection) -> Result<Vec<String>, rusqlite::Error> {
let result = conn
.prepare("SELECT sql FROM sqlite_schema WHERE type = 'table' ORDER BY tbl_name")?
Expand Down Expand Up @@ -1143,6 +1146,8 @@ mod tests {
BranchId::Canopy,
0,
BlockHeight::from(0),
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
Zatoshis::ZERO,
None,
None,
None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ mod tests {
BranchId::Canopy,
0,
BlockHeight::from(3),
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
Zatoshis::ZERO,
Some(transparent::Bundle {
vin: vec![TxIn {
prevout: OutPoint::fake(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ mod tests {
BranchId::Nu5,
0,
12345678.into(),
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
Zatoshis::ZERO,
Some(transparent::bundle::Bundle {
vin: vec![TxIn {
prevout: OutPoint::fake(),
Expand Down
1 change: 1 addition & 0 deletions zcash_extensions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ zcash_proofs = { workspace = true, features = ["local-prover", "bundled-prover"]

[features]
transparent-inputs = []
zip-233 = ["zcash_primitives/zip-233"]

[lib]
bench = false
Expand Down
6 changes: 6 additions & 0 deletions zcash_extensions/src/transparent/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@ mod tests {
None,
None,
None,
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
None,
Some(Bundle {
vin: vec![],
vout: vec![out_a],
Expand Down Expand Up @@ -711,6 +713,8 @@ mod tests {
None,
None,
None,
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
None,
Some(Bundle {
vin: vec![in_b],
vout: vec![out_b],
Expand Down Expand Up @@ -738,6 +742,8 @@ mod tests {
None,
None,
None,
#[cfg(all(zcash_unstable = "nu7", feature = "zip-233"))]
None,
Some(Bundle {
vin: vec![in_c],
vout: vec![],
Expand Down
1 change: 1 addition & 0 deletions zcash_primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pprof = { version = "0.14", features = ["criterion", "flamegraph"] }
[features]
default = ["multicore", "std", "circuits"]
std = ["document-features", "redjubjub/std"]
zip-233 = []

## Enables creating proofs
circuits = ["orchard/circuit", "sapling/circuit"]
Expand Down
Loading