Merge pull request #20 from zcash/api-changes

Minor API changes
This commit is contained in:
str4d 2021-02-25 11:02:22 +13:00 committed by GitHub
commit 67f0911480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -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"

View File

@ -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!()
}