mirror of https://github.com/zcash/orchard.git
commit
67f0911480
|
@ -20,6 +20,7 @@ rustdoc-args = [ "--html-in-header", "katex-header.html" ]
|
|||
|
||||
[dependencies]
|
||||
halo2 = { git = "https://github.com/zcash/halo2.git", branch = "main" }
|
||||
nonempty = "0.6"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! Structs related to bundles of Orchard actions.
|
||||
|
||||
use nonempty::NonEmpty;
|
||||
|
||||
use crate::{
|
||||
circuit::Proof,
|
||||
note::{EncryptedNote, NoteCommitment, Nullifier},
|
||||
|
@ -36,9 +38,8 @@ pub struct Action {
|
|||
#[derive(Debug)]
|
||||
pub struct Bundle {
|
||||
anchor: Anchor,
|
||||
actions: Vec<Action>,
|
||||
actions: NonEmpty<Action>,
|
||||
value_balance: ValueSum,
|
||||
proof: Proof,
|
||||
}
|
||||
|
||||
impl Bundle {
|
||||
|
@ -51,13 +52,14 @@ impl Bundle {
|
|||
|
||||
/// An authorized bundle of actions, ready to be committed to the ledger.
|
||||
#[derive(Debug)]
|
||||
pub struct SignedBundle {
|
||||
pub struct AuthorizedBundle {
|
||||
bundle: Bundle,
|
||||
proof: Proof,
|
||||
action_signatures: Vec<redpallas::Signature<SpendAuth>>,
|
||||
binding_signature: redpallas::Signature<Binding>,
|
||||
}
|
||||
|
||||
impl SignedBundle {
|
||||
impl AuthorizedBundle {
|
||||
/// Computes a commitment to the effects of this bundle, suitable for inclusion within
|
||||
/// a transaction ID.
|
||||
///
|
||||
|
@ -68,7 +70,7 @@ impl SignedBundle {
|
|||
|
||||
/// Computes a commitment to the authorizing data within for this bundle.
|
||||
///
|
||||
/// This together with `SignedBundle::commitment` bind the entire bundle.
|
||||
/// This together with `AuthorizedBundle::commitment` bind the entire bundle.
|
||||
pub fn authorizing_commitment(&self) -> BundleAuthorizingCommitment {
|
||||
todo!()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue