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

#include <origin_tag.hpp>

Public Member Functions

 OriginTag ()=default
 
 OriginTag (const OriginTag &other)=default
 
 OriginTag (OriginTag &&other)=default
 
OriginTagoperator= (const OriginTag &other)=default
 
OriginTagoperator= (OriginTag &&other) noexcept
 
 OriginTag (size_t parent_index, size_t child_index, bool is_submitted=true)
 Construct a new Origin Tag object.
 
 OriginTag (const OriginTag &tag_a, const OriginTag &tag_b)
 Construct a new Origin Tag by merging two other Origin Tags.
 
template<class... T>
 OriginTag (const OriginTag &tag, const T &... rest)
 Construct a new Origin Tag from merging several origin tags.
 
 ~OriginTag ()=default
 
bool operator== (const OriginTag &other) const
 
void poison ()
 
void unpoison ()
 
bool is_poisoned () const
 
bool is_empty () const
 
bool is_free_witness () const
 
void set_free_witness ()
 
void unset_free_witness ()
 

Public Attributes

size_t parent_tag = CONSTANT
 
numeric::uint256_t child_tag = numeric::uint256_t(0)
 
bool instant_death = false
 

Static Public Attributes

static constexpr size_t CONSTANT = static_cast<size_t>(-1)
 
static constexpr size_t FREE_WITNESS = static_cast<size_t>(-2)
 

Detailed Description

Definition at line 64 of file origin_tag.hpp.

Constructor & Destructor Documentation

◆ OriginTag() [1/6]

bb::OriginTag::OriginTag ( )
default

◆ OriginTag() [2/6]

bb::OriginTag::OriginTag ( const OriginTag other)
default

◆ OriginTag() [3/6]

bb::OriginTag::OriginTag ( OriginTag &&  other)
default

◆ OriginTag() [4/6]

bb::OriginTag::OriginTag ( size_t  parent_index,
size_t  child_index,
bool  is_submitted = true 
)
inline

Construct a new Origin Tag object.

Parameters
parent_indexThe index of the transcript object
child_indexThe round in which we generate/receive the value
is_submittedIf the value is submitted by the prover (not a challenge)

Definition at line 104 of file origin_tag.hpp.

◆ OriginTag() [5/6]

bb::OriginTag::OriginTag ( const OriginTag tag_a,
const OriginTag tag_b 
)

Construct a new Origin Tag by merging two other Origin Tags.

The function checks for 3 things: 1) The no tag has instant death set, 2) That tags are from the same transcript (same parent tag) or are empty, 3) A complex check for the child tags. After that the child tags are merged and we create a new Origin Tag

Parameters
tag_a
tag_b

Definition at line 42 of file origin_tag.cpp.

◆ OriginTag() [6/6]

template<class... T>
bb::OriginTag::OriginTag ( const OriginTag tag,
const T &...  rest 
)
inline

Construct a new Origin Tag from merging several origin tags.

Basically performs the same actions as the constructor from 2 Origin Tags, but iteratively

Template Parameters
T
Parameters
tag
rest

Definition at line 132 of file origin_tag.hpp.

◆ ~OriginTag()

bb::OriginTag::~OriginTag ( )
default

Member Function Documentation

◆ is_empty()

bool bb::OriginTag::is_empty ( ) const
inline

Definition at line 149 of file origin_tag.hpp.

◆ is_free_witness()

bool bb::OriginTag::is_free_witness ( ) const
inline

Definition at line 167 of file origin_tag.hpp.

◆ is_poisoned()

bool bb::OriginTag::is_poisoned ( ) const
inline

Definition at line 148 of file origin_tag.hpp.

◆ operator=() [1/2]

OriginTag & bb::OriginTag::operator= ( const OriginTag other)
default

◆ operator=() [2/2]

OriginTag & bb::OriginTag::operator= ( OriginTag &&  other)
inlinenoexcept

Definition at line 89 of file origin_tag.hpp.

◆ operator==()

bool bb::OriginTag::operator== ( const OriginTag other) const

Definition at line 37 of file origin_tag.cpp.

◆ poison()

void bb::OriginTag::poison ( )
inline

Definition at line 146 of file origin_tag.hpp.

◆ set_free_witness()

void bb::OriginTag::set_free_witness ( )
inline

Definition at line 168 of file origin_tag.hpp.

◆ unpoison()

void bb::OriginTag::unpoison ( )
inline

Definition at line 147 of file origin_tag.hpp.

◆ unset_free_witness()

void bb::OriginTag::unset_free_witness ( )
inline

Definition at line 169 of file origin_tag.hpp.

Member Data Documentation

◆ child_tag

numeric::uint256_t bb::OriginTag::child_tag = numeric::uint256_t(0)

Definition at line 79 of file origin_tag.hpp.

◆ CONSTANT

constexpr size_t bb::OriginTag::CONSTANT = static_cast<size_t>(-1)
staticconstexpr

Definition at line 66 of file origin_tag.hpp.

◆ FREE_WITNESS

constexpr size_t bb::OriginTag::FREE_WITNESS = static_cast<size_t>(-2)
staticconstexpr

Definition at line 67 of file origin_tag.hpp.

◆ instant_death

bool bb::OriginTag::instant_death = false

Definition at line 82 of file origin_tag.hpp.

◆ parent_tag

size_t bb::OriginTag::parent_tag = CONSTANT

Definition at line 73 of file origin_tag.hpp.


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