mirror of https://github.com/zcash/halo2.git
Fix bundle::Action to hold cmx instead of cm
This commit is contained in:
parent
c08d12cc52
commit
b1286b4e94
|
@ -4,7 +4,7 @@ use nonempty::NonEmpty;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
circuit::Proof,
|
circuit::Proof,
|
||||||
note::{EncryptedNote, NoteCommitment, Nullifier},
|
note::{EncryptedNote, ExtractedNoteCommitment, Nullifier},
|
||||||
primitives::redpallas::{self, Binding, SpendAuth},
|
primitives::redpallas::{self, Binding, SpendAuth},
|
||||||
tree::Anchor,
|
tree::Anchor,
|
||||||
value::{ValueCommitment, ValueSum},
|
value::{ValueCommitment, ValueSum},
|
||||||
|
@ -25,7 +25,7 @@ pub struct Action<T> {
|
||||||
/// The randomized verification key for the note being spent.
|
/// The randomized verification key for the note being spent.
|
||||||
rk: redpallas::VerificationKey<SpendAuth>,
|
rk: redpallas::VerificationKey<SpendAuth>,
|
||||||
/// A commitment to the new note being created.
|
/// A commitment to the new note being created.
|
||||||
cm_new: NoteCommitment,
|
cm_new: ExtractedNoteCommitment,
|
||||||
/// The encrypted output note.
|
/// The encrypted output note.
|
||||||
encrypted_note: EncryptedNote,
|
encrypted_note: EncryptedNote,
|
||||||
/// A commitment to the net value created or consumed by this action.
|
/// A commitment to the net value created or consumed by this action.
|
||||||
|
|
|
@ -9,7 +9,7 @@ use crate::{
|
||||||
};
|
};
|
||||||
|
|
||||||
mod commitment;
|
mod commitment;
|
||||||
pub use self::commitment::NoteCommitment;
|
pub use self::commitment::{ExtractedNoteCommitment, NoteCommitment};
|
||||||
|
|
||||||
mod nullifier;
|
mod nullifier;
|
||||||
pub use self::nullifier::Nullifier;
|
pub use self::nullifier::Nullifier;
|
||||||
|
|
|
@ -8,7 +8,7 @@ use subtle::CtOption;
|
||||||
use crate::{
|
use crate::{
|
||||||
constants::L_ORCHARD_BASE,
|
constants::L_ORCHARD_BASE,
|
||||||
primitives::sinsemilla,
|
primitives::sinsemilla,
|
||||||
spec::{prf_expand, to_scalar},
|
spec::{extract_p, prf_expand, to_scalar},
|
||||||
value::NoteValue,
|
value::NoteValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,3 +54,13 @@ impl NoteCommitment {
|
||||||
.map(NoteCommitment)
|
.map(NoteCommitment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The x-coordinate of the commitment to a note.
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ExtractedNoteCommitment(pub(super) pallas::Base);
|
||||||
|
|
||||||
|
impl From<NoteCommitment> for ExtractedNoteCommitment {
|
||||||
|
fn from(cm: NoteCommitment) -> Self {
|
||||||
|
ExtractedNoteCommitment(extract_p(&cm.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue