Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::Chonk::Proof Struct Reference

A full proof for the IVC scheme containing a Mega proof showing correctness of the Hiding kernel (which recursive verified the last folding and decider proof) and a Goblin proof (translator VM, ECCVM and last merge proof). More...

#include <chonk.hpp>

Classes

class  DeserializationError
 

Public Member Functions

size_t size () const
 
std::vector< FFto_field_elements () const
 Serialize proof to field elements.
 
msgpack::sbuffer to_msgpack_buffer () const
 
uint8_t * to_msgpack_heap_buffer () const
 Very quirky method to convert a msgpack buffer to a "heap" buffer.
 
void to_file_msgpack (const std::string &filename) const
 
 MSGPACK_FIELDS (mega_proof, goblin_proof)
 
bool operator== (const Proof &other) const =default
 

Static Public Member Functions

static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS (size_t virtual_log_n=MegaZKFlavor::VIRTUAL_LOG_N)
 The size of a Chonk proof without backend-added public inputs.
 
static constexpr size_t PROOF_LENGTH (size_t virtual_log_n=MegaZKFlavor::VIRTUAL_LOG_N)
 The size of a Chonk proof with backend-added public inputs: HidingKernelIO.
 
static Proof from_field_elements (const std::vector< Chonk::FF > &fields)
 
static Proof from_msgpack_buffer (uint8_t const *&buffer)
 
static Proof from_msgpack_buffer (const msgpack::sbuffer &buffer)
 
static Proof from_file_msgpack (const std::string &filename)
 

Public Attributes

HonkProof mega_proof
 
GoblinProof goblin_proof
 

Static Public Attributes

static constexpr const char MSGPACK_SCHEMA_NAME [] = "ChonkProof"
 

Detailed Description

A full proof for the IVC scheme containing a Mega proof showing correctness of the Hiding kernel (which recursive verified the last folding and decider proof) and a Goblin proof (translator VM, ECCVM and last merge proof).

This proof will be zero-knowledge.

Definition at line 91 of file chonk.hpp.

Member Function Documentation

◆ from_field_elements()

Chonk::Proof bb::Chonk::Proof::from_field_elements ( const std::vector< Chonk::FF > &  fields)
static

Definition at line 571 of file chonk.cpp.

◆ from_file_msgpack()

Chonk::Proof bb::Chonk::Proof::from_file_msgpack ( const std::string &  filename)
static

Definition at line 653 of file chonk.cpp.

◆ from_msgpack_buffer() [1/2]

Chonk::Proof bb::Chonk::Proof::from_msgpack_buffer ( const msgpack::sbuffer &  buffer)
static

Definition at line 633 of file chonk.cpp.

◆ from_msgpack_buffer() [2/2]

Chonk::Proof bb::Chonk::Proof::from_msgpack_buffer ( uint8_t const *&  buffer)
static

Definition at line 623 of file chonk.cpp.

◆ MSGPACK_FIELDS()

bb::Chonk::Proof::MSGPACK_FIELDS ( mega_proof  ,
goblin_proof   
)

◆ operator==()

bool bb::Chonk::Proof::operator== ( const Proof other) const
default

◆ PROOF_LENGTH()

static constexpr size_t bb::Chonk::Proof::PROOF_LENGTH ( size_t  virtual_log_n = MegaZKFlavor::VIRTUAL_LOG_N)
inlinestaticconstexpr

The size of a Chonk proof with backend-added public inputs: HidingKernelIO.

Parameters
virtual_log_n
Returns
constexpr size_t

Definition at line 116 of file chonk.hpp.

◆ PROOF_LENGTH_WITHOUT_PUB_INPUTS()

static constexpr size_t bb::Chonk::Proof::PROOF_LENGTH_WITHOUT_PUB_INPUTS ( size_t  virtual_log_n = MegaZKFlavor::VIRTUAL_LOG_N)
inlinestaticconstexpr

The size of a Chonk proof without backend-added public inputs.

Parameters
virtual_log_n
Returns
constexpr size_t

Definition at line 101 of file chonk.hpp.

◆ size()

size_t bb::Chonk::Proof::size ( ) const

Definition at line 554 of file chonk.cpp.

◆ to_field_elements()

std::vector< Chonk::FF > bb::Chonk::Proof::to_field_elements ( ) const

Serialize proof to field elements.

Returns
std::vector<FF>

Definition at line 559 of file chonk.cpp.

◆ to_file_msgpack()

void bb::Chonk::Proof::to_file_msgpack ( const std::string &  filename) const

Definition at line 642 of file chonk.cpp.

◆ to_msgpack_buffer()

msgpack::sbuffer bb::Chonk::Proof::to_msgpack_buffer ( ) const

Definition at line 608 of file chonk.cpp.

◆ to_msgpack_heap_buffer()

uint8_t * bb::Chonk::Proof::to_msgpack_heap_buffer ( ) const

Very quirky method to convert a msgpack buffer to a "heap" buffer.

This method results in a buffer that is double-size-prefixed with the buffer size. This is to mimmic the original bb.js behavior which did a *out_proof = to_heap_buffer(to_buffer(proof));

Returns
uint8_t* Double size-prefixed msgpack buffer

Definition at line 615 of file chonk.cpp.

Member Data Documentation

◆ goblin_proof

GoblinProof bb::Chonk::Proof::goblin_proof

Definition at line 93 of file chonk.hpp.

◆ mega_proof

HonkProof bb::Chonk::Proof::mega_proof

Definition at line 92 of file chonk.hpp.

◆ MSGPACK_SCHEMA_NAME

constexpr const char bb::Chonk::Proof::MSGPACK_SCHEMA_NAME[] = "ChonkProof"
staticconstexpr

Definition at line 145 of file chonk.hpp.


The documentation for this struct was generated from the following files: