pol: remove copied proof statements
This commit is contained in:
parent
884232b2d3
commit
a268129ee9
|
@ -1,8 +0,0 @@
|
|||
use cl::{Nullifier, PtxRoot};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct DeathConstraintPublic {
|
||||
pub nf: Nullifier,
|
||||
pub ptx_root: PtxRoot,
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// for public inputs `nf` (nullifier), `root_cm` (root of merkle tree over commitment set) and `death_cm` (commitment to death constraint).
|
||||
/// the prover has knowledge of `output = (note, nf_pk, nonce)`, `nf` and `path` s.t. that the following constraints hold
|
||||
/// 0. nf_pk = hash(nf_sk)
|
||||
/// 1. nf = hash(nonce||nf_sk)
|
||||
/// 2. note_cm = output_commitment(output)
|
||||
/// 3. verify_merkle_path(note_cm, root, path)
|
||||
/// 4. death_cm = death_commitment(note.death_constraint)
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct InputPublic {
|
||||
pub cm_root: [u8; 32],
|
||||
pub input: cl::Input,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct InputPrivate {
|
||||
pub input: cl::InputWitness,
|
||||
pub cm_path: Vec<cl::merkle::PathNode>,
|
||||
}
|
|
@ -1,4 +1 @@
|
|||
pub mod death_constraint;
|
||||
pub mod input;
|
||||
pub mod ptx;
|
||||
pub mod proof_of_leadership;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
use cl::{merkle, InputWitness, OutputWitness, PtxRoot};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// An input to a partial transaction
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PartialTxInputPrivate {
|
||||
pub input: InputWitness,
|
||||
pub cm_path: Vec<merkle::PathNode>,
|
||||
pub ptx_path: Vec<merkle::PathNode>,
|
||||
}
|
||||
|
||||
impl PartialTxInputPrivate {
|
||||
pub fn ptx_root(&self) -> PtxRoot {
|
||||
let leaf = merkle::leaf(&self.input.commit().to_bytes());
|
||||
PtxRoot(merkle::path_root(leaf, &self.ptx_path))
|
||||
}
|
||||
|
||||
pub fn cm_root(&self) -> [u8; 32] {
|
||||
let leaf = merkle::leaf(self.input.note_commitment().as_bytes());
|
||||
merkle::path_root(leaf, &self.cm_path)
|
||||
}
|
||||
}
|
||||
|
||||
/// An output to a partial transaction
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PartialTxOutputPrivate {
|
||||
pub output: OutputWitness,
|
||||
pub ptx_path: Vec<merkle::PathNode>,
|
||||
}
|
||||
|
||||
impl PartialTxOutputPrivate {
|
||||
pub fn ptx_root(&self) -> PtxRoot {
|
||||
let leaf = merkle::leaf(&self.output.commit().to_bytes());
|
||||
PtxRoot(merkle::path_root(leaf, &self.ptx_path))
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue