Struct winterfell::StarkProof
[−]pub struct StarkProof {
pub context: Context,
pub commitments: Commitments,
pub trace_queries: Vec<Queries, Global>,
pub constraint_queries: Queries,
pub ood_frame: OodFrame,
pub fri_proof: FriProof,
pub pow_nonce: u64,
}
Expand description
A proof generated by Winterfell prover.
A STARK proof contains information proving that a computation was executed correctly. A proof also contains basic metadata for the computation, but neither the definition of the computation itself, nor public inputs consumed by the computation are contained in a proof.
A proof can be serialized into a sequence of bytes using to_bytes() function, and deserialized from a sequence of bytes using from_bytes() function.
To estimate soundness of a proof (in bits), security_level() function can be used.
Fields
context: Context
Basic metadata about the execution of the computation described by this proof.
commitments: Commitments
Commitments made by the prover during the commit phase of the protocol.
trace_queries: Vec<Queries, Global>
Decommitments of extended execution trace values (for all trace segments) at position queried by the verifier.
constraint_queries: Queries
Decommitments of constraint composition polynomial evaluations at positions queried by the verifier.
ood_frame: OodFrame
Trace and constraint polynomial evaluations at an out-of-domain point.
fri_proof: FriProof
Low-degree proof for a DEEP composition polynomial.
pow_nonce: u64
Proof-of-work nonce for query seed grinding.
Implementations
impl StarkProof
impl StarkProof
pub fn options(&self) -> &ProofOptions
pub fn options(&self) -> &ProofOptions
Returns STARK protocol parameters used to generate this proof.
pub fn trace_layout(&self) -> &TraceLayout
pub fn trace_layout(&self) -> &TraceLayout
Returns a layout describing how columns of the execution trace described by this context are arranged into segments.
pub fn trace_length(&self) -> usize
pub fn trace_length(&self) -> usize
Returns trace length for the computation described by this proof.
pub fn get_trace_info(&self) -> TraceInfo
pub fn get_trace_info(&self) -> TraceInfo
Returns trace info for the computation described by this proof.
pub fn lde_domain_size(&self) -> usize
pub fn lde_domain_size(&self) -> usize
Returns the size of the LDE domain for the computation described by this proof.
pub fn security_level(&self, conjectured: bool) -> u32
pub fn security_level(&self, conjectured: bool) -> u32
Returns security level of this proof (in bits).
When conjectured
is true, conjectured security level is returned; otherwise, provable
security level is returned. Usually, the number of queries needed for provable security is
2x - 3x higher than the number of queries needed for conjectured security at the same
security level.
pub fn from_bytes(source: &[u8]) -> Result<StarkProof, DeserializationError>
pub fn from_bytes(source: &[u8]) -> Result<StarkProof, DeserializationError>
Returns a STARK proof read from the specified source
.
Errors
Returns an error of a valid STARK proof could not be read from the specified source
.
Trait Implementations
impl Clone for StarkProof
impl Clone for StarkProof
fn clone(&self) -> StarkProof
fn clone(&self) -> StarkProof
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for StarkProof
impl Debug for StarkProof
impl PartialEq<StarkProof> for StarkProof
impl PartialEq<StarkProof> for StarkProof
fn eq(&self, other: &StarkProof) -> bool
fn eq(&self, other: &StarkProof) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &StarkProof) -> bool
fn ne(&self, other: &StarkProof) -> bool
This method tests for !=
.
impl Eq for StarkProof
impl StructuralEq for StarkProof
impl StructuralPartialEq for StarkProof
Auto Trait Implementations
impl RefUnwindSafe for StarkProof
impl Send for StarkProof
impl Sync for StarkProof
impl Unpin for StarkProof
impl UnwindSafe for StarkProof
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more