Skip to content
Closed
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [

[patch.crates-io]
sapling = { package = "sapling-crypto", git = "https://github.com/QED-it/sapling-crypto", rev = "9393f93fe547d1b3738c9f4618c0f8a2fffed29f" }
orchard = { git = "https://github.com/QED-it/orchard", rev = "2083efe8d57e6073914ae296db2d41f8bfe1de50" }
orchard = { git = "https://github.com/QED-it/orchard", rev = "927f40eb6f130fbd8074abab00934ce5758b23f3" }
sinsemilla = { git = "https://github.com/zcash/sinsemilla", rev = "aabb707e862bc3d7b803c77d14e5a771bcee3e8c" }
zcash_note_encryption = { git = "https://github.com/zcash/zcash_note_encryption", rev = "9f7e93d42cef839d02b9d75918117941d453f8cb" }
halo2_gadgets = { git = "https://github.com/zcash/halo2", rev = "2308caf68c48c02468b66cfc452dad54e355e32f" }
Expand Down
2 changes: 1 addition & 1 deletion pczt/tests/end_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ fn orchard_to_orchard() {
let value = orchard::value::NoteValue::from_raw(1_000_000);
let note = {
let mut orchard_builder = orchard::builder::Builder::new(
orchard::builder::BundleType::DEFAULT_VANILLA,
orchard::builder::BundleType::DEFAULT,
orchard::Anchor::empty_tree(),
);
orchard_builder
Expand Down
4 changes: 2 additions & 2 deletions zcash_client_backend/src/data_api/wallet/input_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ impl<DbT: InputSource> InputSelector for GreedyInputSelector<DbT> {
),
#[cfg(feature = "orchard")]
&(
::orchard::builder::BundleType::DEFAULT_VANILLA,
::orchard::builder::BundleType::DEFAULT,
&orchard_inputs[..],
&orchard_outputs[..],
),
Expand Down Expand Up @@ -761,7 +761,7 @@ where
} else {
0
};
orchard::builder::BundleType::DEFAULT_VANILLA
orchard::builder::BundleType::DEFAULT
.num_actions(spendable_notes.orchard.len(), requested_orchard_actions)
.map_err(|s| InputSelectorError::Change(ChangeError::BundleError(s)))?
};
Expand Down
4 changes: 2 additions & 2 deletions zcash_client_backend/src/fees/orchard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ impl<'a, NoteRef, In: InputView<NoteRef>, Out: OutputView> BundleView<NoteRef>
}
}

/// A [`BundleView`] for the empty bundle with [`BundleType::DEFAULT_VANILLA`] bundle type.
/// A [`BundleView`] for the empty bundle with [`BundleType::DEFAULT`] bundle type.
pub struct EmptyBundleView;

