Skip to content

Commit

Permalink
fix from review
Browse files Browse the repository at this point in the history
  • Loading branch information
XuyangSong committed Oct 11, 2023
1 parent a0e1e18 commit bde6cf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion taiga_halo2/src/circuit/vp_bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@ use crate::circuit::{
};
use crate::shielded_ptx::NoteVPVerifyingInfoSet;
use borsh::{BorshDeserialize, BorshSerialize};
#[cfg(feature = "serde")]
use serde;
use std::path::PathBuf;

#[derive(Clone, Debug, BorshSerialize, BorshDeserialize)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum ValidityPredicateRepresentation {
// vampir has a unified circuit representation.
VampIR(Vec<u8>),
// Native halo2 circuits don't have a unified representatioin, enumerate the vp circuit examples for the moment.
// TODO: figure out if we can have a unified circuit presentation. In theory, it's possible to separate the circuit system and proving system.
Trivial,
// TODO: add other vp examples here if needed
// TODO: add other vp types here if needed
}

#[derive(Clone, Debug, BorshSerialize, BorshDeserialize)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ValidityPredicateByteCode {
circuit: ValidityPredicateRepresentation,
inputs: Vec<u8>,
}

#[derive(Clone, Debug, BorshSerialize, BorshDeserialize)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ApplicationByteCode {
app_vp_bytecode: ValidityPredicateByteCode,
dynamic_vp_bytecode: Vec<ValidityPredicateByteCode>,
Expand Down
1 change: 1 addition & 0 deletions taiga_halo2/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub struct ShieldedPartialTxBundle(Vec<ShieldedPartialTransaction>);
#[cfg_attr(feature = "nif", derive(NifStruct))]
#[cfg_attr(feature = "nif", module = "Taiga.Transaction.Result")]
#[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct ShieldedResult {
pub anchors: Vec<Anchor>,
pub nullifiers: Vec<Nullifier>,
Expand Down

0 comments on commit bde6cf5

Please sign in to comment.