pub struct Proof {
pub context: Context,
pub num_unique_queries: u8,
pub commitments: Commitments,
pub trace_queries: Vec<Queries>,
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: ContextBasic metadata about the execution of the computation described by this proof.
num_unique_queries: u8Number of unique queries made by the verifier. This will be different from the context.options.num_queries if the same position in the domain was queried more than once.
commitments: CommitmentsCommitments made by the prover during the commit phase of the protocol.
trace_queries: Vec<Queries>Decommitments of extended execution trace values (for all trace segments) at position queried by the verifier.
constraint_queries: QueriesDecommitments of constraint composition polynomial evaluations at positions queried by the verifier.
ood_frame: OodFrameTrace and constraint polynomial evaluations at an out-of-domain point.
fri_proof: FriProofLow-degree proof for a DEEP composition polynomial.
pow_nonce: u64Proof-of-work nonce for query seed grinding.
Implementations§
Source§impl Proof
impl Proof
Sourcepub fn options(&self) -> &ProofOptions
pub fn options(&self) -> &ProofOptions
Returns STARK protocol parameters used to generate this proof.
Sourcepub fn trace_info(&self) -> &TraceInfo
pub fn trace_info(&self) -> &TraceInfo
Returns trace info for the computation described by this proof.
Sourcepub 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.
Sourcepub fn conjectured_security<H>(&self) -> ConjecturedSecuritywhere
H: Hasher,
pub fn conjectured_security<H>(&self) -> ConjecturedSecuritywhere
H: Hasher,
Returns security level of this proof (in bits) using conjectured security.
This is the conjecture on the security of the Toy problem (Conjecture 1) in https://eprint.iacr.org/2021/582.
Sourcepub fn proven_security<H>(&self) -> ProvenSecuritywhere
H: Hasher,
pub fn proven_security<H>(&self) -> ProvenSecuritywhere
H: Hasher,
Returns security level of this proof (in bits) using proven security.
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.
Sourcepub fn from_bytes(source: &[u8]) -> Result<Proof, DeserializationError>
pub fn from_bytes(source: &[u8]) -> Result<Proof, 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§
Source§impl Deserializable for Proof
impl Deserializable for Proof
Source§fn read_from<R>(source: &mut R) -> Result<Proof, DeserializationError>where
R: ByteReader,
fn read_from<R>(source: &mut R) -> Result<Proof, DeserializationError>where
R: ByteReader,
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl Serializable for Proof
impl Serializable for Proof
Source§fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
fn write_into<W>(&self, target: &mut W)where
W: ByteWriter,
self into bytes and writes these bytes into the target.