impl<NoteRef> BundleView<NoteRef> for EmptyBundleView {
type In = Infallible;
type Out = Infallible;

fn bundle_type(&self) -> BundleType {
BundleType::DEFAULT_VANILLA
BundleType::DEFAULT
}

fn inputs(&self) -> &[Self::In] {
Expand Down
2 changes: 1 addition & 1 deletion zcash_client_backend/src/fees/zip317.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ mod tests {
&[] as &[Infallible],
),
&(
orchard::builder::BundleType::DEFAULT_VANILLA,
orchard::builder::BundleType::DEFAULT,
&[] as &[Infallible],
&[OrchardPayment::new(Zatoshis::const_from_u64(30000))][..],
),
Expand Down
30 changes: 15 additions & 15 deletions zcash_primitives/src/transaction/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use core::cmp::Ordering;
use core::fmt;
use rand::{CryptoRng, RngCore};

use ::sapling::{builder::SaplingMetadata, Note, PaymentAddress};
use ::transparent::{address::TransparentAddress, builder::TransparentBuilder, bundle::TxOut};
use sapling::{builder::SaplingMetadata, Note, PaymentAddress};
use transparent::{address::TransparentAddress, builder::TransparentBuilder, bundle::TxOut};
use zcash_protocol::{
consensus::{self, BlockHeight, BranchId, NetworkUpgrade, Parameters},
memo::MemoBytes,
Expand All @@ -30,20 +30,20 @@ use {
txid::TxIdDigester,
OrchardBundle, TransactionData, Unauthorized,
},
::sapling::prover::{OutputProver, SpendProver},
::transparent::builder::TransparentSigningSet,
alloc::vec::Vec,
orchard::{
builder::{InProgress, Unproven},
bundle::Authorized,
orchard_flavor::OrchardFlavor,
},
sapling::prover::{OutputProver, SpendProver},
transparent::builder::TransparentSigningSet,
};

use orchard::{builder::BundleType, note::AssetBase, orchard_flavor::OrchardVanilla, Address};

#[cfg(feature = "transparent-inputs")]
use ::transparent::builder::TransparentInputInfo;
use transparent::builder::TransparentInputInfo;

#[cfg(not(feature = "transparent-inputs"))]
use core::convert::Infallible;
Expand Down Expand Up @@ -289,9 +289,9 @@ impl BuildConfig {
/// Returns the Orchard bundle type and anchor for this configuration.
pub fn orchard_builder_config(&self) -> Option<(BundleType, orchard::Anchor)> {
match self {
BuildConfig::TxV5 { orchard_anchor, .. } => orchard_anchor
.as_ref()
.map(|a| (BundleType::DEFAULT_VANILLA, *a)),
BuildConfig::TxV5 { orchard_anchor, .. } => {
orchard_anchor.as_ref().map(|a| (BundleType::DEFAULT, *a))
}
#[cfg(zcash_unstable = "nu7")]
BuildConfig::TxV6 { orchard_anchor, .. } => orchard_anchor
.as_ref()
Expand Down Expand Up @@ -620,7 +620,7 @@ impl<P: consensus::Parameters, U: sapling::builder::ProverProgress> Builder<'_,
memo: MemoBytes,
) -> Result<(), Error<FE>> {
let bundle_type = self.build_config.orchard_bundle_type()?;
if bundle_type == BundleType::DEFAULT_VANILLA && !bool::from(asset.is_native()) {
if bundle_type == BundleType::DEFAULT && !bool::from(asset.is_native()) {
return Err(Error::OrchardBuild(BundleTypeNotSatisfiable));
}
self.orchard_builder
Expand Down Expand Up @@ -1308,9 +1308,9 @@ mod testing {
use super::{BuildResult, Builder, Error};

use crate::transaction::fees::zip317;
use ::sapling::prover::mock::{MockOutputProver, MockSpendProver};
use rand::RngCore;
use rand_core::CryptoRng;
use sapling::prover::mock::{MockOutputProver, MockSpendProver};
use transparent::builder::TransparentSigningSet;
use zcash_protocol::consensus;

Expand Down Expand Up @@ -1371,8 +1371,8 @@ mod tests {
use rand_core::OsRng;

use crate::transaction::builder::BuildConfig;
use ::sapling::{zip32::ExtendedSpendingKey, Node, Rseed};
use ::transparent::{address::TransparentAddress, builder::TransparentSigningSet};
use sapling::{zip32::ExtendedSpendingKey, Node, Rseed};
use transparent::{address::TransparentAddress, builder::TransparentSigningSet};
use zcash_protocol::{
consensus::{NetworkUpgrade, Parameters, TEST_NETWORK},
memo::MemoBytes,
Expand All @@ -1392,7 +1392,7 @@ mod tests {
#[cfg(feature = "transparent-inputs")]
use {
crate::transaction::{builder::DEFAULT_TX_EXPIRY_DELTA, OutPoint, TxOut},
::transparent::keys::{AccountPrivKey, IncomingViewingKey},
transparent::keys::{AccountPrivKey, IncomingViewingKey},
zip32::AccountId,
};

Expand Down Expand Up @@ -1427,7 +1427,7 @@ mod tests {
#[cfg(feature = "transparent-inputs")]
fn binding_sig_absent_if_no_shielded_spend_or_output() {
use crate::transaction::builder::{self, TransparentBuilder};
use ::transparent::{builder::TransparentSigningSet, keys::NonHardenedChildIndex};
use transparent::{builder::TransparentSigningSet, keys::NonHardenedChildIndex};
use zcash_protocol::consensus::NetworkUpgrade;

let sapling_activation_height = TEST_NETWORK
Expand Down Expand Up @@ -1922,7 +1922,7 @@ mod tests {
// Create a test note in the Orchard tree
let note = {
let mut builder = orchard::builder::Builder::new(
orchard::builder::BundleType::DEFAULT_VANILLA,
orchard::builder::BundleType::DEFAULT,
orchard::Anchor::empty_tree(),
);
builder
Expand Down
Loading