Struct noah_api::setup::ProverParams
source · pub struct ProverParams {
pub pcs: KZGCommitmentSchemeBLS,
pub lagrange_pcs: Option<KZGCommitmentSchemeBLS>,
pub secp256k1_cs: TurboCS<BLSScalar>,
pub ed25519_cs: TurboCS<BLSScalar>,
pub secp256k1_prover_params: PlonkPK<KZGCommitmentSchemeBLS>,
pub ed25519_prover_params: PlonkPK<KZGCommitmentSchemeBLS>,
}Expand description
The prover parameters.
Fields§
§pcs: KZGCommitmentSchemeBLSThe full SRS for the polynomial commitment scheme.
lagrange_pcs: Option<KZGCommitmentSchemeBLS>The Lagrange basis format of SRS.
secp256k1_cs: TurboCS<BLSScalar>The default(secp256k1) constraint system.
ed25519_cs: TurboCS<BLSScalar>The ed25519 constraint system.
secp256k1_prover_params: PlonkPK<KZGCommitmentSchemeBLS>The default(secp256k1) TurboPlonk proving key.
ed25519_prover_params: PlonkPK<KZGCommitmentSchemeBLS>The ed25519 TurboPlonk proving key.
Implementations§
source§impl ProverParams
impl ProverParams
sourcepub fn cs_params(
&self,
witness: Option<&AXfrAddressFoldingWitness>
) -> (&TurboCS<BLSScalar>, &PlonkPK<KZGCommitmentSchemeBLS>)
pub fn cs_params(
&self,
witness: Option<&AXfrAddressFoldingWitness>
) -> (&TurboCS<BLSScalar>, &PlonkPK<KZGCommitmentSchemeBLS>)
Choose secp256k1 or ed25519 cs and prover_params
sourcepub fn new(
n_payers: usize,
n_payees: usize,
tree_depth: Option<usize>
) -> Result<ProverParams>
pub fn new(
n_payers: usize,
n_payees: usize,
tree_depth: Option<usize>
) -> Result<ProverParams>
Obtain the parameters for anonymous transfer for a given number of inputs and a given number of outputs.
sourcepub fn bar_to_abar_params() -> Result<ProverParams>
pub fn bar_to_abar_params() -> Result<ProverParams>
Obtain the parameters for confidential to anonymous.
sourcepub fn abar_to_bar_params(tree_depth: usize) -> Result<ProverParams>
pub fn abar_to_bar_params(tree_depth: usize) -> Result<ProverParams>
Obtain the parameters for anonymous to confidential.
sourcepub fn ar_to_abar_params() -> Result<ProverParams>
pub fn ar_to_abar_params() -> Result<ProverParams>
Obtain the parameters for transparent to anonymous.
sourcepub fn abar_to_ar_params(tree_depth: usize) -> Result<ProverParams>
pub fn abar_to_ar_params(tree_depth: usize) -> Result<ProverParams>
Obtain the parameters for anonymous to transparent.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ProverParams
impl<'de> Deserialize<'de> for ProverParams
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ProverParams> for VerifierParams
impl From<ProverParams> for VerifierParams
source§fn from(params: ProverParams) -> Self
fn from(params: ProverParams) -> Self
Converts to this type from the input type.