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::{
|
||||
circuit::Proof,
|
||||
note::{EncryptedNote, NoteCommitment, Nullifier},
|
||||
note::{EncryptedNote, ExtractedNoteCommitment, Nullifier},
|
||||
primitives::redpallas::{self, Binding, SpendAuth},
|
||||
tree::Anchor,
|
||||
value::{ValueCommitment, ValueSum},
|
||||
|
@ -25,7 +25,7 @@ pub struct Action<T> {
|
|||
/// The randomized verification key for the note being spent.
|
||||
rk: redpallas::VerificationKey<SpendAuth>,
|
||||
/// A commitment to the new note being created.
|
||||
cm_new: NoteCommitment,
|
||||
cm_new: ExtractedNoteCommitment,
|
||||
/// The encrypted output note.
|
||||
encrypted_note: EncryptedNote,
|
||||
/// A commitment to the net value created or consumed by this action.
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::{
|
|||
};
|
||||
|
||||
mod commitment;
|
||||
pub use self::commitment::NoteCommitment;
|
||||
pub use self::commitment::{ExtractedNoteCommitment, NoteCommitment};
|
||||
|
||||
mod nullifier;
|
||||
pub use self::nullifier::Nullifier;
|
||||
|
|
|
@ -8,7 +8,7 @@ use subtle::CtOption;
|
|||
use crate::{
|
||||
constants::L_ORCHARD_BASE,
|
||||
primitives::sinsemilla,
|
||||
spec::{prf_expand, to_scalar},
|
||||
spec::{extract_p, prf_expand, to_scalar},
|
||||
value::NoteValue,
|
||||
};
|
||||
|
||||
|
@ -54,3 +54,13 @@ impl 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