Skip to content

Commit

Permalink
Move ConvertCircuit to shielded pool component
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Jan 3, 2024
1 parent 2f97efc commit 8aba60e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions crates/core/component/shielded-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ pub use note::{Note, NoteCiphertext, NoteView};
pub use note_payload::NotePayload;
pub use rseed::Rseed;

pub mod convert;
pub mod nullifier_derivation;
pub mod output;
pub mod spend;

pub use convert::{ConvertCircuit, ConvertProof, ConvertProofPrivate, ConvertProofPublic};
pub use nullifier_derivation::{NullifierDerivationCircuit, NullifierDerivationProof};
pub use output::{Output, OutputCircuit, OutputPlan, OutputProof, OutputView};
pub use spend::{Spend, SpendCircuit, SpendPlan, SpendProof, SpendView};
2 changes: 0 additions & 2 deletions crates/core/component/stake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ pub mod undelegate;
pub mod undelegate_claim;
pub mod validator;

pub use convert_proof::ConvertCircuit;
pub use delegate::Delegate;
pub use undelegate::Undelegate;
pub use undelegate_claim::{
UndelegateClaim, UndelegateClaimBody, UndelegateClaimPlan, UndelegateClaimProof,
};

mod convert_proof;
mod delegation_token;
mod governance_key;
mod identity_key;
Expand Down
5 changes: 3 additions & 2 deletions crates/core/component/stake/src/undelegate_claim/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use decaf377::{Fq, Fr};
use penumbra_asset::{asset, balance, STAKING_TOKEN_ASSET_ID};
use penumbra_num::Amount;
use penumbra_proof_params::VerifyingKeyExt;
use penumbra_shielded_pool::{ConvertProof, ConvertProofPrivate, ConvertProofPublic};

use crate::convert_proof::{ConvertProof, ConvertProofPrivate, ConvertProofPublic};
use crate::Penalty;

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -92,7 +92,8 @@ mod tests {
use proptest::prelude::*;
use rand_core::OsRng;

use crate::{convert_proof::ConvertCircuit, IdentityKey, Penalty, UnbondingToken};
use crate::{IdentityKey, Penalty, UnbondingToken};
use penumbra_shielded_pool::ConvertCircuit;

fn fr_strategy() -> BoxedStrategy<Fr> {
any::<[u8; 32]>()
Expand Down
5 changes: 3 additions & 2 deletions crates/crypto/proof-setup/src/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ use penumbra_dex::{swap::proof::SwapCircuit, swap_claim::proof::SwapClaimCircuit
use penumbra_governance::DelegatorVoteCircuit;
use penumbra_proof_params::generate_constraint_matrices;
use penumbra_proto::tools::summoning::v1alpha1::{self as pb};
use penumbra_shielded_pool::{NullifierDerivationCircuit, OutputCircuit, SpendCircuit};
use penumbra_stake::ConvertCircuit;
use penumbra_shielded_pool::{
ConvertCircuit, NullifierDerivationCircuit, OutputCircuit, SpendCircuit,
};

use rand_core::OsRng;

Expand Down
5 changes: 3 additions & 2 deletions tools/parameter-setup/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ use penumbra_proof_setup::single::{
circuit_degree, combine, log::Hashable, transition, Phase1CRSElements, Phase1Contribution,
Phase2Contribution,
};
use penumbra_shielded_pool::{NullifierDerivationCircuit, OutputCircuit, SpendCircuit};
use penumbra_stake::ConvertCircuit;
use penumbra_shielded_pool::{
ConvertCircuit, NullifierDerivationCircuit, OutputCircuit, SpendCircuit,
};
use rand_core::OsRng;

fn generate_parameters<D: DummyWitness>() -> (ProvingKey<Bls12_377>, VerifyingKey<Bls12_377>) {
Expand Down

0 comments on commit 8aba60e

Please sign in to comment.