Skip to content

Commit

Permalink
small tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
weikengchen committed Oct 28, 2020
1 parent 5271f40 commit dd448ea
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ pub trait PCCommitterKey: Clone + core::fmt::Debug {
/// Defines the minimal interface of verifier keys for any polynomial
/// commitment scheme.
pub trait PCVerifierKey: Clone + core::fmt::Debug {
/// The prepared version of the key
type PreparedKey;

/// Outputs the maximum degree supported by the universal parameters
/// `Self` was derived from.
fn max_degree(&self) -> usize;
Expand All @@ -39,9 +42,9 @@ pub trait PCVerifierKey: Clone + core::fmt::Debug {

/// Defines the minimal interface of prepared verifier keys for any polynomial
/// commitment scheme.
pub trait PCPreparedVerifierKey<UNPREPARED: PCVerifierKey> {
pub trait PCPreparedVerifierKey<VK: PCVerifierKey> {
/// prepare
fn prepare(vk: &UNPREPARED) -> Self;
fn prepare(vk: &VK) -> Self;
}

/// Defines the minimal interface of commitments for any polynomial
Expand All @@ -59,9 +62,9 @@ pub trait PCCommitment: Clone + ark_ff::ToBytes {

/// Defines the minimal interface of prepared commitments for any polynomial
/// commitment scheme.
pub trait PCPreparedCommitment<UNPREPARED: PCCommitment>: Clone {
pub trait PCPreparedCommitment<C: PCCommitment>: Clone {
/// prepare
fn prepare(comm: &UNPREPARED) -> Self;
fn prepare(comm: &C) -> Self;
}

/// Defines the minimal interface of commitment randomness for any polynomial
Expand Down

0 comments on commit dd448ea

Please sign in to comment.