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

Entry point for Barretenberg command-line interface. More...

Namespaces

namespace  acir_bincode_mocks
 
namespace  avm2
 
namespace  bbapi
 
namespace  benchmark
 
namespace  crypto
 
namespace  curve
 
namespace  detail
 
namespace  eccvm
 
namespace  field_conversion_tests
 
namespace  gemini
 Prover output (evalutation pair, witness) that can be passed on to Shplonk batch opening.
 
namespace  group_elements
 
namespace  grumpkin
 
namespace  ipc
 
namespace  lmdblib
 
namespace  messaging
 
namespace  mock_circuits
 
namespace  nodejs
 
namespace  numeric
 
namespace  pairing
 
namespace  plookup
 
namespace  polynomial_arithmetic
 
namespace  prover_instance_inspector
 
namespace  scalar_multiplication
 
namespace  secp256k1
 
namespace  secp256r1
 
namespace  srs
 
namespace  starknet
 
namespace  stdlib
 
namespace  test
 
namespace  thread_heuristics
 
namespace  transform
 
namespace  utils
 
namespace  wnaf
 
namespace  world_state
 

Classes

struct  accumulator_triple_
 
struct  add_quad_
 
struct  add_triple_
 
class  API
 
struct  arithmetic_triple_
 
class  ArithmeticRelationImpl
 
struct  AssertGuard
 
class  BarycentricDataCompileTime
 
class  BarycentricDataRunTime
 
class  BaseTranscript
 Common transcript class for both parties. Stores the data for the current round, as well as the manifest. More...
 
class  BatchedAffineAddition
 Class for handling fast batched affine addition of large sets of EC points. More...
 
class  BatchedAffineAdditionTests
 
struct  BatchOpeningClaim
 An accumulator consisting of the Shplonk evaluation challenge and vectors of commitments and scalars. More...
 
struct  Bn254Fq12Params
 
struct  Bn254Fq2Params
 
struct  Bn254Fq6Params
 
class  Bn254FqParams
 
class  Bn254FrParams
 
struct  Bn254G1Params
 
struct  Bn254G2Params
 
class  BN254Settings
 Mock Flavors to use ZKSumcheckData and SmallSubgroupIPAProver in the PCS tests. More...
 
struct  BuilderTypeHelper
 
struct  BuilderTypeHelper< Curve, std::enable_if_t< Curve::is_stdlib_type > >
 
struct  BusVector
 A DataBus column. More...
 
class  Chonk
 The IVC scheme used by the aztec client for private function execution. More...
 
class  ChonkAPI
 
class  CircuitBuilderBase
 
class  CircuitChecker
 The unified interface for check circuit functionality implemented in the specialized CircuitChecker classes. More...
 
struct  CircuitSchemaInternal
 Serialized state of a circuit. More...
 
struct  ClaimBatcher_
 Logic to support batching opening claims for unshifted and shifted polynomials in Shplemini. More...
 
class  CommitmentKey
 CommitmentKey object over a pairing group 𝔾₁. More...
 
class  CommitmentTest
 
struct  CurveConstants
 
struct  cycle_node
 cycle_node represents the idx of a value of the circuit. It will belong to a CyclicPermutation, which constrains all nodes in a CyclicPermutation to have the same value. The total number of constraints is always <2^32 since that is the type used to represent variables, so we can save space by using a type smaller than size_t. More...
 
struct  databus_lookup_gate_
 
class  DatabusLookupRelationImpl
 Log-derivative lookup argument relation for establishing DataBus reads. More...
 
class  DefaultIO
 Manages the data that is propagated on the public inputs of an application/function circuit. More...
 
class  DeltaRangeConstraintRelationImpl
 
class  DependentTestRelationImpl
 A linearly dependent test relation for sumcheck testing. More...
 
struct  ecc_add_gate_
 
struct  ecc_dbl_gate_
 
struct  ecc_op_tuple
 
struct  EccOpCode
 Defines the opcodes for ECC operations used in both the Ultra and ECCVM formats. There are three opcodes that are reflected in both ultra ops and eccvm table and so, that lead to actual operations in the ECCVM : More...
 
class  ECCOpQueue
 Used to construct execution trace representations of elliptic curve operations. More...
 
class  EccOpQueueRelationImpl
 
class  EccOpsTable
 A table of ECC operations. More...
 
class  EccRelationsConsistency
 
class  ECCVMBoolsRelationImpl
 ECCVMBoolsRelationImpl evaluates the correctness of ECCVM boolean checks. More...
 
class  ECCVMCircuitBuilder
 
class  ECCVMFixedVKCommitments
 Stores the fixed ECCVM VK commitments (to precomputed polynomials) that depend only on the circuit size constant ECCVM_FIXED_SIZE. More...
 
class  ECCVMFlavor
 
class  ECCVMLookupRelationImpl
 
class  ECCVMMSMMBuilder
 
class  ECCVMMSMRelationImpl
 MSM relations that evaluate the Strauss multiscalar multiplication algorithm. More...
 
struct  ECCVMOperation
 
class  ECCVMPointTablePrecomputationBuilder
 
class  ECCVMPointTableRelationImpl
 ECCVMPointTableRelationImpl. More...
 
class  ECCVMProver
 
class  ECCVMRecursiveFlavor
 
class  ECCVMRecursiveTests
 
class  EccvmRowTracker
 Class for tracking the number of rows in the ECCVM circuit and the number of muls performed as the op queue is populated. More...
 
class  ECCVMSetRelationImpl
 
class  ECCVMTraceChecker
 
class  ECCVMTranscriptBuilder
 
class  ECCVMTranscriptRelationImpl
 ECCVMTranscriptRelationImpl evaluates the correctness of the ECCVM transcript columns. More...
 
class  ECCVMVerifier_
 Unified ECCVM verifier class for both native and recursive verification. More...
 
class  ECCVMWnafRelationImpl
 ECCVMWnafRelationImpl evaluates relations that convert scalar multipliers into 4-bit WNAF slices. More...
 
class  EcdsaCircuit
 
class  EllipticRelationImpl
 
class  EvaluationDomain
 
class  ExecutionTraceBlock
 Basic structure for storing gate data in a builder. More...
 
struct  field
 General class for prime fields see Prime field documentation["field documentation"] for general implementation reference. More...
 
class  field12
 
struct  field2
 
class  field6
 
struct  FieldVM
 Virtual machine for field arithmetic operations. More...
 
struct  fixed_group_add_quad_
 
struct  fixed_group_init_quad_
 
class  Formatter
 
class  FrCodec
 
struct  GateSeparatorPolynomial
 Implementation of the methods for the \(pow_{\beta}\)-polynomials used in in Sumcheck. More...
 
class  GeminiProver_
 
class  GeminiVerifier_
 Gemini Verifier utility methods used by ShpleminiVerifier. More...
 
class  GenericLookupRelationImpl
 Specifies positions of elements in the tuple of entities received from methods in the Settings class. More...
 
class  GenericPermutationRelationImpl
 
class  Goblin
 
struct  GoblinAccumulationOutput
 
class  GoblinMockCircuits
 
struct  GoblinProof
 
struct  GoblinStdlibProof
 
struct  GoogleBbBenchReporter
 
class  group
 group class. Represents an elliptic curve group element. Group is parametrised by Fq and Fr More...
 
class  GrumpkinSettings
 
class  HidingKernelIO
 Manages the data that is propagated on the public inputs of of a hiding kernel circuit. More...
 
class  HypernovaDeciderProver
 
class  HypernovaDeciderVerifier
 
class  HypernovaFoldingProver
 
class  HypernovaFoldingVerifier
 
class  HypernovaNativeTypes
 
class  HypernovaRecursiveTypes
 
class  IPA
 IPA (inner product argument) commitment scheme class. More...
 
struct  is_field_type
 Helper to determine whether input is bberg::field type. More...
 
struct  is_field_type< bb::field< Params > >
 
class  IVCBase
 Base class interface for IVC schemes. More...
 
class  KZG
 
class  KZGTest
 
class  LogDerivLookupRelationImpl
 Log-derivative lookup argument relation for establishing lookup reads from tables with 3 or fewer columns. More...
 
class  MaliciousWitnessInjector
 Test utility for injecting malicious witness values to test failure modes. More...
 
struct  Mapping
 Stores permutation mapping data for a single wire column. More...
 
class  MegaCircuitBuilder_
 
class  MegaExecutionTraceBlocks
 
class  MegaFlavor
 
class  MegaRecursiveFlavor_
 The recursive counterpart to the "native" Mega flavor. More...
 
class  MegaTraceArithmeticBlock
 
class  MegaTraceBlock
 
struct  MegaTraceBlockData
 A container indexed by the types of the blocks in the execution trace. More...
 
class  MegaTraceBusReadBlock
 
class  MegaTraceDeltaRangeBlock
 
class  MegaTraceEllipticBlock
 
class  MegaTraceLookupBlock
 
class  MegaTraceMemoryBlock
 
class  MegaTraceNonNativeFieldBlock
 
class  MegaTracePoseidon2ExternalBlock
 
class  MegaTracePoseidon2InternalBlock
 
class  MegaTracePublicInputBlock
 
class  MegaZKFlavor
 Child class of MegaFlavor that runs with ZK Sumcheck. See more in Sumcheck Outline. More...
 
class  MegaZKRecursiveFlavor_
 The recursive counterpart to the "native" MegaZKFlavor. More...
 
class  MemoryRelationImpl
 
class  MergeProver
 Prover class for the Goblin ECC op queue transcript merge protocol. More...
 
class  MergeTests
 Unified test fixture for native and recursive merge verification. More...
 
class  MergeTranscriptTests
 Test class for merge protocol transcript pinning tests. More...
 
class  MergeVerifier_
 Unified verifier class for the Goblin ECC op queue transcript merge protocol. More...
 
struct  MetaData
 Dyadic trace size and public inputs metadata; Common between prover and verifier keys. More...
 
class  MockCircuits
 
struct  MockClaimGenerator
 Constructs random polynomials, computes commitments and corresponding evaluations. More...
 
class  MockTranscript
 Mock transcript class used by IPA tests and fuzzer. More...
 
struct  mul_quad_
 
struct  mul_triple_
 
class  MultilinearBatchingAccumulatorRelationImpl
 
class  MultilinearBatchingFlavor
 
class  MultilinearBatchingInstanceRelationImpl
 
class  MultilinearBatchingProver
 
struct  MultilinearBatchingProverClaim
 
class  MultilinearBatchingProvingKey
 
class  MultilinearBatchingRecursiveFlavor
 
class  MultilinearBatchingVerifier
 
struct  MultilinearBatchingVerifierClaim
 
struct  MultithreadData
 
class  NamedUnion
 A wrapper around std::variant that provides msgpack serialization based on type names. More...
 
class  NativeVerificationKey_
 Base Native verification key class. More...
 
struct  non_native_multiplication_witnesses
 
struct  non_native_partial_multiplication_witnesses
 
class  NonNativeFieldRelationImpl
 
class  OinkProver
 Class for all the oink rounds, which are shared between the folding prover and ultra prover. More...
 
class  OinkVerifier
 Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultra verifier. More...
 
struct  OinkVerifierInstanceType
 
struct  OinkVerifierInstanceType< Flavor, true >
 
class  OpeningClaim
 Unverified claim (C,r,v) for some witness polynomial p(X) such that. More...
 
class  OpeningPair
 Opening pair (r,v) for some witness polynomial p(X) such that p(r) = v. More...
 
struct  OriginTag
 
class  PairingPoints
 An object storing two EC points that represent the inputs to a pairing check. More...
 
class  PairingPointsTagging
 Class to manage pairing point tagging. More...
 
struct  PermutationMapping
 
struct  PolyData
 
class  Polynomial
 Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x ... a_n x^n of a finite field polynomial equation of degree that is at most the size of some zk circuit. Past 'n' it has a virtual size where it conceptually has coefficients all equal to 0. Notably, we allow indexing past 'n' up to our virtual size (checked only in a debug build, however). As well, we have a start index that means coefficients before start_index are also considered to be 0. The polynomial is used to represent the gates of our arithmetized zk programs. Polynomials use the majority of the memory in proving, so caution should be used in making sure unnecessary copies are avoided, both for avoiding unnecessary memory usage and performance due to unnecessary allocations. The polynomial has a maximum degree in the underlying SharedShiftedVirtualZeroesArray, dictated by the circuit size, this is just used for debugging as we represent. More...
 
struct  PolynomialSpan
 
struct  poseidon2_external_gate_
 
struct  poseidon2_internal_gate_
 
class  Poseidon2ExternalRelationImpl
 
class  Poseidon2InternalRelationImpl
 
struct  PrecomputedData_
 The precomputed data needed to compute a Honk VK. More...
 
struct  PrivateExecutionStepRaw
 This is the msgpack encoding of the objects returned by the following typescript: const stepToStruct = (step: PrivateExecutionStep) => { return { bytecode: step.bytecode, witness: serializeWitness(step.witness), vk: step.vk, functionName: step.functionName }; }; await fs.writeFile(path, encode(executionSteps.map(stepToStruct))); See format notes below. More...
 
struct  PrivateExecutionSteps
 
class  ProverEqPolynomial
 Prover-side eq(X, r) polynomial over Boolean hypercube. More...
 
class  ProverInstance_
 A ProverInstance is normally constructed from a finalized circuit and it contains all the information required by a Mega Honk prover to create a proof. More...
 
class  ProverOpeningClaim
 Polynomial p and an opening pair (r,v) such that p(r) = v. More...
 
class  ProxyCaller
 Wrapper class that allows us to call IPA methods. More...
 
struct  PublicComponentKey
 
class  PublicInputComponent
 A wrapper class for deserializing objects from the public inputs of a circuit. More...
 
struct  PublicInputsAndProof
 
struct  RamRecord
 A RAM memory record that can be ordered, first by index, then by timestamp. More...
 
struct  RamTranscript
 RamTranscript contains the RamRecords for a particular RAM table (recording READ and WRITE operations) as well as the vector whose ith entry corresponds to the current ith value of the RAM table. More...
 
class  RecursiveCircuit
 
class  RecursiveVeriferCommitmentKeyTest
 
class  RefArray
 A template class for a reference array. Behaves as if std::array<T&, N> was possible. More...
 
class  RefSpan
 
class  RefVector
 A template class for a reference vector. Behaves as if std::vector<T&> was possible. More...
 
class  Relation
 A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribution of a given relation to the corresponding accumulator. More...
 
class  RelationChecker
 A debugging utility for checking whether a set of polynomials satisfies the relations for a given Flavor. More...
 
class  RelationChecker< bb::UltraFlavor >
 
class  RelationChecker< MegaFlavor >
 
struct  RelationParameters
 Container for parameters used by the grand product (permutation, lookup) Honk relations. More...
 
class  RelationUtils
 
struct  RepeatedCommitmentsData
 
class  RollupIO
 The data that is propagated on the public inputs of a rollup circuit. More...
 
class  RomRamLogic_
 ROM/RAM logic handler for UltraCircuitBuilder. More...
 
struct  RomRecord
 A ROM memory record that can be ordered, where the ordering is given by the index (a.k.a. position in the ROM array). More...
 
struct  RomTranscript
 RomTranscript contains the RomRecords for a particular ROM table as well as the vector whose ith entry corresponds to the ith value (or pair of values) of the ROM table. More...
 
struct  RoundUnivariateHandler
 Handler for processing round univariates in sumcheck. Default implementation: send evaluations directly to transcript. More...
 
struct  RoundUnivariateHandler< Flavor, true >
 Specialization for Grumpkin flavors: commit to round univariates. More...
 
struct  RowDisablingPolynomial
 Polynomial for Sumcheck with disabled Rows. More...
 
class  Selector
 Abstract interface for a generic selector. More...
 
class  ShpleminiKZGTest
 
class  ShpleminiProver_
 
class  ShpleminiTest
 
class  ShpleminiVerifier_
 An efficient verifier for the evaluation proofs of multilinear polynomials and their shifts. More...
 
class  ShplonkProver_
 Shplonk Prover. More...
 
class  ShplonkTest
 
class  ShplonkVerifier_
 Shplonk Verifier. More...
 
class  SlabVectorSelector
 Selector backed by a slab allocator vector. More...
 
struct  SmallSubgroupIPACommitments
 Contains commitments to polynomials [G], [A], and [Q]. See SmallSubgroupIPAProver docs. More...
 
class  SmallSubgroupIPAProver
 A Curve-agnostic ZK protocol to prove inner products of small vectors. More...
 
class  SmallSubgroupIPATest
 
class  SmallSubgroupIPAVerifier
 Verifies the consistency of polynomial evaluations provided by the the prover. More...
 
class  StdlibVerificationKey_
 Base Stdlib verification key class. More...
 
struct  SumcheckOutput
 Contains the evaluations of multilinear polynomials \( P_1, \ldots, P_N\) at the challenge point \(\vec u =(u_0,\ldots, u_{d-1})\). These are computed by Sumcheck Prover and need to be checked using Shplemini. More...
 
class  SumcheckProver
 The implementation of the sumcheck Prover for statements of the form \(\sum_{\vec \ell \in \{0,1\}^d} pow_{\beta}(\vec \ell) \cdot F \left(P_1(\vec \ell),\ldots, P_N(\vec \ell) \right) = 0 \) for multilinear polynomials \(P_1, \ldots, P_N \). More...
 
class  SumcheckProverRound
 Imlementation of the Sumcheck prover round. More...
 
class  SumcheckTestFlavor_
 A flexible, minimal test flavor for sumcheck testing. More...
 
class  SumcheckVerifier
 Implementation of the sumcheck Verifier for statements of the form \(\sum_{\vec \ell \in \{0,1\}^d} pow_{\beta}(\vec \ell) \cdot F \left(P_1(\vec \ell),\ldots, P_N(\vec \ell) \right) = 0 \) for multilinear polynomials \(P_1, \ldots, P_N \). More...
 
class  SumcheckVerifierRound
 Implementation of the Sumcheck Verifier Round. More...
 
class  SumcheckVerifierRound< Flavor, true >
 Specialization for Grumpkin flavors: receive commitments and evaluations, defer per-round verification to Shplemini. More...
 
struct  ThreadChunk
 
class  ThreadPool
 
class  ThreadTest
 
class  TraceToPolynomials
 
struct  TranscriptFor
 Helper to get the appropriate Transcript type for a given Curve. More...
 
struct  TranscriptFor< Curve, true >
 
class  TranscriptManifest
 
class  TranslationData
 A class designed to accept the ECCVM Transcript Polynomials, concatenate their masking terms in Lagrange basis over the SmallSubgroup, and commit to the concatenation. More...
 
struct  TranslationEvaluations_
 Stores the evaluations of op, Px, Py, z1, and z2 computed by the ECCVM Prover. These evaluations are batched and checked against the accumulated_result, which is computed and verified by Translator. More...
 
class  TranslatorAccumulatorTransferRelationImpl
 
class  TranslatorCircuitBuilder
 TranslatorCircuitBuilder creates a circuit that evaluates the correctness of the evaluation of EccOpQueue in Fq while operating in the Fr scalar field (r is the modulus of Fr and q is the modulus of Fq) More...
 
class  TranslatorCircuitChecker
 
class  TranslatorDecompositionRelationImpl
 
class  TranslatorDeltaRangeConstraintRelationImpl
 
struct  TranslatorFixedVKCommitments
 Stores the fixed Translator VK commitments (to precomputed polynomials) that depend only on the circuit size constant CONST_TRANSLATOR_LOG_N. More...
 
class  TranslatorFlavor
 
struct  TranslatorInputData_
 Data passed from ECCVM Verifier to Translator Verifier for verification. More...
 
class  TranslatorNonNativeFieldRelationImpl
 
class  TranslatorOpcodeConstraintRelationImpl
 
class  TranslatorPermutationRelationImpl
 
class  TranslatorProver
 
class  TranslatorProvingKey
 
class  TranslatorRecursiveFlavor
 The recursive counterpart of the native Translator flavor. More...
 
class  TranslatorRecursiveTests
 Test suite for standalone recursive verification of translation proofs. More...
 
class  TranslatorRecursiveVerifier
 
class  TranslatorVerifier
 
class  TranslatorZeroConstraintsRelationImpl
 
struct  TupleOfContainersOverArray
 Generic templates for constructing a container of containers of varying length, where the various lengths are specified in an array. More...
 
struct  TupleOfContainersOverArray< InnerContainer, ValueType, domain_end, std::index_sequence< I... > >
 
class  U256Codec
 
class  UltraCircuitBuilder_
 
class  UltraCircuitChecker
 
class  UltraEccOpsTable
 Stores a table of elliptic curve operations represented in the Ultra format. More...
 
class  UltraExecutionTraceBlocks
 
class  UltraFlavor
 
class  UltraHonkAPI
 
class  UltraHonkTests
 
class  UltraKeccakFlavor
 
class  UltraKeccakRecursiveFlavor_
 
class  UltraKeccakZKFlavor
 
struct  UltraOp
 
class  UltraPermutationRelationImpl
 Ultra Permutation Relation. More...
 
class  UltraProver_
 
class  UltraRecursiveFlavor_
 The recursive counterpart to the "native" Ultra flavor. More...
 
class  UltraRollupFlavor
 
class  UltraRollupRecursiveFlavor_
 The recursive counterpart to the "native" UltraRollupFlavor. More...
 
class  UltraTraceArithmeticBlock
 
class  UltraTraceBlock
 
struct  UltraTraceBlockData
 Defines the circuit block types for the Ultra arithmetization. More...
 
class  UltraTraceDeltaRangeBlock
 
class  UltraTraceEllipticBlock
 
class  UltraTraceLookupBlock
 
class  UltraTraceMemoryBlock
 
class  UltraTraceNonNativeFieldBlock
 
class  UltraTracePoseidon2ExternalBlock
 
class  UltraTracePoseidon2InternalBlock
 
class  UltraTracePublicInputBlock
 
class  UltraVerifier_
 
class  UltraZKFlavor
 Child class of UltraFlavor that runs with ZK Sumcheck. More...
 
class  UltraZKRecursiveFlavor_
 The recursive counterpart to the Ultra flavor with ZK. More...
 
class  Univariate
 A univariate polynomial represented by its values on {0, 1,..., domain_end - 1}. More...
 
class  UnivariateClaimData
 
class  UnivariateCoefficientBasis
 A view of a univariate, also used to truncate univariates. More...
 
class  UnivariateView
 A view of a univariate, also used to truncate univariates. More...
 
class  VerifierCommitmentKey
 Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit. More...
 
class  VerifierCommitmentKey< curve::BN254 >
 Specialization for bn254. More...
 
class  VerifierCommitmentKey< curve::Grumpkin >
 Specialization for Grumpkin. More...
 
struct  VerifierEqPolynomial
 Verifier-side polynomial for division-free evaluation of eq(r, u). More...
 
class  VerifierInstance_
 The VerifierInstance encapsulates all the necessary information for a Mega Honk Verifier to verify a proof (sumcheck + Shplemini). In the context of folding, this is provided to the Hypernova verifier as an incoming instance. More...
 
struct  VerifierZKCorrectionHandler
 Handler for ZK-related verification adjustments in sumcheck. Default implementation: no ZK adjustments needed. More...
 
struct  VerifierZKCorrectionHandler< Flavor, true >
 Specialization for ZK flavors: handle Libra masking and row disabling. More...
 
class  VKAndHash_
 
struct  VMSettings
 Settings structure to control which operations are enabled in the VM. More...
 
class  WitnessComputation
 Methods for managing the compututation of derived witness polynomials such as the permutation grand product, log-derivative lookup inverses, and RAM/RAM memory records. More...
 
class  ZeroSelector
 Selector specialization that only allows zeros. More...
 
struct  ZKSumcheckData
 This structure is created to contain various polynomials and constants required by ZK Sumcheck. More...
 

Concepts

concept  HasMsgpackSchemaName
 Concept to check if a type has a static NAME member.
 
concept  IsUltraHonk
 Test whether a type T lies in a list of types ...U.
 
concept  IsUltraOrMegaHonk
 
concept  IsMegaFlavor
 
concept  HasDataBus
 
concept  UseRowDisablingPolynomial
 
concept  HasIPAAccumulator
 
concept  IsRecursiveFlavor
 
concept  IsKeccakFlavor
 
concept  isMultilinearBatchingFlavor
 
concept  IsGrumpkinFlavor
 
concept  IsAnyOf
 
concept  IsDeserializableFromPublicInputs
 A concept defining requirements for types that are to be deserialized from the public inputs of a circuit via the PublicInputComponent class.
 
concept  HasSubrelationLinearlyIndependentMember
 
concept  isSkippable
 The templates defined herein facilitate sharing the relation arithmetic between the prover and the verifier.
 
concept  isRowSkippable
 Check if the flavor has a static skip method to determine if accumulation of all relations can be skipped for a given row.
 
concept  isAvmFlavor
 
concept  InCircuit
 

Typedefs

using CommitmentSchemeParams = ::testing::Types< curve::BN254 >
 
using IpaCommitmentSchemeParams = ::testing::Types< curve::Grumpkin >
 
using Curve = curve::Grumpkin
 
using TestSettings = ::testing::Types< BN254Settings, GrumpkinSettings >
 
using CurveTypes = ::testing::Types< curve::BN254, curve::Grumpkin >
 
using TestFlavors = ::testing::Types< BN254Settings, GrumpkinSettings >
 
using Curves = ::testing::Types< curve::BN254, curve::Grumpkin >
 
using fq = field< Bn254FqParams >
 
using fq12 = field12< fq2, fq6, Bn254Fq12Params >
 
using fq2 = field2< fq, Bn254Fq2Params >
 
using fq6 = field6< fq2, Bn254Fq6Params >
 
using fr = field< Bn254FrParams >
 
using g1 = group< fq, fr, Bn254G1Params >
 
using g2 = group< fq2, fr, Bn254G2Params >
 
using ECCVMVerifier = ECCVMVerifier_< ECCVMFlavor >
 
using ECCVMRecursiveVerifier = ECCVMVerifier_< ECCVMRecursiveFlavor >
 
template<typename FF >
using DependentTestRelation = Relation< DependentTestRelationImpl< FF > >
 
using SumcheckTestFlavor = SumcheckTestFlavor_< curve::BN254, false, true >
 Base test flavor (BN254, non-ZK, short monomials)
 
using SumcheckTestFlavorZK = SumcheckTestFlavor_< curve::BN254, true, true >
 Zero-knowledge variant.
 
using SumcheckTestFlavorFullBary = SumcheckTestFlavor_< curve::BN254, false, false >
 Full barycentric extension variant.
 
using SumcheckTestFlavorGrumpkinZK = SumcheckTestFlavor_< curve::Grumpkin, true, true >
 Grumpkin ZK variant.
 
using SumcheckTestFlavorZKFullBary = SumcheckTestFlavor_< curve::BN254, true, false >
 ZK + Full barycentric combination.
 
using MergeVerifier = MergeVerifier_< curve::BN254 >
 
using CyclicPermutation = std::vector< cycle_node >
 
using arithmetic_triple = arithmetic_triple_< bb::fr >
 
using PublicInputsVector = std::vector< fr >
 
using HonkProof = std::vector< fr >
 
template<typename Builder >
using StdlibPublicInputsVector = std::vector< bb::stdlib::field_t< Builder > >
 
using EccvmOpsTable = EccOpsTable< ECCVMOperation >
 A VM operation is represented as one row with 6 columns in the ECCVM version of the Op Queue. | OP | X | Y | z_1 | z_2 | mul_scalar_full |.
 
template<class Fr , size_t domain_end, size_t num_evals>
using BarycentricData = std::conditional_t< is_field_type_v< Fr >, BarycentricDataCompileTime< Fr, domain_end, num_evals >, BarycentricDataRunTime< Fr, domain_end, num_evals > >
 Exposes BarycentricData with compile time arrays if the type is bberg::field and runtime arrays otherwise.
 
using evaluation_domain = EvaluationDomain< bb::fr >
 
template<typename FF >
using DatabusLookupRelation = Relation< DatabusLookupRelationImpl< FF > >
 
template<typename FF >
using DeltaRangeConstraintRelation = Relation< DeltaRangeConstraintRelationImpl< FF > >
 
template<typename FF >
using EccOpQueueRelation = Relation< EccOpQueueRelationImpl< FF > >
 
template<typename FF >
using ECCVMBoolsRelation = Relation< ECCVMBoolsRelationImpl< FF > >
 
template<typename FF >
using ECCVMLookupRelation = Relation< ECCVMLookupRelationImpl< FF > >
 
template<typename FF >
using ECCVMMSMRelation = Relation< ECCVMMSMRelationImpl< FF > >
 
template<typename FF >
using ECCVMPointTableRelation = Relation< ECCVMPointTableRelationImpl< FF > >
 
template<typename FF >
using ECCVMSetRelation = Relation< ECCVMSetRelationImpl< FF > >
 
template<typename FF >
using ECCVMTranscriptRelation = Relation< ECCVMTranscriptRelationImpl< FF > >
 
template<typename FF >
using ECCVMWnafRelation = Relation< ECCVMWnafRelationImpl< FF > >
 
template<typename FF >
using EllipticRelation = Relation< EllipticRelationImpl< FF > >
 
template<typename Settings , typename FF >
using GenericLookupRelation = Relation< GenericLookupRelationImpl< Settings, FF > >
 
template<typename Settings , typename FF >
using GenericLookup = GenericLookupRelationImpl< Settings, FF >
 
template<typename Settings , typename FF >
using GenericPermutationRelation = Relation< GenericPermutationRelationImpl< Settings, FF > >
 
template<typename Settings , typename FF >
using GenericPermutation = GenericPermutationRelationImpl< Settings, FF >
 
template<typename FF >
using LogDerivLookupRelation = Relation< LogDerivLookupRelationImpl< FF > >
 
template<typename FF >
using MemoryRelation = Relation< MemoryRelationImpl< FF > >
 
template<typename FF >
using MultilinearBatchingInstanceRelation = Relation< MultilinearBatchingInstanceRelationImpl< FF > >
 
template<typename FF >
using MultilinearBatchingAccumulatorRelation = Relation< MultilinearBatchingAccumulatorRelationImpl< FF > >
 
template<typename ValueType , size_t >
using ExtractValueType = ValueType
 
template<typename Tuple >
using HomogeneousTupleToArray = std::array< std::tuple_element_t< 0, Tuple >, std::tuple_size_v< Tuple > >
 
template<typename FF , auto LENGTHS>
using TupleOfUnivariates = typename TupleOfContainersOverArray< bb::Univariate, FF, LENGTHS >::type
 
template<typename FF , auto LENGTHS>
using TupleOfValues = typename TupleOfContainersOverArray< ExtractValueType, FF, LENGTHS >::type
 
template<typename FF , auto LENGTHS>
using ArrayOfValues = HomogeneousTupleToArray< TupleOfValues< FF, LENGTHS > >
 
template<typename FF >
using NonNativeFieldRelation = Relation< NonNativeFieldRelationImpl< FF > >
 
template<typename FF >
using UltraPermutationRelation = Relation< UltraPermutationRelationImpl< FF > >
 
template<typename FF >
using Poseidon2ExternalRelation = Relation< Poseidon2ExternalRelationImpl< FF > >
 
template<typename FF >
using Poseidon2InternalRelation = Relation< Poseidon2InternalRelationImpl< FF > >
 
template<typename FF >
using TranslatorDecompositionRelation = Relation< TranslatorDecompositionRelationImpl< FF > >
 
template<typename FF >
using TranslatorDeltaRangeConstraintRelation = Relation< TranslatorDeltaRangeConstraintRelationImpl< FF > >
 
template<typename FF >
using TranslatorOpcodeConstraintRelation = Relation< TranslatorOpcodeConstraintRelationImpl< FF > >
 
template<typename FF >
using TranslatorAccumulatorTransferRelation = Relation< TranslatorAccumulatorTransferRelationImpl< FF > >
 
template<typename FF >
using TranslatorZeroConstraintsRelation = Relation< TranslatorZeroConstraintsRelationImpl< FF > >
 
template<typename FF >
using TranslatorNonNativeFieldRelation = Relation< TranslatorNonNativeFieldRelationImpl< FF > >
 
template<typename FF >
using TranslatorPermutationRelation = Relation< TranslatorPermutationRelationImpl< FF > >
 
template<typename FF >
using ArithmeticRelation = Relation< ArithmeticRelationImpl< FF > >
 
using UltraCircuitBuilder = UltraCircuitBuilder_< UltraExecutionTraceBlocks >
 
using MegaCircuitBuilder = MegaCircuitBuilder_< field< Bn254FrParams > >
 
using DataBus = std::array< BusVector, 3 >
 The DataBus; facilitates storage of public circuit input/output.
 
using NativeTranscript = BaseTranscript< FrCodec, bb::crypto::Poseidon2< bb::crypto::Poseidon2Bn254ScalarFieldParams > >
 
using KeccakTranscript = BaseTranscript< U256Codec, bb::crypto::Keccak >
 
template<typename Builder >
using StdlibTranscript = BaseTranscript< stdlib::StdlibCodec< stdlib::field_t< Builder > >, stdlib::poseidon2< Builder > >
 
using UltraStdlibTranscript = BaseTranscript< stdlib::StdlibCodec< stdlib::field_t< UltraCircuitBuilder > >, stdlib::poseidon2< UltraCircuitBuilder > >
 
using MegaStdlibTranscript = BaseTranscript< stdlib::StdlibCodec< stdlib::field_t< MegaCircuitBuilder > >, stdlib::poseidon2< MegaCircuitBuilder > >
 
template<typename Curve >
using TranscriptFor_t = typename TranscriptFor< Curve >::type
 
using MegaOinkProver = OinkProver< MegaFlavor >
 
using AggregationState = stdlib::recursion::PairingPoints< UltraCircuitBuilder >
 
using UltraProver = UltraProver_< UltraFlavor >
 
using UltraZKProver = UltraProver_< UltraZKFlavor >
 
using UltraKeccakProver = UltraProver_< UltraKeccakFlavor >
 
using UltraKeccakZKProver = UltraProver_< UltraKeccakZKFlavor >
 
using MegaProver = UltraProver_< MegaFlavor >
 
using MegaZKProver = UltraProver_< MegaZKFlavor >
 
using UltraVerifier = UltraVerifier_< UltraFlavor >
 
using UltraRollupVerifier = UltraVerifier_< UltraRollupFlavor >
 
using UltraKeccakVerifier = UltraVerifier_< UltraKeccakFlavor >
 
using MegaVerifier = UltraVerifier_< MegaFlavor >
 
using MegaZKVerifier = UltraVerifier_< MegaZKFlavor >
 

Enumerations

enum class  AssertMode : std::uint8_t { ABORT , WARN }
 
enum  CurveType { BN254 , SECP256K1 , SECP256R1 , GRUMPKIN }
 
enum class  Instruction {
  SET_VALUE , ADD , ADD_ASSIGN , INCREMENT ,
  MUL , MUL_ASSIGN , SUB , SUB_ASSIGN ,
  DIV , DIV_ASSIGN , INV , NEG ,
  SQR , SQR_ASSIGN , POW , SQRT ,
  IS_ZERO , EQUAL , NOT_EQUAL , TO_MONTGOMERY ,
  FROM_MONTGOMERY , REDUCE_ONCE , SELF_REDUCE , BATCH_INVERT
}
 Enumeration of VM instructions that can be executed. More...
 
enum class  VKSerializationMode : std::uint8_t { FULL , NO_METADATA }
 Enum to control verification key metadata serialization. More...
 
enum class  CircuitType : uint32_t { STANDARD = 0 , ULTRA = 2 , UNDEFINED = 3 }
 
enum  MergeSettings { PREPEND , APPEND }
 The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at the end (APPEND) of the EccOpQueue. More...
 
enum  GenericPermutationSettingIndices { INVERSE_POLYNOMIAL_INDEX , FIRST_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX , SECOND_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX , PERMUTATION_SETS_START_POLYNOMIAL_INDEX }
 Specifies positions of elements in the tuple of entities received from methods in the Settings class. More...
 
enum class  TamperType {
  MODIFY_SUMCHECK_UNIVARIATE , MODIFY_SUMCHECK_EVAL , MODIFY_Z_PERM_COMMITMENT , MODIFY_GEMINI_WITNESS ,
  END
}
 
enum class  BusId { CALLDATA , SECONDARY_CALLDATA , RETURNDATA }
 

Functions

void avm_prove (const std::filesystem::path &inputs_path, const std::filesystem::path &output_path)
 Writes an avm proof and corresponding (incomplete) verification key to files.
 
void avm_check_circuit (const std::filesystem::path &inputs_path)
 Stub - throws runtime error if called.
 
bool avm_verify (const std::filesystem::path &proof_path, const std::filesystem::path &public_inputs_path, const std::filesystem::path &vk_path)
 Verifies an avm proof and writes the result to stdout.
 
void avm_simulate (const std::filesystem::path &inputs_path)
 Simulates an public transaction.
 
void avm_write_verification_key (const std::filesystem::path &output_path)
 Writes an avm (incomplete) verification key to a file.
 
void chonk_gate_count (const std::string &bytecode_path, bool include_gates_per_opcode)
 
std::vector< uint8_t > decompress (const void *bytes, size_t size)
 
std::vector< uint8_t > compress (const std::vector< uint8_t > &input)
 
int process_msgpack_commands (std::istream &input_stream)
 Process msgpack API commands from an input stream.
 
int execute_msgpack_ipc_server (std::unique_ptr< ipc::IpcServer > server)
 Execute msgpack commands over IPC.
 
int execute_msgpack_run (const std::string &msgpack_input_file, int max_clients=1, size_t request_ring_size=1024UL *1024, size_t response_ring_size=1024UL *1024)
 Execute msgpack run command.
 
bool transpile_artifact (const std::string &input_path, const std::string &output_path)
 Transpile the artifact file (or copy if transpiler not enabled)
 
bool process_aztec_artifact (const std::string &input_path, const std::string &output_path, bool force=false)
 Process Aztec contract artifacts: transpile and generate verification keys.
 
std::vector< std::string > find_contract_artifacts (const std::string &search_path=".")
 Find all contract artifacts in target/ directories.
 
bool process_all_artifacts (const std::string &search_path=".", bool force=false)
 Process all discovered contract artifacts in a directory tree.
 
bool get_cache_paths (const std::string &input_path)
 Get cache paths for all verification keys in an artifact.
 
size_t get_file_size (std::string const &filename)
 
std::vector< uint8_t > read_file (const std::string &filename, size_t bytes=0)
 
void write_file (const std::string &filename, std::vector< uint8_t > const &data)
 
template<typename Fr >
std::string field_elements_to_json (const std::vector< Fr > &fields)
 
void print_active_subcommands (const CLI::App &app, const std::string &prefix="bb command: ")
 
CLI::App * find_deepest_subcommand (CLI::App *app)
 
void print_subcommand_options (const CLI::App *sub)
 
int parse_and_run_cli_command (int argc, char *argv[])
 Parse command line arguments and run the corresponding command.
 
std::vector< uint8_t > get_curve_constants_msgpack ()
 Generate msgpack-encoded curve constants for all supported curves.
 
void write_curve_constants_msgpack_to_stdout ()
 Write msgpack-encoded curve constants to stdout.
 
 TEST (BoomerangMegaCircuitBuilder, BasicCircuit)
 
 TEST (BoomerangMegaCircuitBuilder, OnlyGoblinEccOpQueueUltraOps)
 Check that the ultra ops are recorded correctly in the EccOpQueue.
 
void read (uint8_t const *&it, Chonk::VerificationKey &vk)
 
void write (std::vector< uint8_t > &buf, Chonk::VerificationKey const &vk)
 
template<typename T >
unpack_from_file (const std::filesystem::path &filename)
 
std::pair< Chonk::Proof, Chonk::VerificationKeyaccumulate_and_prove_with_precomputed_vks (size_t num_app_circuits, auto &precomputed_vks, const bool large_first_app=true)
 Perform a specified number of circuit accumulation rounds.
 
std::vector< std::shared_ptr< typename MegaFlavor::VerificationKey > > precompute_vks (const size_t num_app_circuits, const bool large_first_app=true)
 
 TEST (MegaCircuitBuilder, CopyConstructor)
 
 TEST (MegaCircuitBuilder, BaseCase)
 
 TEST (MegaCircuitBuilder, GoblinSimple)
 Test the queueing of simple ecc ops via the Goblin builder.
 
 TEST (MegaCircuitBuilder, GoblinEccOpQueueUltraOps)
 Check that the ultra ops are recorded correctly in the EccOpQueue.
 
 TEST (MegaCircuitBuilder, CompleteSelectorPartitioningCheck)
 Check that the selector partitioning is correct for the mega circuit builder.
 
 TEST (UltraCircuitBuilder, CopyConstructor)
 
 TEST (UltraCircuitBuilder, BaseCase)
 
 TEST (UltraCircuitBuilder, TestNoLookupProof)
 
 TEST (UltraCircuitBuilder, CheckCircuitShowcase)
 
 TEST (UltraCircuitBuilder, Rom)
 
 TEST (UltraCircuitBuilder, RamSimple)
 A simple-as-possible RAM read test, for easier debugging.
 
 TEST (UltraCircuitBuilder, Ram)
 
 TEST (UltraCircuitBuilder, RangeConstraint)
 
 TEST (UltraCircuitBuilder, RangeWithGates)
 
 TEST (UltraCircuitBuilder, RangeWithGatesWhereRangeIsNotAPowerOfTwo)
 
 TEST (UltraCircuitBuilder, ComposedRangeConstraint)
 
 TEST (UltraCircuitBuilder, RangeChecksOnDuplicates)
 
 TEST (UltraCircuitBuilder, NonTrivialTagPermutation)
 
 TEST (UltraCircuitBuilder, NonTrivialTagPermutationAndCycles)
 
 TEST (UltraCircuitBuilder, BadTagPermutation)
 
 TEST (UltraCircuitBuilder, SortWidget)
 
 TEST (UltraCircuitBuilder, SortWithEdgesGate)
 
 TEST (UltraCircuitBuilder, SortWidgetComplex)
 
 TEST (UltraCircuitBuilder, SortWidgetNeg)
 
template<>
auto UltraCircuitChecker::init_empty_values< MegaCircuitBuilder_< bb::fr > > ()
 
template<>
MegaCircuitBuilder_< bb::frUltraCircuitChecker::prepare_circuit< MegaCircuitBuilder_< bb::fr > > (const MegaCircuitBuilder_< bb::fr > &builder_in)
 
template bool UltraCircuitChecker::check< MegaCircuitBuilder_< bb::fr > > (const MegaCircuitBuilder_< bb::fr > &builder_in)
 
template<typename Curve >
CommitmentKey< Curvecreate_commitment_key (const size_t num_points)
 
template<typename FF >
Polynomial< FFsparse_random_poly (const size_t size, const size_t num_nonzero)
 
template<typename FF >
PolyData< FFstructured_random_poly (bool non_zero_complement=false)
 
template<typename Curve >
void bench_commit_zero (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_sparse (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_sparse_preprocessed (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_sparse_random (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_sparse_random_preprocessed (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_random (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_random_non_power_of_2 (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_structured_random_poly (::benchmark::State &state)
 
template<typename Curve >
void bench_commit_mock_z_perm (::benchmark::State &state)
 
template<typename Curve >
void bench_pippenger_without_endomorphism_basis_points (::benchmark::State &state)
 Benchmark pippenger_without_endomorphism_basis_points function, which is used notably in the IPA verifier.
 
 DenseRange (MIN_LOG_NUM_GRUMPKIN_POINTS, MAX_LOG_NUM_GRUMPKIN_POINTS) -> Unit(benchmark::kMillisecond)
 
 DenseRange (MIN_LOG_NUM_POINTS, MAX_LOG_NUM_POINTS) -> Unit(benchmark::kMillisecond)
 
 BENCHMARK (bench_commit_structured_random_poly< curve::BN254 >) -> Unit(benchmark::kMillisecond)
 
 BENCHMARK (bench_commit_mock_z_perm< curve::BN254 >) -> Unit(benchmark::kMillisecond)
 
template<class CK >
CK create_commitment_key (const size_t num_points=0)
 
template<>
CommitmentKey< curve::BN254create_commitment_key< CommitmentKey< curve::BN254 > > (const size_t num_points)
 
template<>
CommitmentKey< curve::Grumpkincreate_commitment_key< CommitmentKey< curve::Grumpkin > > (const size_t num_points)
 
template<class VK >
VK create_verifier_commitment_key ()
 
template<>
VerifierCommitmentKey< curve::BN254create_verifier_commitment_key< VerifierCommitmentKey< curve::BN254 > > ()
 
template<>
VerifierCommitmentKey< curve::Grumpkincreate_verifier_commitment_key< VerifierCommitmentKey< curve::Grumpkin > > ()
 
 TEST_F (IPATest, ChallengesAreZero)
 
 TEST_F (IPATest, AIsZeroAfterOneRound)
 
 TEST_F (KZGTest, Single)
 
 TEST_F (KZGTest, ZeroEvaluation)
 
 TEST_F (KZGTest, ZeroPolynomial)
 
 TEST_F (KZGTest, ConstantPolynomial)
 
 TEST_F (KZGTest, EmptyPolynomial)
 
 TEST_F (KZGTest, SingleInLagrangeBasis)
 Test opening proof of a polynomial given by its evaluations at \( i = 0, \ldots, n \). Should only be used for small values of \( n \).
 
 TEST_F (KZGTest, ShpleminiKzgWithShift)
 
 TEST_F (KZGTest, ShpleminiKzgWithShiftAndInterleaving)
 
 TEST_F (KZGTest, ShpleminiKzgShiftsRemoval)
 
 TYPED_TEST_SUITE (ShpleminiTest, TestSettings)
 
 TYPED_TEST (ShpleminiTest, CorrectnessOfMultivariateClaimBatching)
 
 TYPED_TEST (ShpleminiTest, CorrectnessOfGeminiClaimBatching)
 
 TYPED_TEST (ShpleminiTest, ShpleminiZKNoSumcheckOpenings)
 Test Shplemini with ZK data consisting of a hiding polynomial generated by GeminiProver and Libra polynomials used to mask Sumcheck Round Univariates. This abstracts the PCS step in each ZK Flavor running over BN254.
 
 TYPED_TEST (ShpleminiTest, ShpleminiZKWithSumcheckOpenings)
 Test Shplemini with ZK data consisting of a hiding polynomial generated by GeminiProver, Libra polynomials used to mask Sumcheck Round Univariates and prove/verify the claimed evaluations of committed sumcheck round univariates. This test abstracts the PCS step in each ZK Flavor running over Grumpkin.
 
 TYPED_TEST (ShpleminiTest, HighDegreeAttackAccept)
 High degree attack test: prover commits to a higher degree polynomial than expected.
 
 TYPED_TEST (ShpleminiTest, HighDegreeAttackReject)
 High degree attack test: prover commits to a random higher degree polynomial.
 
 TYPED_TEST_SUITE (ShplonkTest, CurveTypes)
 
 TYPED_TEST (ShplonkTest, ShplonkSimple)
 
 TYPED_TEST (ShplonkTest, ShplonkLinearlyDependent)
 
 TYPED_TEST (ShplonkTest, ExportBatchClaimAndVerify)
 
template<typename Curve >
std::vector< typename Curve::ScalarFieldcompute_eccvm_challenge_coeffs (const typename Curve::ScalarField &evaluation_challenge_x, const typename Curve::ScalarField &batching_challenge_v)
 Denote \( M = \text{NUM_DISABLED_ROWS_IN_SUMCHECK} \) and \( N = NUM_SMALL_IPA_EVALUTIONS\). Given an evaluation challenge \( x \) and a batching challenge \(v\), compute the polynomial whose coefficients are given by the vector \( (1, x , x^2 , \ldots, x^{M - 1 }, v\cdot x, \ldots, v^{N-1} \cdot x^{M-2}, v^{N-1}, \cdot x^{M-1}, 0, \ldots, 0)\) in the Lagrange basis over the Small Subgroup.
 
 TYPED_TEST_SUITE (SmallSubgroupIPATest, TestFlavors)
 
 TYPED_TEST (SmallSubgroupIPATest, ProverComputationsCorrectness)
 
 TYPED_TEST (SmallSubgroupIPATest, VerifierEvaluations)
 
 TYPED_TEST (SmallSubgroupIPATest, LibraEvaluationsConsistency)
 
 TYPED_TEST (SmallSubgroupIPATest, LibraEvaluationsConsistencyFailure)
 
 TYPED_TEST (SmallSubgroupIPATest, TranslationMaskingTermConsistency)
 
 TYPED_TEST (SmallSubgroupIPATest, TranslationMaskingTermConsistencyFailure)
 
std::array< std::string, NUM_SMALL_IPA_EVALUATIONS > get_evaluation_labels (const std::string &label_prefix)
 Shared by Prover and Verifier. label_prefix is either Libra: or Translation:.
 
template<typename FF >
std::array< FF, NUM_SMALL_IPA_EVALUATIONS > compute_evaluation_points (const FF &small_ipa_evaluation_challenge, const FF &subgroup_generator)
 The verification of Grand Sum Identity requires the evaluations G(r), A(g * r), A(r), Q(r). Shared by Prover and Verifier.
 
AssertModeget_assert_mode ()
 
void assert_failure (std::string const &err)
 
template<size_t Start, size_t End, size_t Inc, class F >
constexpr void constexpr_for (F &&f)
 Implements a loop using a compile-time iterator. Requires c++20. Implementation (and description) from https://artificial-mind.net/blog/2020/10/31/constexpr-for.
 
template<typename C >
C slice (C const &container, size_t start)
 
template<typename C >
C slice (C const &container, size_t start, size_t end)
 
template<typename C >
C join (std::initializer_list< C > to_join)
 
std::string join (std::vector< std::string > const &to_join, std::string const &with=",")
 
template<template< typename, typename... > typename Cont, typename InnerCont , typename... Args>
InnerCont flatten (Cont< InnerCont, Args... > const &in)
 
template<typename T >
int64_t index_of (std::vector< T > const &vec, T const &item)
 
template<template< typename, typename... > typename Cont, typename Inner , typename... Args>
Inner sum (Cont< Inner, Args... > const &in)
 
template<template< typename, typename... > typename Cont, typename Left , typename Right , typename... Args>
std::pair< Left, Right > sum_pairs (Cont< std::pair< Left, Right >, Args... > const &in)
 
std::string msgpack_to_json (msgpack::object const &o, size_t max_chars)
 
template<typename... Types>
 NamedUnion (std::variant< Types... >) -> NamedUnion< Types... >
 
void parallel_for_atomic_pool (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for_mutex_pool (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for_queued (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for_spawning (size_t num_iterations, const std::function< void(size_t)> &func)
 
template<typename T , typename... Ts>
 RefArray (T &, Ts &...) -> RefArray< T, 1+sizeof...(Ts)>
 Deduction guide for the RefArray class. Allows for RefArray {a, b, c} without explicit template params.
 
template<typename T , std::size_t... Ns>
RefArray< T,(Ns+...)> constexpr concatenate (const RefArray< T, Ns > &... ref_arrays)
 Concatenates multiple RefArray objects into a single RefArray.
 
template<typename T , typename... Ts>
 RefVector (T &, Ts &...) -> RefVector< T >
 Deduction guide for the RefVector class. Allows for RefVector {a, b, c} without explicit template params.
 
template<typename T >
RefVector< T > concatenate (const RefVector< T > &ref_vector, const auto &... ref_vectors)
 Concatenates multiple RefVector objects into a single RefVector.
 
template<typename T , std::size_t... Ns>
std::array< T,(Ns+...)> concatenate (const std::array< T, Ns > &... arrays)
 Concatenates multiple std::array objects into a single array.
 
template<typename T >
std::vector< T > concatenate (const std::vector< T > &vector, const auto &... vectors)
 Concatenates multiple std::vector objects into a single std::vector.
 
void set_parallel_for_concurrency (size_t num_cores)
 
size_t get_num_cpus ()
 
void parallel_for_omp (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for_moody (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for (size_t num_iterations, const std::function< void(size_t)> &func)
 
void parallel_for_range (size_t num_points, const std::function< void(size_t, size_t)> &func, size_t no_multhreading_if_less_or_equal)
 Split a loop into several loops running in parallel.
 
void parallel_for_heuristic (size_t num_points, const std::function< void(size_t, size_t, size_t)> &func, size_t heuristic_cost)
 Split a loop into several loops running in parallel based on operations in 1 iteration.
 
MultithreadData calculate_thread_data (size_t num_iterations, size_t min_iterations_per_thread=DEFAULT_MIN_ITERS_PER_THREAD)
 Calculates number of threads and index bounds for each thread.
 
size_t calculate_num_threads (size_t num_iterations, size_t min_iterations_per_thread)
 calculates number of threads to create based on minimum iterations per thread
 
size_t calculate_num_threads_pow2 (size_t num_iterations, size_t min_iterations_per_thread)
 calculates number of threads to create based on minimum iterations per thread, guaranteed power of 2
 
size_t get_num_cpus_pow2 ()
 
template<typename Func >
requires std::invocable<Func, std::size_t>
void parallel_for_heuristic (size_t num_points, const Func &func, size_t heuristic_cost)
 
template<typename Func , typename Accum >
requires std::invocable<Func, std::size_t, Accum&>
std::vector< Accum > parallel_for_heuristic (size_t num_points, const Accum &initial_accum, const Func &func, size_t heuristic_cost)
 parallel_for_heuristic variant that takes an accumulator initializer that is allocated in a vector, one accumulator per thread/chunk. This allows for thread-safe accumulation, see sum() or sum_pairs() in container.hpp for an easy way to combine the thread/chunk contributions into a final result.
 
template<typename Func >
requires std::invocable<Func, ThreadChunk>
void parallel_for (const Func &func)
 
 TEST_F (ThreadTest, BasicParallelFor)
 
 TEST_F (ThreadTest, CalculateNumThreads)
 
 TEST_F (ThreadTest, CalculateNumThreadsPow2)
 
 TEST_F (ThreadTest, ZeroIterations)
 
 TEST_F (ThreadTest, OneIteration)
 
 TEST_F (ThreadTest, ParallelForRange)
 
 TEST_F (ThreadTest, ParallelForRangeThreshold)
 
 TEST_F (ThreadTest, HardwareConcurrency)
 
 TEST_F (ThreadTest, HardwareConcurrencyPow2)
 
 TEST_F (ThreadTest, SpawnedThreadsCanUseParallelFor)
 
 TYPED_TEST_SUITE (BatchedAffineAdditionTests, Curves)
 
 TYPED_TEST (BatchedAffineAdditionTests, Reduce)
 
std::string msgpack_schema_name (g1::affine_element const &)
 
template<typename B , typename base_field , typename Params >
void read (B &it, field2< base_field, Params > &value)
 
template<typename B , typename base_field , typename Params >
void write (B &buf, field2< base_field, Params > const &value)
 
template<typename B , typename Params >
void read (B &it, field< Params > &value)
 
template<typename B , typename Params >
void write (B &buf, field< Params > const &value)
 
template<typename Group , detail::DomainSeparator domain_separator, std::size_t num_generators, std::size_t starting_index = 0>
constexpr std::span< const typename Group::affine_element > get_precomputed_generators ()
 
template<typename Group , detail::DomainSeparator domain_separator, std::size_t num_generators, std::size_t starting_index = 0>
bool check_precomputed_generators ()
 
auto get_unshifted_then_shifted (const auto &all_entities)
 
template<typename Tuple >
constexpr size_t compute_max_partial_relation_length ()
 Utility function to find max PARTIAL_RELATION_LENGTH tuples of Relations.
 
template<typename Tuple >
constexpr size_t compute_number_of_subrelations ()
 Utility function to find the number of subrelations.
 
template<typename RelationsTuple >
constexpr auto create_sumcheck_tuple_of_tuples_of_univariates ()
 Utility function to construct a container for the subrelation accumulators of sumcheck proving.
 
template<typename RelationsTuple >
constexpr auto create_tuple_of_arrays_of_values ()
 
template<typename PrecomputedCommitments , typename Transcript , VKSerializationMode SerializeMetadata>
void read (uint8_t const *&it, NativeVerificationKey_< PrecomputedCommitments, Transcript, SerializeMetadata > &vk)
 
template<typename PrecomputedCommitments , typename Transcript , VKSerializationMode SerializeMetadata>
void write (std::vector< uint8_t > &buf, NativeVerificationKey_< PrecomputedCommitments, Transcript, SerializeMetadata > const &vk)
 
template<typename Container , typename Element >
std::string flavor_get_label (Container &&container, const Element &element)
 
 TYPED_TEST_SUITE (MergeTests, CurveTypes)
 
 TYPED_TEST (MergeTests, MergeProofSizeCheck)
 
 TYPED_TEST (MergeTests, SingleMerge)
 
 TYPED_TEST (MergeTests, MultipleMergesPrepend)
 
 TYPED_TEST (MergeTests, MergePrependThenAppend)
 
 TYPED_TEST (MergeTests, DegreeCheckFailurePrepend)
 
 TYPED_TEST (MergeTests, DegreeCheckFailureAppend)
 
 TYPED_TEST (MergeTests, MergeFailurePrepend)
 
 TYPED_TEST (MergeTests, MergeFailureAppend)
 
 TYPED_TEST (MergeTests, EvalFailurePrepend)
 
 TYPED_TEST (MergeTests, EvalFailureAppend)
 
 TYPED_TEST (MergeTests, DifferentTranscriptOriginTagFailure)
 Test that mixing values from different transcript instances causes instant failure.
 
 TEST_F (MergeTranscriptTests, ProverManifestConsistency)
 Ensure consistency between the hardcoded manifest and the one generated by the merge prover.
 
 TEST_F (MergeTranscriptTests, VerifierManifestConsistency)
 Ensure consistency between prover and verifier manifests.
 
template<typename Builder >
void generate_sha256_test_circuit (Builder &builder, size_t num_iterations)
 Generate a test circuit using SHA256 compression (sha256_block)
 
template<typename Flavor >
void construct_lookup_table_polynomials (const RefArray< typename Flavor::Polynomial, 4 > &table_polynomials, const typename Flavor::CircuitBuilder &circuit)
 Construct polynomials containing the concatenation of all lookup tables used in the circuit.
 
template<typename Flavor >
void construct_lookup_read_counts (typename Flavor::Polynomial &read_counts, typename Flavor::Polynomial &read_tags, typename Flavor::CircuitBuilder &circuit)
 Construct polynomial whose value at index i is the number of times the table entry at that index has been read.
 
template<typename Flavor >
void compute_permutation_argument_polynomials (const typename Flavor::CircuitBuilder &circuit, typename Flavor::ProverPolynomials &polynomials, const std::vector< CyclicPermutation > &copy_cycles)
 Compute Honk-style permutation sigma/id polynomials and add to prover_instance, where the copy_cycles are pre-computed sets of wire addresses whose values should be copy-constrained.
 
template<typename B , typename FF >
void read (B &buf, arithmetic_triple_< FF > &constraint)
 
template<typename B , typename FF >
void write (B &buf, arithmetic_triple_< FF > const &constraint)
 
template<typename Flavor >
Flavor::FF compute_public_input_delta (std::span< const typename Flavor::FF > public_inputs, const typename Flavor::FF &beta, const typename Flavor::FF &gamma, const typename Flavor::FF &offset=0)
 Compute the correction term for the permutation argument.
 
template<typename Flavor , typename GrandProdRelation >
void compute_grand_product (typename Flavor::ProverPolynomials &full_polynomials, bb::RelationParameters< typename Flavor::FF > &relation_parameters, size_t size_override=0)
 Compute a grand product polynomial, grand_product_polynomial, which for historical reasons is sometimes also called Z_perm(X). This polynomial will bear witness to some subset of: {copy constraints, multiset-equality, public inputs}.
 
template<typename Flavor >
void compute_grand_products (typename Flavor::ProverPolynomials &full_polynomials, bb::RelationParameters< typename Flavor::FF > &relation_parameters, const size_t size_override=0)
 Compute the grand product corresponding to each grand-product relation defined in the Flavor.
 
template<typename FF , typename Relation , typename Polynomials , bool UseMultithreading = false>
void compute_logderivative_inverse (Polynomials &polynomials, auto &relation_parameters, const size_t circuit_size)
 Compute the inverse polynomial I(X) required for logderivative lookups

  • details Inverse may be defined in terms of its values on X_i = 0,1,...,n-1 as Z_perm[0] = 1 and for i = 1:n-1 1 1 Inverse[i] = ∏ -----------------------— * ∏' -----------------------— relation::read_term(j) relation::write_term(j)

 
template<typename FF , typename Relation , typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
void accumulate_logderivative_lookup_subrelation_contributions (ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
 Compute generic log-derivative lookup subrelation accumulation.
 
template<typename FF , typename Relation , typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
void accumulate_logderivative_permutation_subrelation_contributions (ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
 Compute generic log-derivative set permutation subrelation accumulation.
 
template<typename Flavor >
Flavor::ProverPolynomials get_sequential_prover_polynomials (const size_t log_circuit_size, const size_t starting_value)
 Get a ProverPolynomials instance initialized to sequential values starting at 0.
 
template<typename Flavor >
Flavor::ProverPolynomials get_zero_prover_polynomials (const size_t log_circuit_size)
 
template<typename Fr >
SharedShiftedVirtualZeroesArray< Fr_clone (const SharedShiftedVirtualZeroesArray< Fr > &array, size_t right_expansion=0, size_t left_expansion=0)
 
template<typename Fr >
std::shared_ptr< Fr[]> _allocate_aligned_memory (size_t n_elements)
 
template<typename Fr_ >
Fr_ _evaluate_mle (std::span< const Fr_ > evaluation_points, const SharedShiftedVirtualZeroesArray< Fr_ > &coefficients, bool shift)
 Internal implementation to support both native and stdlib circuit field types.
 
template<typename Fr_ >
Fr_ generic_evaluate_mle (std::span< const Fr_ > evaluation_points, const SharedShiftedVirtualZeroesArray< Fr_ > &coefficients)
 Static exposed implementation to support both native and stdlib circuit field types.
 
template<typename Fr >
std::ostream & operator<< (std::ostream &os, const Polynomial< Fr > &p)
 
template<typename Poly , typename... Polys>
auto zip_polys (Poly &&poly, Polys &&... polys)
 
template<typename B , class Fr , size_t domain_end>
void read (B &it, Univariate< Fr, domain_end > &univariate)
 
template<typename B , class Fr , size_t domain_end>
void write (B &it, Univariate< Fr, domain_end > const &univariate)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator+ (const Fr &ff, const Univariate< Fr, domain_end > &uv)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator- (const Fr &ff, const Univariate< Fr, domain_end > &uv)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator* (const Fr &ff, const Univariate< Fr, domain_end > &uv)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator+ (const Fr &ff, const UnivariateView< Fr, domain_end > &uv)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator- (const Fr &ff, const UnivariateView< Fr, domain_end > &uv)
 
template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > operator* (const Fr &ff, const UnivariateView< Fr, domain_end > &uv)
 
template<typename T , typename U , std::size_t N, std::size_t... Is>
std::array< T, sizeof...(Is)> array_to_array_aux (const std::array< U, N > &elements, std::index_sequence< Is... >)
 Create a sub-array of elements at the indices given in the template pack Is, converting them to the new type T.
 
template<typename T , typename U , std::size_t N>
std::array< T, N > array_to_array (const std::array< U, N > &elements)
 Given an std::array<U,N>, returns an std::array<T,N>, by calling the (explicit) constructor T(U).
 
template<typename B , class Fr , size_t domain_end, bool has_a0_plus_a1>
void read (B &it, UnivariateCoefficientBasis< Fr, domain_end, has_a0_plus_a1 > &univariate)
 
template<typename B , class Fr , size_t domain_end, bool has_a0_plus_a1>
void write (B &it, UnivariateCoefficientBasis< Fr, domain_end, has_a0_plus_a1 > const &univariate)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMBoolsRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMLookupRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMMSMRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMPointTableRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMSetRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_PERMUTATION_CLASS (ECCVMSetRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMTranscriptRelationImpl, ECCVMFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (ECCVMWnafRelationImpl, ECCVMFlavor)
 
template<typename Relation , size_t subrelation_index>
constexpr bool subrelation_is_linearly_independent ()
 Check whether a given subrelation is linearly independent from the other subrelations.
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorDeltaRangeConstraintRelationImpl, TranslatorFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorOpcodeConstraintRelationImpl, TranslatorFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorAccumulatorTransferRelationImpl, TranslatorFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorZeroConstraintsRelationImpl, TranslatorFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorNonNativeFieldRelationImpl, TranslatorFlavor)
 
 DEFINE_SUMCHECK_RELATION_CLASS (TranslatorPermutationRelationImpl, TranslatorFlavor)
 
std::vector< g1::affine_elementget_bn254_g1_data (const std::filesystem::path &path, size_t num_points, bool allow_download)
 
g2::affine_element get_bn254_g2_data (const std::filesystem::path &path, bool allow_download=true)
 
std::vector< curve::Grumpkin::AffineElementget_grumpkin_g1_data (const std::filesystem::path &path, size_t num_points, bool allow_download)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMBoolsRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMLookupRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMMSMRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMPointTableRelationImpl, ECCVMRecursiveFlavor)
 
 TEST_F (EccRelationsConsistency, RecursiveToNativeConsistency)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMSetRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_PERMUTATION_CLASS (ECCVMSetRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMTranscriptRelationImpl, ECCVMRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (ECCVMWnafRelationImpl, ECCVMRecursiveFlavor)
 
 TEST_F (ECCVMRecursiveTests, SingleRecursiveVerification)
 
 TEST_F (ECCVMRecursiveTests, SingleRecursiveVerificationFailure)
 
 TEST_F (ECCVMRecursiveTests, SingleRecursiveVerificationFailureTamperedProof)
 
 TEST_F (ECCVMRecursiveTests, IndependentVKHash)
 
 TYPED_TEST_SUITE (RecursiveVeriferCommitmentKeyTest, Curves)
 
 TYPED_TEST (RecursiveVeriferCommitmentKeyTest, EqualityTest)
 
template<typename InnerProver , typename InnerFlavor , typename ProofType >
void tamper_with_proof (InnerProver &inner_prover, ProofType &inner_proof, TamperType type)
 Test method that provides several ways to tamper with a proof. TODO(https://github.com/AztecProtocol/barretenberg/issues/1298): Currently, several tests are failing due to challenges not being re-computed after tampering. We need to extend this tool to allow for more elaborate tampering.
 
template<typename InnerProver , typename InnerFlavor , typename ProofType >
void tamper_with_proof (ProofType &inner_proof, bool end_of_proof)
 Tamper with a proof by modifying the first pairing point to be P+G (where G is the generator). This keeps the point on the curve but makes the proof invalid.
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorDecompositionRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorDeltaRangeConstraintRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorOpcodeConstraintRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorAccumulatorTransferRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorZeroConstraintsRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorNonNativeFieldRelationImpl, TranslatorRecursiveFlavor)
 
 DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS (TranslatorPermutationRelationImpl, TranslatorRecursiveFlavor)
 
 TEST_F (TranslatorRecursiveTests, SingleRecursiveVerification)
 
 TEST_F (TranslatorRecursiveTests, IndependentVKHash)
 
template<typename FF , size_t N>
std::array< FF, N > initialize_relation_separator (const FF &alpha)
 
void check_round_provenance (const uint256_t &provenance_a, const uint256_t &provenance_b)
 Detect if two elements from the same transcript are performing a suspicious interaction.
 
std::ostream & operator<< (std::ostream &os, OriginTag const &v)
 
template<bool in_circuit, typename T >
void assign_origin_tag (T &elem, const OriginTag &tag)
 Assigns an origin tag to an element or all elements in an iterable container.
 
template<bool in_circuit, typename T >
void check_origin_tag (T &elem, const OriginTag &tag)
 Checks that an element or all elements in an iterable container have the expected origin tag.
 
template<bool in_circuit, typename DataType >
void unset_free_witness_tags (std::vector< DataType > &input)
 Unsets free witness tags on all elements in a vector.
 
template<bool in_circuit, typename Codec , typename T >
std::vector< typename Codec::DataType > tag_and_serialize (const T &component, const OriginTag &tag)
 Tag a component with a given origin tag and serialize it to field elements.
 
template<typename TranscriptType >
OriginTag extract_transcript_tag (const TranscriptType &transcript)
 Extract origin tag context from a transcript.
 

Variables

const bool avm_enabled = true
 
constexpr size_t MIN_LOG_NUM_POINTS = 16
 
constexpr size_t MAX_LOG_NUM_POINTS = 20
 
constexpr size_t MAX_NUM_POINTS = 1 << MAX_LOG_NUM_POINTS
 
constexpr size_t SPARSE_NUM_NONZERO = 100
 
constexpr size_t MIN_LOG_NUM_GRUMPKIN_POINTS = 12
 
constexpr size_t MAX_LOG_NUM_GRUMPKIN_POINTS = 16
 
constexpr size_t MAX_NUM_GRUMPKIN_POINTS = 1 << MAX_LOG_NUM_GRUMPKIN_POINTS
 
constexpr size_t COMMITMENT_TEST_NUM_BN254_POINTS = 4096
 
constexpr size_t COMMITMENT_TEST_NUM_GRUMPKIN_POINTS = 1 << CONST_ECCVM_LOG_N
 
constexpr size_t COMMITMENT_TEST_NUM_POINTS = 32
 
CommitmentKey< Curveck
 
VerifierCommitmentKey< Curvevk
 
constexpr size_t PARALLEL_FOR_MAX_NESTING = 2
 
const size_t DEFAULT_MIN_ITERS_PER_THREAD = 1 << 4
 
const char *const BB_VERSION_PLACEHOLDER = "BARRETENBERG_VERSION_SENTINEL00000000.00000000.00000000"
 
constexpr size_t BB_VERSION_SENTINEL_LEN = 29
 
const char * BB_VERSION = BB_VERSION_PLACEHOLDER + BB_VERSION_SENTINEL_LEN
 
constexpr uint32_t PERMUTATION_ARGUMENT_VALUE_SEPARATOR = 1 << 28
 
const size_t INTERNAL_STATE_SIZE = 32
 Constant defining the number of elements in the VM's internal state.
 
const size_t SETTINGS_SIZE = sizeof(VMSettings)
 
const size_t INSTRUCTION_HEADER_SIZE = 1
 Size of instruction header in bytes.
 
const size_t INDEX_SIZE = 1
 Size of index field in bytes.
 
const size_t SET_VALUE_SIZE
 Size of SET_VALUE instruction.
 
const size_t ADD_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3
 Size of ADD instruction.
 
const size_t ADD_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of ADD_ASSIGN instruction.
 
const size_t INCREMENT_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE
 Size of INCREMENT instruction.
 
const size_t MUL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3
 Size of MUL instruction.
 
const size_t MUL_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of MUL_ASSIGN instruction.
 
const size_t SUB_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3
 Size of SUB instruction.
 
const size_t SUB_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of SUB_ASSIGN instruction.
 
const size_t DIV_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3
 Size of DIV instruction.
 
const size_t DIV_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of DIV_ASSIGN instruction.
 
const size_t INV_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of INV instruction.
 
const size_t NEG_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of NEG instruction.
 
const size_t SQR_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of SQR instruction.
 
const size_t SQR_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE
 Size of SQR_ASSIGN instruction.
 
const size_t POW_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3 + sizeof(uint64_t)
 Size of POW instruction.
 
const size_t SQRT_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of SQRT instruction.
 
const size_t IS_ZERO_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE
 Size of IS_ZERO instruction.
 
const size_t EQUAL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of EQUAL instruction.
 
const size_t NOT_EQUAL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of NOT_EQUAL instruction.
 
const size_t TO_MONTGOMERY_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of TO_MONTGOMERY instruction.
 
const size_t FROM_MONTGOMERY_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of FROM_MONTGOMERY instruction.
 
const size_t REDUCE_ONCE_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2
 Size of REDUCE_ONCE instruction.
 
const size_t SELF_REDUCE_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE
 Size of SELF_REDUCE instruction.
 
const size_t BATCH_INVERT_SIZE
 Size of BATCH_INVERT instruction.
 
template<typename T >
constexpr bool is_field_type_v = is_field_type<T>::value
 
constexpr uint32_t NUM_DATABUS_COMMITMENTS = 2
 
constexpr uint32_t PROPAGATED_DATABUS_COMMITMENT_SIZE = 8
 
constexpr uint32_t PROPAGATED_DATABUS_COMMITMENTS_SIZE = PROPAGATED_DATABUS_COMMITMENT_SIZE * NUM_DATABUS_COMMITMENTS
 
std::atomic< size_t > unique_transcript_index { 0 }
 

Detailed Description

Entry point for Barretenberg command-line interface.

This file contains the implementation of field-agnostic UltraCircuitBuilder class that defines the logic of ultra-style circuits and is intended for the use in UltraHonk.

Defines particular circuit builder types expected to be used for circuit construction in stdlib and contains macros for explicit instantiation.

Note, this file contains the definitions. of field2 class. Declarations are in field2_declarations.hpp. Include ordering ensures linter/language server has knowledge of declarations when parsing definitions.

Provides interfaces for different PCS 'VerificationKey' classes.

Reduces multiple claims about commitments, each opened at a single point into a single claim for a single polynomial opened at a single point.

Protocol for opening several multi-linear polynomials at the same point.

Provides interfaces for different 'CommitmentKey' classes.

This function encapsulates the CLI parsing and command execution logic that would typically be in main.cpp, but as a standalone function. This design allows the CLI functionality to be tested by other modules without having to execute the program through its actual main() function.

The function sets up all available commands and options, parses the provided arguments, and executes the appropriate command based on the user's input. It handles all supported operations including circuit checking, proving, verification, and various utility functions.

Parameters
argcThe argument count
argvThe argument values array
Returns
int Status code: 0 for success, non-zero for errors or verification failure

TODO(#218)(Mara): This class should handle any modification to the SRS (e.g compute pippenger point table) to simplify the codebase.

m = number of variables n = 2ᵐ u = (u₀,...,uₘ₋₁) f₀, …, fₖ₋₁ = multilinear polynomials, g₀, …, gₕ₋₁ = shifted multilinear polynomial, Each gⱼ is the left-shift of some f↺ᵢ, and gⱼ points to the same memory location as fᵢ. v₀, …, vₖ₋₁, v↺₀, …, v↺ₕ₋₁ = multilinear evalutions s.t. fⱼ(u) = vⱼ, and gⱼ(u) = f↺ⱼ(u) = v↺ⱼ

We use a challenge ρ to create a random linear combination of all fⱼ, and actually define A₀ = F + G↺, where F = ∑ⱼ ρʲ fⱼ G = ∑ⱼ ρᵏ⁺ʲ gⱼ, G↺ = is the shift of G where fⱼ is normal, and gⱼ is shifted. The evaluations are also batched, and v = ∑ ρʲ⋅vⱼ + ∑ ρᵏ⁺ʲ⋅v↺ⱼ = F(u) + G↺(u)

The prover then creates the folded polynomials A₀, ..., Aₘ₋₁, and opens them at different points, as univariates.

We open A₀ as univariate at r and -r. Since A₀ = F + G↺, but the verifier only has commitments to the gⱼs, we need to partially evaluate A₀ at both evaluation points. As univariate, we have A₀(X) = F(X) + G↺(X) = F(X) + G(X)/X So we define

  • A₀₊(X) = F(X) + G(X)/r
  • A₀₋(X) = F(X) − G(X)/r So that A₀₊(r) = A₀(r) and A₀₋(-r) = A₀(-r). The verifier is able to compute the simulated commitments to A₀₊(X) and A₀₋(X) since they are linear-combinations of the commitments [fⱼ] and [gⱼ].

m = number of variables n = 2ᵐ u = (u₀,...,uₘ₋₁) f₀, …, fₖ₋₁ = multilinear polynomials, g₀, …, gₕ₋₁ = shifted multilinear polynomial, Each gⱼ is the left-shift of some f↺ᵢ, and gⱼ points to the same memory location as fᵢ. v₀, …, vₖ₋₁, v↺₀, …, v↺ₕ₋₁ = multilinear evalutions s.t. fⱼ(u) = vⱼ, and gⱼ(u) = f↺ⱼ(u) = v↺ⱼ

We use a challenge ρ to create a random linear combination of all fⱼ, and actually define A₀ = F + G↺, where F = ∑ⱼ ρʲ fⱼ G = ∑ⱼ ρᵏ⁺ʲ gⱼ, G↺ = is the shift of G where fⱼ is normal, and gⱼ is shifted. The evaluations are also batched, and v = ∑ ρʲ⋅vⱼ + ∑ ρᵏ⁺ʲ⋅v↺ⱼ = F(u) + G↺(u)

The prover then creates the folded polynomials A₀, ..., Aₘ₋₁, and opens them at different points, as univariates.

We open A₀ as univariate at r and -r. Since A₀ = F + G↺, but the verifier only has commitments to the gⱼs, we need to partially evaluate A₀ at both evaluation points. As univariate, we have A₀(X) = F(X) + G↺(X) = F(X) + G(X)/X So we define

  • A₀₊(X) = F(X) + G(X)/r
  • A₀₋(X) = F(X) − G(X)/r So that A₀₊(r) = A₀(r) and A₀₋(-r) = A₀(-r). The verifier is able to computed the simulated commitments to A₀₊(X) and A₀₋(X) since they are linear-combinations of the commitments [fⱼ] and [gⱼ].

We use the following terminology:

  • Bₖ(X) is a random linear combination of all polynomials opened at Ωₖ we refer to it a 'merged_polynomial'.
  • Tₖ(X) is the polynomial that interpolates Bₖ(X) over Ωₖ,
  • zₖ(X) is the product of all (X-x), for x ∈ Ωₖ
  • ẑₖ(X) = 1/zₖ(X)

The challenges are ρ (batching) and r (random evaluation).

There's a lot to talk about here. To bring threading to WASM, parallel_for was written to replace the OpenMP loops we had scattered throughout our code. It provides a clean abstraction for the work division strategy we use (we used OMP's"#pragma omp parallel for</tt> everywhere). The first implementation was <tt>parallel_for_spawning</tt>. You can read a description of each implementation in the relevant source file, but parallel_for_spawning is the simplest approach imaginable. Once WASM was working, I checked its performance in native code by running it against the polynomials benchmarks. In doing so, OMP outperformed it significantly (at least for FFT algorithms). This set me on a course to try and understand why and to provide a suitable alternative. Ultimately I found solutions that compared to OMP with "moody" and "atomic_pool" solutions, although they were not <em>quite</em> as fast as OMP. However interestingly, when it comes to actual "real world" testing (with proof construction), rather than raw benchmarking, most of the solutions performed about the same, with OMP <em>actually slightly worse</em>. So maybe all this effort was a bit redundant. Remember to always do real world testing... My theory as to why OMP performs so much better in benchmarks is because it runs the tests in a very tight loop, and OMP seems well designed to handle this. It actually looks like OMP consumes more cpu time in htop, and this maybe due to aggressive spin-locking and may explain why it performs well in these scenarios. My theory as to why spawning seems to counter-intuitively perform so well, is that spawning a new thread may actually be cheaper than waking a sleeping thread. Or joining is somehow very efficient. Or it's because there's very low other overhead. Or libc++ STL does some magic. Ok, that's not much of a theory... Ultimately though the takeaway is as follows: - OMP maybe preferable when running benchmarks if you want to check for that kind of "optimal linear scaling". Although, if we want to get rid of OMP altogether, "atomic_pool" is a simple solution that seems to compare. - The simplest "spawning" is probably best used everywhere else, and frees us from needing OMP to build the lib. UPDATE!: So although spawning is simple and fast, due to unstable pthreads in wasi-sdk that causes hangs when joining threads, we use "atomic_pool" by default. We may just wish to revert to spawning once it stablises. UPDATE!: Interestingly "atomic_pool" performs worse than "mutex_pool" for some e.g. proving key construction. Haven't done deeper analysis. Defaulting to mutex_pool.

This file is designed to be included in header files to instruct the compiler that these classes exist and their instantiation will eventually take place. Given it has no dependencies, it causes no additional compilation or propagation.

Typedef Documentation

◆ AggregationState

◆ arithmetic_triple

Definition at line 69 of file gate_data.hpp.

◆ ArithmeticRelation

template<typename FF >
using bb::ArithmeticRelation = typedef Relation<ArithmeticRelationImpl<FF> >

Definition at line 114 of file ultra_arithmetic_relation.hpp.

◆ ArrayOfValues

template<typename FF , auto LENGTHS>
using bb::ArrayOfValues = typedef HomogeneousTupleToArray<TupleOfValues<FF, LENGTHS> >

Definition at line 42 of file nested_containers.hpp.

◆ BarycentricData

template<class Fr , size_t domain_end, size_t num_evals>
using bb::BarycentricData = typedef std::conditional_t<is_field_type_v<Fr>, BarycentricDataCompileTime<Fr, domain_end, num_evals>, BarycentricDataRunTime<Fr, domain_end, num_evals> >

Exposes BarycentricData with compile time arrays if the type is bberg::field and runtime arrays otherwise.

This method is also needed for stdlib field, for which the arrays are not compile time computable

Template Parameters
Fr
domain_end
num_evals

Definition at line 268 of file barycentric.hpp.

◆ CommitmentSchemeParams

using bb::CommitmentSchemeParams = typedef ::testing::Types<curve::BN254>

Definition at line 303 of file commitment_key.test.hpp.

◆ Curve

Definition at line 19 of file ipa.fuzzer.cpp.

◆ Curves

◆ CurveTypes

Definition at line 17 of file shplonk.test.cpp.

◆ CyclicPermutation

using bb::CyclicPermutation = typedef std::vector<cycle_node>

Definition at line 111 of file permutation_lib.hpp.

◆ DataBus

using bb::DataBus = typedef std::array<BusVector, 3>

The DataBus; facilitates storage of public circuit input/output.

The DataBus is designed to facilitate efficient transfer of large amounts of public data between circuits. It is expected that only a small subset of the data being passed needs to be used in any single circuit, thus we provide a read mechanism (implemented through a Builder) that results in prover work proportional to only the data that is used. (The prover must still commit to all data in each bus vector but we do not need to hash all data in-circuit as we would with public inputs).

Definition at line 76 of file databus.hpp.

◆ DatabusLookupRelation

template<typename FF >
using bb::DatabusLookupRelation = typedef Relation<DatabusLookupRelationImpl<FF> >

Definition at line 381 of file databus_lookup_relation.hpp.

◆ DeltaRangeConstraintRelation

◆ DependentTestRelation

template<typename FF >
using bb::DependentTestRelation = typedef Relation<DependentTestRelationImpl<FF> >

Definition at line 100 of file sumcheck_test_flavor.hpp.

◆ EccOpQueueRelation

template<typename FF >
using bb::EccOpQueueRelation = typedef Relation<EccOpQueueRelationImpl<FF> >

Definition at line 118 of file ecc_op_queue_relation.hpp.

◆ ECCVMBoolsRelation

template<typename FF >
using bb::ECCVMBoolsRelation = typedef Relation<ECCVMBoolsRelationImpl<FF> >

Definition at line 37 of file ecc_bools_relation.hpp.

◆ ECCVMLookupRelation

template<typename FF >
using bb::ECCVMLookupRelation = typedef Relation<ECCVMLookupRelationImpl<FF> >

Definition at line 249 of file ecc_lookup_relation.hpp.

◆ ECCVMMSMRelation

template<typename FF >
using bb::ECCVMMSMRelation = typedef Relation<ECCVMMSMRelationImpl<FF> >

Definition at line 57 of file ecc_msm_relation.hpp.

◆ EccvmOpsTable

A VM operation is represented as one row with 6 columns in the ECCVM version of the Op Queue. | OP | X | Y | z_1 | z_2 | mul_scalar_full |.

Definition at line 206 of file ecc_ops_table.hpp.

◆ ECCVMPointTableRelation

template<typename FF >
using bb::ECCVMPointTableRelation = typedef Relation<ECCVMPointTableRelationImpl<FF> >

Definition at line 37 of file ecc_point_table_relation.hpp.

◆ ECCVMRecursiveVerifier

◆ ECCVMSetRelation

template<typename FF >
using bb::ECCVMSetRelation = typedef Relation<ECCVMSetRelationImpl<FF> >

Definition at line 75 of file ecc_set_relation.hpp.

◆ ECCVMTranscriptRelation

template<typename FF >
using bb::ECCVMTranscriptRelation = typedef Relation<ECCVMTranscriptRelationImpl<FF> >

Definition at line 62 of file ecc_transcript_relation.hpp.

◆ ECCVMVerifier

Definition at line 104 of file eccvm_verifier.hpp.

◆ ECCVMWnafRelation

template<typename FF >
using bb::ECCVMWnafRelation = typedef Relation<ECCVMWnafRelationImpl<FF> >

Definition at line 58 of file ecc_wnaf_relation.hpp.

◆ EllipticRelation

template<typename FF >
using bb::EllipticRelation = typedef Relation<EllipticRelationImpl<FF> >

Definition at line 151 of file elliptic_relation.hpp.

◆ evaluation_domain

Definition at line 76 of file evaluation_domain.hpp.

◆ ExtractValueType

template<typename ValueType , size_t >
using bb::ExtractValueType = typedef ValueType

Definition at line 30 of file nested_containers.hpp.

◆ fq

using bb::fq = typedef field<Bn254FqParams>

Definition at line 169 of file fq.hpp.

◆ fq12

using bb::fq12 = typedef field12<fq2, fq6, Bn254Fq12Params>

Definition at line 49 of file fq12.hpp.

◆ fq2

using bb::fq2 = typedef field2<fq, Bn254Fq2Params>

Definition at line 67 of file fq2.hpp.

◆ fq6

using bb::fq6 = typedef field6<fq2, Bn254Fq6Params>

Definition at line 98 of file fq6.hpp.

◆ fr

using bb::fr = typedef field<Bn254FrParams>

Definition at line 174 of file fr.hpp.

◆ g1

using bb::g1 = typedef group<fq, fr, Bn254G1Params>

Definition at line 33 of file g1.hpp.

◆ g2

using bb::g2 = typedef group<fq2, fr, Bn254G2Params>

Definition at line 39 of file g2.hpp.

◆ GenericLookup

template<typename Settings , typename FF >
using bb::GenericLookup = typedef GenericLookupRelationImpl<Settings, FF>

Definition at line 477 of file generic_lookup_relation.hpp.

◆ GenericLookupRelation

template<typename Settings , typename FF >
using bb::GenericLookupRelation = typedef Relation<GenericLookupRelationImpl<Settings, FF> >

Definition at line 475 of file generic_lookup_relation.hpp.

◆ GenericPermutation

template<typename Settings , typename FF >
using bb::GenericPermutation = typedef GenericPermutationRelationImpl<Settings, FF>

Definition at line 226 of file generic_permutation_relation.hpp.

◆ GenericPermutationRelation

template<typename Settings , typename FF >
using bb::GenericPermutationRelation = typedef Relation<GenericPermutationRelationImpl<Settings, FF> >

Definition at line 224 of file generic_permutation_relation.hpp.

◆ HomogeneousTupleToArray

template<typename Tuple >
using bb::HomogeneousTupleToArray = typedef std::array<std::tuple_element_t<0, Tuple>, std::tuple_size_v<Tuple> >

Definition at line 33 of file nested_containers.hpp.

◆ HonkProof

using bb::HonkProof = typedef std::vector<fr>

Definition at line 15 of file proof.hpp.

◆ IpaCommitmentSchemeParams

using bb::IpaCommitmentSchemeParams = typedef ::testing::Types<curve::Grumpkin>

Definition at line 304 of file commitment_key.test.hpp.

◆ KeccakTranscript

Definition at line 489 of file transcript.hpp.

◆ LogDerivLookupRelation

template<typename FF >
using bb::LogDerivLookupRelation = typedef Relation<LogDerivLookupRelationImpl<FF> >

Definition at line 305 of file logderiv_lookup_relation.hpp.

◆ MegaCircuitBuilder

◆ MegaOinkProver

Definition at line 78 of file oink_prover.hpp.

◆ MegaProver

Definition at line 84 of file ultra_prover.hpp.

◆ MegaStdlibTranscript

◆ MegaVerifier

Definition at line 62 of file ultra_verifier.hpp.

◆ MegaZKProver

Definition at line 85 of file ultra_prover.hpp.

◆ MegaZKVerifier

Definition at line 63 of file ultra_verifier.hpp.

◆ MemoryRelation

template<typename FF >
using bb::MemoryRelation = typedef Relation<MemoryRelationImpl<FF> >

Definition at line 278 of file memory_relation.hpp.

◆ MergeVerifier

Definition at line 118 of file merge_verifier.hpp.

◆ MultilinearBatchingAccumulatorRelation

◆ MultilinearBatchingInstanceRelation

◆ NativeTranscript

◆ NonNativeFieldRelation

template<typename FF >
using bb::NonNativeFieldRelation = typedef Relation<NonNativeFieldRelationImpl<FF> >

Definition at line 151 of file non_native_field_relation.hpp.

◆ Poseidon2ExternalRelation

Definition at line 163 of file poseidon2_external_relation.hpp.

◆ Poseidon2InternalRelation

Definition at line 165 of file poseidon2_internal_relation.hpp.

◆ PublicInputsVector

using bb::PublicInputsVector = typedef std::vector<fr>

Definition at line 14 of file proof.hpp.

◆ StdlibPublicInputsVector

template<typename Builder >
using bb::StdlibPublicInputsVector = typedef std::vector<bb::stdlib::field_t<Builder> >

Definition at line 24 of file proof.hpp.

◆ StdlibTranscript

Definition at line 492 of file transcript.hpp.

◆ SumcheckTestFlavor

Base test flavor (BN254, non-ZK, short monomials)

Most common configuration for basic sumcheck testing

Definition at line 337 of file sumcheck_test_flavor.hpp.

◆ SumcheckTestFlavorFullBary

Full barycentric extension variant.

Tests full extension to MAX_PARTIAL_RELATION_LENGTH (USE_SHORT_MONOMIALS = false)

Definition at line 349 of file sumcheck_test_flavor.hpp.

◆ SumcheckTestFlavorGrumpkinZK

Grumpkin ZK variant.

Tests ZK sumcheck over the Grumpkin curve (used in ECCVM/IVC)

Note
Grumpkin sumcheck requires ZK mode for commitment-based protocol

Definition at line 356 of file sumcheck_test_flavor.hpp.

◆ SumcheckTestFlavorZK

Zero-knowledge variant.

Tests sumcheck with masking (HasZK = true)

Definition at line 343 of file sumcheck_test_flavor.hpp.

◆ SumcheckTestFlavorZKFullBary

ZK + Full barycentric combination.

Tests both ZK and full barycentric extension together

Definition at line 362 of file sumcheck_test_flavor.hpp.

◆ TestFlavors

using bb::TestFlavors = typedef ::testing::Types<BN254Settings, GrumpkinSettings>

Definition at line 47 of file small_subgroup_ipa.test.cpp.

◆ TestSettings

using bb::TestSettings = typedef ::testing::Types<BN254Settings, GrumpkinSettings>

Definition at line 40 of file shplemini.test.cpp.

◆ TranscriptFor_t

template<typename Curve >
using bb::TranscriptFor_t = typedef typename TranscriptFor<Curve>::type

Definition at line 510 of file transcript.hpp.

◆ TranslatorAccumulatorTransferRelation

◆ TranslatorDecompositionRelation

◆ TranslatorDeltaRangeConstraintRelation

◆ TranslatorNonNativeFieldRelation

◆ TranslatorOpcodeConstraintRelation

◆ TranslatorPermutationRelation

◆ TranslatorZeroConstraintsRelation

◆ TupleOfUnivariates

template<typename FF , auto LENGTHS>
using bb::TupleOfUnivariates = typedef typename TupleOfContainersOverArray<bb::Univariate, FF, LENGTHS>::type

Definition at line 37 of file nested_containers.hpp.

◆ TupleOfValues

template<typename FF , auto LENGTHS>
using bb::TupleOfValues = typedef typename TupleOfContainersOverArray<ExtractValueType, FF, LENGTHS>::type

Definition at line 40 of file nested_containers.hpp.

◆ UltraCircuitBuilder

◆ UltraKeccakProver

Definition at line 78 of file ultra_prover.hpp.

◆ UltraKeccakVerifier

Definition at line 58 of file ultra_verifier.hpp.

◆ UltraKeccakZKProver

Definition at line 83 of file ultra_prover.hpp.

◆ UltraPermutationRelation

Definition at line 205 of file permutation_relation.hpp.

◆ UltraProver

Definition at line 76 of file ultra_prover.hpp.

◆ UltraRollupVerifier

Definition at line 57 of file ultra_verifier.hpp.

◆ UltraStdlibTranscript

◆ UltraVerifier

Definition at line 56 of file ultra_verifier.hpp.

◆ UltraZKProver

Definition at line 77 of file ultra_prover.hpp.

Enumeration Type Documentation

◆ AssertMode

enum class bb::AssertMode : std::uint8_t
strong
Enumerator
ABORT 
WARN 

Definition at line 15 of file assert.hpp.

◆ BusId

enum class bb::BusId
strong
Enumerator
CALLDATA 
SECONDARY_CALLDATA 
RETURNDATA 

Definition at line 77 of file databus.hpp.

◆ CircuitType

enum class bb::CircuitType : uint32_t
strong
Enumerator
STANDARD 
ULTRA 
UNDEFINED 

Definition at line 12 of file circuit_type.hpp.

◆ CurveType

Enumerator
BN254 
SECP256K1 
SECP256R1 
GRUMPKIN 

Definition at line 10 of file types.hpp.

◆ GenericPermutationSettingIndices

Specifies positions of elements in the tuple of entities received from methods in the Settings class.

Enumerator
INVERSE_POLYNOMIAL_INDEX 
FIRST_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX 
SECOND_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX 
PERMUTATION_SETS_START_POLYNOMIAL_INDEX 

Definition at line 28 of file generic_permutation_relation.hpp.

◆ Instruction

enum class bb::Instruction
strong

Enumeration of VM instructions that can be executed.

Each instruction corresponds to a specific field arithmetic operation. The VM parses these instructions from input data and executes them sequentially.

Enumerator
SET_VALUE 

Set a field element to a specific value.

ADD 

Add two field elements.

ADD_ASSIGN 

Add-assign operation.

INCREMENT 

Increment a field element by 1.

MUL 

Multiply two field elements.

MUL_ASSIGN 

Multiply-assign operation.

SUB 

Subtract two field elements.

SUB_ASSIGN 

Subtract-assign operation.

DIV 

Divide two field elements.

DIV_ASSIGN 

Divide-assign operation.

INV 

Invert a field element.

NEG 

Negate a field element.

SQR 

Square a field element.

SQR_ASSIGN 

Square-assign operation.

POW 

Raise a field element to a power.

SQRT 

Compute square root of a field element.

IS_ZERO 

Check if a field element is zero.

EQUAL 

Check if two field elements are equal.

NOT_EQUAL 

Check if two field elements are not equal.

TO_MONTGOMERY 

Convert to Montgomery form.

FROM_MONTGOMERY 

Convert from Montgomery form.

REDUCE_ONCE 

Reduce a field element once.

SELF_REDUCE 

Self-reduce a field element.

BATCH_INVERT 

Batch invert multiple field elements.

Definition at line 76 of file field.fuzzer.hpp.

◆ MergeSettings

The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at the end (APPEND) of the EccOpQueue.

Enumerator
PREPEND 
APPEND 

Definition at line 21 of file ecc_ops_table.hpp.

◆ TamperType

enum class bb::TamperType
strong
Enumerator
MODIFY_SUMCHECK_UNIVARIATE 
MODIFY_SUMCHECK_EVAL 
MODIFY_Z_PERM_COMMITMENT 
MODIFY_GEMINI_WITNESS 
END 

Definition at line 14 of file tamper_proof.hpp.

◆ VKSerializationMode

Enum to control verification key metadata serialization.

Enumerator
FULL 
NO_METADATA 

Definition at line 104 of file flavor.hpp.

Function Documentation

◆ _allocate_aligned_memory()

template<typename Fr >
std::shared_ptr< Fr[]> bb::_allocate_aligned_memory ( size_t  n_elements)

Definition at line 429 of file polynomial.hpp.

◆ _clone()

template<typename Fr >
SharedShiftedVirtualZeroesArray< Fr > bb::_clone ( const SharedShiftedVirtualZeroesArray< Fr > &  array,
size_t  right_expansion = 0,
size_t  left_expansion = 0 
)

Definition at line 31 of file polynomial.cpp.

◆ _evaluate_mle()

template<typename Fr_ >
Fr_ bb::_evaluate_mle ( std::span< const Fr_ >  evaluation_points,
const SharedShiftedVirtualZeroesArray< Fr_ > &  coefficients,
bool  shift 
)

Internal implementation to support both native and stdlib circuit field types.

Instantiation with circuit field type is always called with shift == false

Definition at line 440 of file polynomial.hpp.

◆ accumulate_and_prove_with_precomputed_vks()

std::pair< Chonk::Proof, Chonk::VerificationKey > bb::accumulate_and_prove_with_precomputed_vks ( size_t  num_app_circuits,
auto &  precomputed_vks,
const bool  large_first_app = true 
)

Perform a specified number of circuit accumulation rounds.

Parameters
NUM_CIRCUITSNumber of circuits to accumulate (apps + kernels)

Definition at line 21 of file test_bench_shared.hpp.

◆ accumulate_logderivative_lookup_subrelation_contributions()

template<typename FF , typename Relation , typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
void bb::accumulate_logderivative_lookup_subrelation_contributions ( ContainerOverSubrelations &  accumulator,
const AllEntities &  in,
const Parameters &  params,
const FF scaling_factor 
)

Compute generic log-derivative lookup subrelation accumulation.

The generic log-derivative lookup relation consistes of two subrelations. The first demonstrates that the inverse polynomial I, defined via I_i = 1/[(read_term_i) * (write_term_i)], has been computed correctly. The second establishes the correctness of the lookups themselves based on the log-derivative lookup argument. Note that the latter subrelation is "linearly dependent" in the sense that it establishes that a sum across all rows of the exectution trace is zero, rather than that some expression holds independently at each row. Accordingly, this subrelation is not multiplied by a scaling factor at each accumulation step. The subrelation expressions are respectively:

I_i * (read_term_i) * (write_term_i) - 1 = 0

\sum_{i=0}^{n-1} [q_{logderiv_lookup} * I_i * write_term_i + read_count_i * I_i * read_term_i] = 0

The explicit expressions for read_term and write_term are dependent upon the particular structure of the lookup being performed and methods for computing them must be defined in the corresponding relation class.

Template Parameters
FF
Relation
ContainerOverSubrelations
AllEntities
Parameters
Parameters
accumulator
in
params
scaling_factor

Definition at line 117 of file logderivative_library.hpp.

◆ accumulate_logderivative_permutation_subrelation_contributions()

template<typename FF , typename Relation , typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
void bb::accumulate_logderivative_permutation_subrelation_contributions ( ContainerOverSubrelations &  accumulator,
const AllEntities &  in,
const Parameters &  params,
const FF scaling_factor 
)

Compute generic log-derivative set permutation subrelation accumulation.

The generic log-derivative lookup relation consistes of two subrelations. The first demonstrates that the inverse polynomial I, defined via I = 1/[(read_term) * (write_term)], has been computed correctly. The second establishes the correctness of the permutation itself based on the log-derivative argument. Note that the latter subrelation is "linearly dependent" in the sense that it establishes that a sum across all rows of the execution trace is zero, rather than that some expression holds independently at each row. Accordingly, this subrelation is not multiplied by a scaling factor at each accumulation step. The subrelation expressions are respectively:

I * (read_term) * (write_term) - q_{permutation_enabler} = 0

\sum_{i=0}^{n-1} [q_{write_enabler} * I * write_term + q_{read_enabler} * I * read_term] = 0

The explicit expressions for read_term and write_term are dependent upon the particular structure of the permutation being performed and methods for computing them must be defined in the corresponding relation class. The entities which are used to determine the use of permutation (is it enabled, is the first "read" set enabled, is the second "write" set enabled) must be defined in the relation class.

Template Parameters
FF
Relation
ContainerOverSubrelations
AllEntities
Parameters
Parameters
accumulator
in
params
scaling_factor

Definition at line 213 of file logderivative_library.hpp.

◆ array_to_array()

template<typename T , typename U , std::size_t N>
std::array< T, N > bb::array_to_array ( const std::array< U, N > &  elements)

Given an std::array<U,N>, returns an std::array<T,N>, by calling the (explicit) constructor T(U).

https://stackoverflow.com/a/32175958 The main use case is to convert an array of Univariate into UnivariateView. The main use case would be to let Sumcheck decide the required degree of the relation evaluation, rather than hardcoding it inside the relation. The _aux version could also be used to create an array of only the polynomials required by the relation, and it could help us implement the optimization where we extend each edge only up to the maximum degree that is required over all relations (for example, L_LAST only needs degree 3).

Template Parameters
TOutput type
UInput type (deduced from elements)
NCommon array size (deduced from elements)
Parameters
elementsarray to be converted
Returns
std::array<T, N> result s.t. result[i] = T(elements[i])

Definition at line 759 of file univariate.hpp.

◆ array_to_array_aux()

template<typename T , typename U , std::size_t N, std::size_t... Is>
std::array< T, sizeof...(Is)> bb::array_to_array_aux ( const std::array< U, N > &  elements,
std::index_sequence< Is... >   
)

Create a sub-array of elements at the indices given in the template pack Is, converting them to the new type T.

Template Parameters
Ttype to convert to
Utype to convert from
Nnumber (deduced by elements)
Islist of indices we want in the returned array. When the second argument is called with std::make_index_sequence<N>, these will be 0, 1, ..., N-1.
Parameters
elementsarray to convert from
Returns
std::array<T, sizeof...(Is)> result array s.t. result[i] = T(elements[Is[i]]). By default, Is[i] = i when called with std::make_index_sequence<N>.

Definition at line 737 of file univariate.hpp.

◆ assert_failure()

void bb::assert_failure ( std::string const &  err)

Definition at line 11 of file assert.cpp.

◆ assign_origin_tag()

template<bool in_circuit, typename T >
void bb::assign_origin_tag ( T &  elem,
const OriginTag tag 
)
inline

Assigns an origin tag to an element or all elements in an iterable container.

Only operates when in_circuit is true

Template Parameters
in_circuitWhether the transcript is in-circuit mode
TThe type of the element to tag (can be a single element or container)
Parameters
elemThe element or container to assign the tag to
tagThe origin tag to assign

Definition at line 220 of file origin_tag.hpp.

◆ avm_check_circuit()

void bb::avm_check_circuit ( const std::filesystem::path &  inputs_path)

Stub - throws runtime error if called.

Definition at line 53 of file api_avm.cpp.

◆ avm_prove()

void bb::avm_prove ( const std::filesystem::path &  inputs_path,
const std::filesystem::path &  output_path 
)

Writes an avm proof and corresponding (incomplete) verification key to files.

Stub - throws runtime error if called.

Communication:

  • Filesystem: The proof and vk are written to the paths output_path/proof and output_path/vk
Parameters
inputs_pathPath to the file containing the serialised avm public inputs and hints
output_pathPath (directory) to write the output proof and verification keys

Definition at line 30 of file api_avm.cpp.

◆ avm_simulate()

void bb::avm_simulate ( const std::filesystem::path &  inputs_path)

Simulates an public transaction.

Stub - throws runtime error if called.

Parameters
inputs_pathPath to the file containing the serialised avm inputs

Definition at line 81 of file api_avm.cpp.

◆ avm_verify()

bool bb::avm_verify ( const std::filesystem::path &  proof_path,
const std::filesystem::path &  public_inputs_path,
const std::filesystem::path &  vk_path 
)

Verifies an avm proof and writes the result to stdout.

Stub - throws runtime error if called.

Communication:

  • proc_exit: A boolean value is returned indicating whether the proof is valid. an exit code of 0 will be returned for success and 1 for failure.
Parameters
proof_pathPath to the file containing the serialized proof
vk_pathPath to the file containing the serialized verification key
Returns
true If the proof is valid
false If the proof is invalid

Definition at line 65 of file api_avm.cpp.

◆ avm_write_verification_key()

void bb::avm_write_verification_key ( const std::filesystem::path &  output_path)

Writes an avm (incomplete) verification key to a file.

Stub - throws runtime error if called.

Communication:

  • Filesystem: The vk is written to the path output_path/vk
Parameters
output_pathPath (directory) to write the output verification key

Definition at line 93 of file api_avm.cpp.

◆ bench_commit_mock_z_perm()

template<typename Curve >
void bb::bench_commit_mock_z_perm ( ::benchmark::State &  state)

Definition at line 218 of file commit.bench.cpp.

◆ bench_commit_random()

template<typename Curve >
void bb::bench_commit_random ( ::benchmark::State &  state)

Definition at line 178 of file commit.bench.cpp.

◆ bench_commit_random_non_power_of_2()

template<typename Curve >
void bb::bench_commit_random_non_power_of_2 ( ::benchmark::State &  state)

Definition at line 192 of file commit.bench.cpp.

◆ bench_commit_sparse()

template<typename Curve >
void bb::bench_commit_sparse ( ::benchmark::State &  state)

Definition at line 108 of file commit.bench.cpp.

◆ bench_commit_sparse_preprocessed()

template<typename Curve >
void bb::bench_commit_sparse_preprocessed ( ::benchmark::State &  state)

Definition at line 127 of file commit.bench.cpp.

◆ bench_commit_sparse_random()

template<typename Curve >
void bb::bench_commit_sparse_random ( ::benchmark::State &  state)

Definition at line 146 of file commit.bench.cpp.

◆ bench_commit_sparse_random_preprocessed()

template<typename Curve >
void bb::bench_commit_sparse_random_preprocessed ( ::benchmark::State &  state)

Definition at line 162 of file commit.bench.cpp.

◆ bench_commit_structured_random_poly()

template<typename Curve >
void bb::bench_commit_structured_random_poly ( ::benchmark::State &  state)

Definition at line 205 of file commit.bench.cpp.

◆ bench_commit_zero()

template<typename Curve >
void bb::bench_commit_zero ( ::benchmark::State &  state)

Definition at line 96 of file commit.bench.cpp.

◆ bench_pippenger_without_endomorphism_basis_points()

template<typename Curve >
void bb::bench_pippenger_without_endomorphism_basis_points ( ::benchmark::State &  state)

Benchmark pippenger_without_endomorphism_basis_points function, which is used notably in the IPA verifier.

Template Parameters
Curve
Parameters
state

Definition at line 240 of file commit.bench.cpp.

◆ BENCHMARK() [1/2]

bb::BENCHMARK ( bench_commit_mock_z_perm< curve::BN254 ) -> Unit(benchmark::kMillisecond)

◆ BENCHMARK() [2/2]

bb::BENCHMARK ( bench_commit_structured_random_poly< curve::BN254 ) -> Unit(benchmark::kMillisecond)

◆ calculate_num_threads()

size_t bb::calculate_num_threads ( size_t  num_iterations,
size_t  min_iterations_per_thread 
)

calculates number of threads to create based on minimum iterations per thread

Finds the number of cpus with get_num_cpus(), and calculates desired_num_threads Returns the min of desired_num_threads and max_num_threads. Note that it will not calculate a power of 2 necessarily, use calculate_num_threads_pow2 instead

Parameters
num_iterations
min_iterations_per_thread
Returns
size_t

Finds the number of cpus with get_num_cpus(), and calculates desired_num_threads Returns the min of desired_num_threads and max_num_theads. Note that it will not calculate a power of 2 necessarily, use calculate_num_threads_pow2 instead

Parameters
num_iterations
min_iterations_per_thread
Returns
size_t

Definition at line 238 of file thread.cpp.

◆ calculate_num_threads_pow2()

size_t bb::calculate_num_threads_pow2 ( size_t  num_iterations,
size_t  min_iterations_per_thread 
)

calculates number of threads to create based on minimum iterations per thread, guaranteed power of 2

Same functionality as calculate_num_threads but guaranteed power of 2

Parameters
num_iterations
min_iterations_per_thread
Returns
size_t

Definition at line 254 of file thread.cpp.

◆ calculate_thread_data()

MultithreadData bb::calculate_thread_data ( size_t  num_iterations,
size_t  min_iterations_per_thread = DEFAULT_MIN_ITERS_PER_THREAD 
)

Calculates number of threads and index bounds for each thread.

Finds the number of cpus with calculate_num_threads() then divides domain evenly amongst threads

Parameters
num_iterations
min_iterations_per_thread
Returns
size_t

Definition at line 212 of file thread.cpp.

◆ check_origin_tag()

template<bool in_circuit, typename T >
void bb::check_origin_tag ( T &  elem,
const OriginTag tag 
)
inline

Checks that an element or all elements in an iterable container have the expected origin tag.

Only operates when in_circuit is true

Template Parameters
in_circuitWhether the transcript is in-circuit mode
TThe type of the element to check (can be a single element or container)
Parameters
elemThe element or container to check
tagThe expected origin tag

Definition at line 241 of file origin_tag.hpp.

◆ check_precomputed_generators()

template<typename Group , detail::DomainSeparator domain_separator, std::size_t num_generators, std::size_t starting_index = 0>
bool bb::check_precomputed_generators ( )
inline

Definition at line 63 of file precomputed_generators.hpp.

◆ check_round_provenance()

void bb::check_round_provenance ( const uint256_t provenance_a,
const uint256_t provenance_b 
)

Detect if two elements from the same transcript are performing a suspicious interaction.

For now this detects that 2 elements from 2 different round can't mingle without a challenge in between

Parameters
provenance_aRound provenance of first element
provenance_bRound provenance of second element

Definition at line 23 of file origin_tag.cpp.

◆ chonk_gate_count()

void bb::chonk_gate_count ( const std::string &  bytecode_path,
bool  include_gates_per_opcode 
)

Definition at line 210 of file api_chonk.cpp.

◆ compress()

std::vector< uint8_t > bb::compress ( const std::vector< uint8_t > &  input)
protected

Definition at line 9 of file private_execution_steps.cpp.

◆ compute_eccvm_challenge_coeffs()

template<typename Curve >
std::vector< typename Curve::ScalarField > bb::compute_eccvm_challenge_coeffs ( const typename Curve::ScalarField evaluation_challenge_x,
const typename Curve::ScalarField batching_challenge_v 
)

Denote \( M = \text{NUM_DISABLED_ROWS_IN_SUMCHECK} \) and \( N = NUM_SMALL_IPA_EVALUTIONS\). Given an evaluation challenge \( x \) and a batching challenge \(v\), compute the polynomial whose coefficients are given by the vector \( (1, x , x^2 , \ldots, x^{M - 1 }, v\cdot x, \ldots, v^{N-1} \cdot x^{M-2}, v^{N-1}, \cdot x^{M-1}, 0, \ldots, 0)\) in the Lagrange basis over the Small Subgroup.

Template Parameters
FF
Parameters
evaluation_challenge_x
batching_challenge_v
subgroup_size
Returns
std::vector<FF>

Definition at line 484 of file small_subgroup_ipa.hpp.

◆ compute_evaluation_points()

template<typename FF >
std::array< FF, NUM_SMALL_IPA_EVALUATIONS > bb::compute_evaluation_points ( const FF small_ipa_evaluation_challenge,
const FF subgroup_generator 
)
inline

The verification of Grand Sum Identity requires the evaluations G(r), A(g * r), A(r), Q(r). Shared by Prover and Verifier.

Definition at line 33 of file small_subgroup_ipa_utils.hpp.

◆ compute_grand_product()

template<typename Flavor , typename GrandProdRelation >
void bb::compute_grand_product ( typename Flavor::ProverPolynomials full_polynomials,
bb::RelationParameters< typename Flavor::FF > &  relation_parameters,
size_t  size_override = 0 
)

Compute a grand product polynomial, grand_product_polynomial, which for historical reasons is sometimes also called Z_perm(X). This polynomial will bear witness to some subset of: {copy constraints, multiset-equality, public inputs}.

Note
The name Z_Perm(X) is historical, as the first use of the grand product polynomial was for the "permutation argument", i.e., checking the correctness of copy-constraints. However, it may also be used for bare multiset-equality checks (as it is in the ECCVM and in the Translator).

Z_perm is a shiftable multilinear polynomial and hence is specified by its values on the boolean hypercube. As it is shiftable, Z_perm[0] == 0. Then it is specified by Z_perm[1] = 1 and the following iterative definition:

             relation::numerator(j)

Z_perm[i] = ∏ -----------------------------------------------------------------------------— relation::denominator(j)

where ∏ := ∏_{j=0:i-1}

(Note that Z_perm[1] may be thought of as the quotient of the empty product by the empty product, and hence setting is 1 is consistent.)

The specific algebraic relation used by Z_perm is

  • specified by Flavor::GrandProductRelations, for Flavor in {ECCVM, Translator}; and
  • specified by UltraPermutationRelation for Ultra (and Mega). This inhomogenity is due to the fact that for Ultra/Mega, the grand product computation also involves computing public_input_delta, which doesn't as cleanly fit into the compute_grand_products pattern. (This latter is an optimization having to do with public inputs.)

The multilinear polynomial Z_perm is designed to take into account copy-constraints, multiset equality checks, and public inputs. The formula is given as below. Here, the sigma polynomials (wires) encode the permutation (and, in the more general case, multiset tags.)

             (w_1(j) + β⋅id_1(j) + γ) ⋅ (w_2(j) + β⋅id_2(j) + γ) ⋅ (w_3(j) + β⋅id_3(j) + γ)

Z_perm[i] = ∏ -----------------------------------------------------------------------------— (w_1(j) + β⋅σ_1(j) + γ) ⋅ (w_2(j) + β⋅σ_2(j) + γ) ⋅ (w_3(j) + β⋅σ_3(j) + γ) where ∏ := ∏_{j=0:i-1} and id_i(X) = id(X) + n*(i-1); here n is also called the SEPARATOR.

The grand product is constructed over the course of three steps.

For expositional simplicity, write Z_perm[i] as

           A(j)

Z_perm[i] = ∏ -----------------------— B(h)

Step 1) Compute 2 length-n polynomials A, B Step 2) Compute 2 length-n polynomials numerator = ∏ A(j), denominator = ∏ B(j) Step 3) Compute Z_perm[i + 1] = numerator[i] / denominator[i]

Note: Step (3) utilizes Montgomery batch inversion, performed at the end of Step (2).

Template Parameters
Flavor
GrandProdRelation
Parameters
full_polynomials
relation_parameters
size_overrideoptional size of the domain; otherwise based on dyadic polynomial domain

Definition at line 81 of file grand_product_library.hpp.

◆ compute_grand_products()

template<typename Flavor >
void bb::compute_grand_products ( typename Flavor::ProverPolynomials full_polynomials,
bb::RelationParameters< typename Flavor::FF > &  relation_parameters,
const size_t  size_override = 0 
)

Compute the grand product corresponding to each grand-product relation defined in the Flavor.

Definition at line 201 of file grand_product_library.hpp.

◆ compute_logderivative_inverse()

template<typename FF , typename Relation , typename Polynomials , bool UseMultithreading = false>
void bb::compute_logderivative_inverse ( Polynomials &  polynomials,
auto &  relation_parameters,
const size_t  circuit_size 
)

Compute the inverse polynomial I(X) required for logderivative lookups

  • details Inverse may be defined in terms of its values on X_i = 0,1,...,n-1 as Z_perm[0] = 1 and for i = 1:n-1 1 1 Inverse[i] = ∏ -----------------------— * ∏' -----------------------— relation::read_term(j) relation::write_term(j)

where ∏ := ∏_{j=0:relation::NUM_READ_TERMS-1} and ∏' := ∏'_{j=0:relation::NUM_WRITE_TERMS-1}

If row [i] does not contain a lookup read gate or a write gate, Inverse[i] = 0 N.B. by "write gate" we mean; do the lookup table polynomials contain nonzero values at this row? (in the ECCVM, the lookup table is not precomputed, so we have a concept of a "write gate", unlike when precomputed lookup tables are used)

The specific algebraic relations that define read terms and write terms are defined in Flavor::LookupRelation

Note: tparam UseMultithreading exists because the AVM calls this fn in a multithreaded loop (no nested multithreading allowed) but the ECCVM benefits from multithreading this fn

Definition at line 40 of file logderivative_library.hpp.

◆ compute_max_partial_relation_length()

template<typename Tuple >
constexpr size_t bb::compute_max_partial_relation_length ( )
constexpr

Utility function to find max PARTIAL_RELATION_LENGTH tuples of Relations.

The "partial length" of a relation is 1 + the degree of the relation, where any challenges used in the relation are as constants, not as variables..

Definition at line 460 of file flavor.hpp.

◆ compute_number_of_subrelations()

template<typename Tuple >
constexpr size_t bb::compute_number_of_subrelations ( )
constexpr

Utility function to find the number of subrelations.

Definition at line 471 of file flavor.hpp.

◆ compute_permutation_argument_polynomials()

template<typename Flavor >
void bb::compute_permutation_argument_polynomials ( const typename Flavor::CircuitBuilder circuit,
typename Flavor::ProverPolynomials polynomials,
const std::vector< CyclicPermutation > &  copy_cycles 
)

Compute Honk-style permutation sigma/id polynomials and add to prover_instance, where the copy_cycles are pre-computed sets of wire addresses whose values should be copy-constrained.

Definition at line 282 of file permutation_lib.hpp.

◆ compute_public_input_delta()

template<typename Flavor >
Flavor::FF bb::compute_public_input_delta ( std::span< const typename Flavor::FF public_inputs,
const typename Flavor::FF beta,
const typename Flavor::FF gamma,
const typename Flavor::FF offset = 0 
)

Compute the correction term for the permutation argument.

Template Parameters
Flavor
Parameters
public_inputsx₀, ..., xₘ₋₁ public inputs to the circuit
betarandom linear-combination term to combine both (wʲ, IDʲ) and (wʲ, σʲ)
gammaSchwartz-Zippel random evaluation to ensure ∏ᵢ (γ + Sᵢ) = ∏ᵢ (γ + Tᵢ)
offsetExtent to which PI are offset from the 0th index in the wire polynomials, for example, due to inclusion of a leading zero row or Goblin style ECC op gates at the top of the execution trace.
Returns
Field Public input Δ

Definition at line 25 of file grand_product_delta.hpp.

◆ concatenate() [1/4]

template<typename T , std::size_t... Ns>
RefArray< T,(Ns+...)> constexpr bb::concatenate ( const RefArray< T, Ns > &...  ref_arrays)
constexpr

Concatenates multiple RefArray objects into a single RefArray.

This function takes multiple RefArray objects as input and concatenates them into a single RefArray.

Template Parameters
TThe type of elements in the RefArray.
NsThe sizes of the input RefArrays.
Parameters
ref_arraysThe RefArray objects to be concatenated.
Returns
RefArray object containing all elements from the input arrays.

Definition at line 158 of file ref_array.hpp.

◆ concatenate() [2/4]

template<typename T >
RefVector< T > bb::concatenate ( const RefVector< T > &  ref_vector,
const auto &...  ref_vectors 
)

Concatenates multiple RefVector objects into a single RefVector.

This function takes multiple RefVector objects as input and concatenates them into a single RefVector.

Template Parameters
TThe type of elements in the RefVector.
Parameters
ref_vectorsThe RefVector objects to be concatenated.
Returns
RefVector object containing all elements from the input vectors.

Definition at line 147 of file ref_vector.hpp.

◆ concatenate() [3/4]

template<typename T , std::size_t... Ns>
std::array< T,(Ns+...)> bb::concatenate ( const std::array< T, Ns > &...  arrays)

Concatenates multiple std::array objects into a single array.

This function template takes a variadic number of std::array objects and concatenates their elements into a single std::array. The size of the resulting array is the sum of the sizes of the input arrays.

Template Parameters
TThe type of elements stored in the arrays.
NsThe sizes of the input arrays. This is a variadic template parameter pack representing the sizes of each input array.
Parameters
arraysVariadic number of std::array objects to concatenate. Each array can have a different size but must contain the same type of elements.
Returns
std::array<T, (Ns + ...)> A new std::array containing all elements from the input arrays concatenated in the order they were passed.

Example usage: std::array<int, 2> a = {1, 2}; std::array<int, 3> b = {3, 4, 5}; auto result = concatenate(a, b); // result is std::array<int, 5>{1, 2, 3, 4, 5}

Definition at line 26 of file std_array.hpp.

◆ concatenate() [4/4]

template<typename T >
std::vector< T > bb::concatenate ( const std::vector< T > &  vector,
const auto &...  vectors 
)

Concatenates multiple std::vector objects into a single std::vector.

Template Parameters
TThe type of elements in the std::vector.
Parameters
vectorsThe std::vector objects to be concatenated.
Returns
std::vector object containing all elements from the input vectors.

Definition at line 12 of file std_vector.hpp.

◆ constexpr_for()

template<size_t Start, size_t End, size_t Inc, class F >
constexpr void bb::constexpr_for ( F &&  f)
constexpr

Implements a loop using a compile-time iterator. Requires c++20. Implementation (and description) from https://artificial-mind.net/blog/2020/10/31/constexpr-for.

Template Parameters
Startthe loop start value
Endthe loop end value
Inchow much the iterator increases by per iteration
Fa Lambda function that is executed once per loop
Parameters
fAn rvalue reference to the lambda

Implements a for loop where the iterator is a constexpr variable. Use this when you need to evaluate if constexpr statements on the iterator (or apply other constexpr expressions) Outside of this use-case avoid using this fn as it gives negligible performance increases vs regular loops.

N.B. A side-effect of this method is that all loops will be unrolled (each loop iteration uses different iterator template parameters => unique constexpr_for implementation per iteration) Do not use this for large (~100+) loops!

EXAMPLE USE OF constexpr_for

constexpr_for<0, 10, 1>([&]<size_t i>(){ if constexpr (i & 1 == 0) { foo[i] = even_container[i >> 1]; } else { foo[i] = odd_container[i >> 1]; } });

In the above example we are iterating from i = 0 to i < 10. The provided lambda function has captured everything in its surrounding scope (via [&]), which is where foo, even_container and odd_container have come from.

We do not need to explicitly define the class F parameter as the compiler derives it from our provided input argument F&& f (i.e. the lambda function)

In the loop itself we're evaluating a constexpr if statement that defines which code path is taken.

The above example benefits from constexpr_for because a run-time if statement has been reduced to a compile-time if statement. N.B. this would only give measurable improvements if the constexpr_for statement is itself in a hot loop that's iterated over many (>thousands) times

Definition at line 71 of file constexpr_utils.hpp.

◆ construct_lookup_read_counts()

template<typename Flavor >
void bb::construct_lookup_read_counts ( typename Flavor::Polynomial read_counts,
typename Flavor::Polynomial read_tags,
typename Flavor::CircuitBuilder circuit 
)

Construct polynomial whose value at index i is the number of times the table entry at that index has been read.

Read counts are needed for the log derivative lookup argument. The table polynomials are constructed as a concatenation of basic 3-column tables. Similarly, the read counts polynomial is constructed as the concatenation of read counts for the individual tables.

Definition at line 50 of file composer_lib.hpp.

◆ construct_lookup_table_polynomials()

template<typename Flavor >
void bb::construct_lookup_table_polynomials ( const RefArray< typename Flavor::Polynomial, 4 > &  table_polynomials,
const typename Flavor::CircuitBuilder circuit 
)

Construct polynomials containing the concatenation of all lookup tables used in the circuit.

The first three polynomials contain the table data, while the fourth polynomial contains a table index that simply reflects the order in which the tables were added to the circuit.

Template Parameters
Flavor
Parameters
table_polynomialsPolynomials to populate with table data
circuit

Definition at line 27 of file composer_lib.hpp.

◆ create_commitment_key() [1/2]

template<typename Curve >
CommitmentKey< Curve > bb::create_commitment_key ( const size_t  num_points)

Definition at line 16 of file commit.bench.cpp.

◆ create_commitment_key() [2/2]

template<class CK >
CK bb::create_commitment_key ( const size_t  num_points = 0)
inline

Definition at line 100 of file commitment_key.test.hpp.

◆ create_commitment_key< CommitmentKey< curve::BN254 > >()

template<>
CommitmentKey< curve::BN254 > bb::create_commitment_key< CommitmentKey< curve::BN254 > > ( const size_t  num_points)
inline

Definition at line 78 of file commitment_key.test.hpp.

◆ create_commitment_key< CommitmentKey< curve::Grumpkin > >()

template<>
CommitmentKey< curve::Grumpkin > bb::create_commitment_key< CommitmentKey< curve::Grumpkin > > ( const size_t  num_points)
inline

Definition at line 78 of file commitment_key.test.hpp.

◆ create_sumcheck_tuple_of_tuples_of_univariates()

template<typename RelationsTuple >
constexpr auto bb::create_sumcheck_tuple_of_tuples_of_univariates ( )
constexpr

Utility function to construct a container for the subrelation accumulators of sumcheck proving.

The size of the outer tuple is equal to the number of relations. Each relation contributes an inner tuple of univariates whose size is equal to the number of subrelations of the relation. The length of a univariate in an inner tuple is determined by the corresponding subrelation length.

Definition at line 485 of file flavor.hpp.

◆ create_tuple_of_arrays_of_values()

template<typename RelationsTuple >
constexpr auto bb::create_tuple_of_arrays_of_values ( )
constexpr

Definition at line 508 of file flavor.hpp.

◆ create_verifier_commitment_key()

template<class VK >
VK bb::create_verifier_commitment_key ( )
inline

Definition at line 120 of file commitment_key.test.hpp.

◆ create_verifier_commitment_key< VerifierCommitmentKey< curve::BN254 > >()

◆ create_verifier_commitment_key< VerifierCommitmentKey< curve::Grumpkin > >()

◆ decompress()

std::vector< uint8_t > bb::decompress ( const void *  bytes,
size_t  size 
)

Definition at line 30 of file private_execution_steps.cpp.

◆ DEFINE_SUMCHECK_PERMUTATION_CLASS()

bb::DEFINE_SUMCHECK_PERMUTATION_CLASS ( ECCVMSetRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [1/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMBoolsRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [2/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMLookupRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [3/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMMSMRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [4/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMPointTableRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [5/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMSetRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [6/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMTranscriptRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [7/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( ECCVMWnafRelationImpl  ,
ECCVMFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [8/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorAccumulatorTransferRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [9/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorDeltaRangeConstraintRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [10/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorNonNativeFieldRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [11/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorOpcodeConstraintRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [12/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorPermutationRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_RELATION_CLASS() [13/13]

bb::DEFINE_SUMCHECK_RELATION_CLASS ( TranslatorZeroConstraintsRelationImpl  ,
TranslatorFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_PERMUTATION_CLASS()

bb::DEFINE_SUMCHECK_VERIFIER_PERMUTATION_CLASS ( ECCVMSetRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [1/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMBoolsRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [2/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMLookupRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [3/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMMSMRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [4/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMPointTableRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [5/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMSetRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [6/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMTranscriptRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [7/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( ECCVMWnafRelationImpl  ,
ECCVMRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [8/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorAccumulatorTransferRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [9/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorDecompositionRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [10/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorDeltaRangeConstraintRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [11/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorNonNativeFieldRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [12/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorOpcodeConstraintRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [13/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorPermutationRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS() [14/14]

bb::DEFINE_SUMCHECK_VERIFIER_RELATION_CLASS ( TranslatorZeroConstraintsRelationImpl  ,
TranslatorRecursiveFlavor   
)

◆ DenseRange() [1/2]

bb::DenseRange ( MIN_LOG_NUM_GRUMPKIN_POINTS  ,
MAX_LOG_NUM_GRUMPKIN_POINTS   
) -> Unit(benchmark::kMillisecond)

◆ DenseRange() [2/2]

bb::DenseRange ( MIN_LOG_NUM_POINTS  ,
MAX_LOG_NUM_POINTS   
) -> Unit(benchmark::kMillisecond)

◆ execute_msgpack_ipc_server()

int bb::execute_msgpack_ipc_server ( std::unique_ptr< ipc::IpcServer server)

Execute msgpack commands over IPC.

Runs an IPC server that accepts concurrent clients. Clients can send msgpack commands independently, and responses are automatically routed back to the correct client.

Parameters
serverIPC server instance (socket or shared memory)
Returns
int Status code: 0 for success, non-zero for errors

Definition at line 148 of file api_msgpack.cpp.

◆ execute_msgpack_run()

int bb::execute_msgpack_run ( const std::string &  msgpack_input_file,
int  max_clients = 1,
size_t  request_ring_size = 1024UL *1024,
size_t  response_ring_size = 1024UL *1024 
)

Execute msgpack run command.

This function handles the msgpack run subcommand, reading commands from either stdin, a specified file, a Unix domain socket (if path ends in .sock), or shared memory IPC (if path ends in .shm).

Parameters
msgpack_input_filePath to input file (empty string means use stdin, .sock suffix means Unix socket, .shm suffix means shared memory)
max_clientsMaximum number of concurrent clients for IPC servers (default: 1)
request_ring_sizeRequest ring buffer size for shared memory (default: 1MB)
response_ring_sizeResponse ring buffer size for shared memory (default: 1MB)
Returns
int Status code: 0 for success, non-zero for errors

Definition at line 283 of file api_msgpack.cpp.

◆ extract_transcript_tag()

template<typename TranscriptType >
OriginTag bb::extract_transcript_tag ( const TranscriptType &  transcript)
inline

Extract origin tag context from a transcript.

Friend function that has controlled access to transcript's private round tracking state.

Template Parameters
TranscriptTypeThe type of transcript (NativeTranscript or StdlibTranscript)
Parameters
transcriptThe transcript to extract tag context from
Returns
OriginTag with (transcript_index, round_index, is_submitted=true)

Definition at line 298 of file origin_tag.hpp.

◆ field_elements_to_json()

template<typename Fr >
std::string bb::field_elements_to_json ( const std::vector< Fr > &  fields)
inline

Definition at line 90 of file file_io.hpp.

◆ find_contract_artifacts()

std::vector< std::string > bb::find_contract_artifacts ( const std::string &  search_path = ".")

Find all contract artifacts in target/ directories.

Parameters
search_pathRoot path to search from (defaults to current directory)
Returns
Vector of paths to contract artifacts

Definition at line 287 of file aztec_process.cpp.

◆ find_deepest_subcommand()

CLI::App * bb::find_deepest_subcommand ( CLI::App *  app)

Definition at line 60 of file cli.cpp.

◆ flatten()

template<template< typename, typename... > typename Cont, typename InnerCont , typename... Args>
InnerCont bb::flatten ( Cont< InnerCont, Args... > const &  in)

Definition at line 47 of file container.hpp.

◆ flavor_get_label()

template<typename Container , typename Element >
std::string bb::flavor_get_label ( Container &&  container,
const Element element 
)
inline

Definition at line 70 of file flavor_concepts.hpp.

◆ generate_sha256_test_circuit()

template<typename Builder >
void bb::generate_sha256_test_circuit ( Builder builder,
size_t  num_iterations 
)

Generate a test circuit using SHA256 compression (sha256_block)

Creates circuit constraints by iteratively calling sha256_block, feeding the output as h_init for the next iteration. This tests the primitive exposed to ACIR (Sha256Compression opcode).

Definition at line 34 of file mock_circuits.hpp.

◆ generic_evaluate_mle()

template<typename Fr_ >
Fr_ bb::generic_evaluate_mle ( std::span< const Fr_ >  evaluation_points,
const SharedShiftedVirtualZeroesArray< Fr_ > &  coefficients 
)

Static exposed implementation to support both native and stdlib circuit field types.

Definition at line 511 of file polynomial.hpp.

◆ get_assert_mode()

AssertMode & bb::get_assert_mode ( )

Definition at line 5 of file assert.cpp.

◆ get_bn254_g1_data()

std::vector< g1::affine_element > bb::get_bn254_g1_data ( const std::filesystem::path &  path,
size_t  num_points,
bool  allow_download 
)

Definition at line 41 of file get_bn254_crs.cpp.

◆ get_bn254_g2_data()

g2::affine_element bb::get_bn254_g2_data ( const std::filesystem::path &  path,
bool  allow_download = true 
)

◆ get_cache_paths()

bool bb::get_cache_paths ( const std::string &  input_path)

Get cache paths for all verification keys in an artifact.

Outputs cache key information in format: <hash>:<cache_path> One line per function, to stdout.

Parameters
input_pathPath to input artifact JSON
Returns
true on success, false on failure

Definition at line 348 of file aztec_process.cpp.

◆ get_curve_constants_msgpack()

std::vector< uint8_t > bb::get_curve_constants_msgpack ( )

Generate msgpack-encoded curve constants for all supported curves.

Returns
Vector of bytes containing msgpack-encoded curve constants

Definition at line 80 of file curve_constants.cpp.

◆ get_evaluation_labels()

std::array< std::string, NUM_SMALL_IPA_EVALUATIONS > bb::get_evaluation_labels ( const std::string &  label_prefix)
inline

Shared by Prover and Verifier. label_prefix is either Libra: or Translation:.

Definition at line 20 of file small_subgroup_ipa_utils.hpp.

◆ get_file_size()

size_t bb::get_file_size ( std::string const &  filename)
inline

Definition at line 17 of file file_io.hpp.

◆ get_grumpkin_g1_data()

std::vector< curve::Grumpkin::AffineElement > bb::get_grumpkin_g1_data ( const std::filesystem::path &  path,
size_t  num_points,
bool  allow_download 
)

Definition at line 10 of file get_grumpkin_crs.cpp.

◆ get_num_cpus()

size_t bb::get_num_cpus ( )

Definition at line 33 of file thread.cpp.

◆ get_num_cpus_pow2()

size_t bb::get_num_cpus_pow2 ( )
inline

Definition at line 25 of file thread.hpp.

◆ get_precomputed_generators()

template<typename Group , detail::DomainSeparator domain_separator, std::size_t num_generators, std::size_t starting_index = 0>
constexpr std::span< const typename Group::affine_element > bb::get_precomputed_generators ( )
constexpr

Definition at line 51 of file precomputed_generators.hpp.

◆ get_sequential_prover_polynomials()

template<typename Flavor >
Flavor::ProverPolynomials bb::get_sequential_prover_polynomials ( const size_t  log_circuit_size,
const size_t  starting_value 
)

Get a ProverPolynomials instance initialized to sequential values starting at 0.

Values are assigned according to the order specified in the underlying array of the flavor class. The function returns an array of data pointed to by the ProverPolynomials.

Definition at line 17 of file testing.hpp.

◆ get_unshifted_then_shifted()

auto bb::get_unshifted_then_shifted ( const auto &  all_entities)

Definition at line 450 of file flavor.hpp.

◆ get_zero_prover_polynomials()

template<typename Flavor >
Flavor::ProverPolynomials bb::get_zero_prover_polynomials ( const size_t  log_circuit_size)

Definition at line 35 of file testing.hpp.

◆ index_of()

template<typename T >
int64_t bb::index_of ( std::vector< T > const &  vec,
T const &  item 
)

Definition at line 58 of file container.hpp.

◆ initialize_relation_separator()

template<typename FF , size_t N>
std::array< FF, N > bb::initialize_relation_separator ( const FF alpha)

Definition at line 901 of file sumcheck.hpp.

◆ join() [1/2]

template<typename C >
C bb::join ( std::initializer_list< C to_join)

Definition at line 26 of file container.hpp.

◆ join() [2/2]

std::string bb::join ( std::vector< std::string > const &  to_join,
std::string const &  with = "," 
)
inline

Definition at line 35 of file container.hpp.

◆ msgpack_schema_name()

std::string bb::msgpack_schema_name ( g1::affine_element const &  )
inline

Definition at line 37 of file g1.hpp.

◆ msgpack_to_json()

std::string bb::msgpack_to_json ( msgpack::object const &  o,
size_t  max_chars 
)

Definition at line 6 of file msgpack_to_json.cpp.

◆ NamedUnion()

template<typename... Types>
bb::NamedUnion ( std::variant< Types... >  ) -> NamedUnion< Types... >

◆ operator*() [1/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator* ( const Fr ff,
const Univariate< Fr, domain_end > &  uv 
)

Definition at line 567 of file univariate.hpp.

◆ operator*() [2/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator* ( const Fr ff,
const UnivariateView< Fr, domain_end > &  uv 
)

Definition at line 718 of file univariate.hpp.

◆ operator+() [1/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator+ ( const Fr ff,
const Univariate< Fr, domain_end > &  uv 
)

Definition at line 555 of file univariate.hpp.

◆ operator+() [2/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator+ ( const Fr ff,
const UnivariateView< Fr, domain_end > &  uv 
)

Definition at line 706 of file univariate.hpp.

◆ operator-() [1/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator- ( const Fr ff,
const Univariate< Fr, domain_end > &  uv 
)

Definition at line 561 of file univariate.hpp.

◆ operator-() [2/2]

template<class Fr , size_t domain_end>
Univariate< Fr, domain_end > bb::operator- ( const Fr ff,
const UnivariateView< Fr, domain_end > &  uv 
)

Definition at line 712 of file univariate.hpp.

◆ operator<<() [1/2]

template<typename Fr >
std::ostream & bb::operator<< ( std::ostream &  os,
const Polynomial< Fr > &  p 
)
inline

Definition at line 517 of file polynomial.hpp.

◆ operator<<() [2/2]

std::ostream & bb::operator<< ( std::ostream &  os,
OriginTag const &  v 
)
inline

Definition at line 172 of file origin_tag.hpp.

◆ parallel_for() [1/2]

template<typename Func >
requires std::invocable<Func, ThreadChunk>
void bb::parallel_for ( const Func &  func)

Definition at line 185 of file thread.hpp.

◆ parallel_for() [2/2]

void bb::parallel_for ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)

Creates a thread pool and runs the function in parallel.

Parameters
num_iterationsNumber of iterations
funcFunction to run in parallel Observe that num_iterations is NOT the thread pool size. The size will be chosen based on the hardware concurrency (i.e., env or cpus).

Definition at line 111 of file thread.cpp.

◆ parallel_for_atomic_pool()

void bb::parallel_for_atomic_pool ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)
private

A thread pooled strategy that uses atomics to prevent needing constantly lock on a queue. The main thread acts as a worker also, and when it completes, it spins until thread workers are done.

Definition at line 109 of file parallel_for_atomic_pool.cpp.

◆ parallel_for_heuristic() [1/3]

template<typename Func , typename Accum >
requires std::invocable<Func, std::size_t, Accum&>
std::vector< Accum > bb::parallel_for_heuristic ( size_t  num_points,
const Accum &  initial_accum,
const Func &  func,
size_t  heuristic_cost 
)

parallel_for_heuristic variant that takes an accumulator initializer that is allocated in a vector, one accumulator per thread/chunk. This allows for thread-safe accumulation, see sum() or sum_pairs() in container.hpp for an easy way to combine the thread/chunk contributions into a final result.

Definition at line 78 of file thread.hpp.

◆ parallel_for_heuristic() [2/3]

template<typename Func >
requires std::invocable<Func, std::size_t>
void bb::parallel_for_heuristic ( size_t  num_points,
const Func &  func,
size_t  heuristic_cost 
)

Definition at line 58 of file thread.hpp.

◆ parallel_for_heuristic() [3/3]

void bb::parallel_for_heuristic ( size_t  num_points,
const std::function< void(size_t, size_t, size_t)> &  func,
size_t  heuristic_cost 
)

Split a loop into several loops running in parallel based on operations in 1 iteration.

Splits the num_points into appropriate number of chunks to do parallel processing on and calls the function that should contain the work loop, but only if it's worth it

Parameters
num_pointsTotal number of elements
funcA function or lambda expression with a for loop inside, for example: [&](size_t start, size_t end, size_t thread_index){for (size_t i=start; i<end; i++){ ... work ... }
heuristic_costthe estimated cost of the operation, see namespace thread_heuristics below

Definition at line 171 of file thread.cpp.

◆ parallel_for_moody()

void bb::parallel_for_moody ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)

◆ parallel_for_mutex_pool()

void bb::parallel_for_mutex_pool ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)
private

A thread pooled strategy that uses std::mutex for protection. Each worker increments the "iteration" and processes. The main thread acts as a worker also, and when it completes, it spins until thread workers are done.

Definition at line 134 of file parallel_for_mutex_pool.cpp.

◆ parallel_for_omp()

void bb::parallel_for_omp ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)

◆ parallel_for_queued()

void bb::parallel_for_queued ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)

A thread pooled strategey that assumed that thread pools would be more efficient than spawning threads. Every iteration becomes a task in a queue. That's probably not very efficient. A normal mutex and condition variables are used to distribute tasks and notify.

Definition at line 19 of file parallel_for_queued.cpp.

◆ parallel_for_range()

void bb::parallel_for_range ( size_t  num_points,
const std::function< void(size_t, size_t)> &  func,
size_t  no_multhreading_if_less_or_equal 
)

Split a loop into several loops running in parallel.

Splits the num_points into appropriate number of chunks to do parallel processing on and calls the function that should contain the work loop

Parameters
num_pointsTotal number of elements
funcA function or lambda expression with a for loop inside, for example: [](size_t start, size_t end){for (size_t i=start; i<end; i++){(void)i;}}
no_multhreading_if_less_or_equalIf num points is less or equal to this value, run without parallelization

Definition at line 141 of file thread.cpp.

◆ parallel_for_spawning()

void bb::parallel_for_spawning ( size_t  num_iterations,
const std::function< void(size_t)> &  func 
)

A very simple strategy. Spawn a worker thread for every iteration (but no more than num cores). Worker threads tight-loop incrementing an atomic variable from 0-num_iterations, until num_iterations reached. Main thread waits on all worker threads by joining.

Definition at line 11 of file parallel_for_spawning.cpp.

◆ parse_and_run_cli_command()

int bb::parse_and_run_cli_command ( int  argc,
char *  argv[] 
)

Parse command line arguments and run the corresponding command.

This function encapsulates the entire CLI parsing and command execution logic that is used in the main function. It's designed as a standalone function to support multiple entry points:

  1. Used by main.cpp as the primary command-line interface for the bb executable
  2. Used by main.bench.cpp for benchmark testing with the same command structure

The function utilizes CLI11 for argument parsing and creates a hierarchy of commands and subcommands with appropriate options. This encapsulation allows the CLI functionality to be tested and benchmarked without duplicating the command structure across multiple files.

Parameters
argcNumber of command-line arguments
argvArray of command-line argument strings
Returns
int Status code: 0 for success, non-zero for errors or verification failure

Definition at line 106 of file cli.cpp.

◆ precompute_vks()

std::vector< std::shared_ptr< typename MegaFlavor::VerificationKey > > bb::precompute_vks ( const size_t  num_app_circuits,
const bool  large_first_app = true 
)

Definition at line 42 of file test_bench_shared.hpp.

◆ print_active_subcommands()

void bb::print_active_subcommands ( const CLI::App &  app,
const std::string &  prefix = "bb command: " 
)

Definition at line 46 of file cli.cpp.

◆ print_subcommand_options()

void bb::print_subcommand_options ( const CLI::App *  sub)

Definition at line 75 of file cli.cpp.

◆ process_all_artifacts()

bool bb::process_all_artifacts ( const std::string &  search_path = ".",
bool  force = false 
)

Process all discovered contract artifacts in a directory tree.

Parameters
search_pathRoot path to search from (defaults to current directory)
forceForce regeneration even if cached
Returns
true if all artifacts processed successfully

Definition at line 322 of file aztec_process.cpp.

◆ process_aztec_artifact()

bool bb::process_aztec_artifact ( const std::string &  input_path,
const std::string &  output_path,
bool  force = false 
)

Process Aztec contract artifacts: transpile and generate verification keys.

Parameters
input_pathPath to input artifact JSON
output_pathPath to output artifact JSON (can be same as input)
forceForce regeneration even if cached
Returns
true on success, false on failure

Definition at line 236 of file aztec_process.cpp.

◆ process_msgpack_commands()

int bb::process_msgpack_commands ( std::istream &  input_stream)

Process msgpack API commands from an input stream.

This function reads length-encoded msgpack buffers from the provided input stream, deserializes them into Command objects, executes them via the bbapi interface, and writes length-encoded responses back to stdout.

The format for each message is:

  • 4-byte length prefix (little-endian)
  • msgpack buffer of the specified length
Parameters
input_streamThe input stream to read msgpack commands from (stdin or file)
Returns
int Status code: 0 for success, non-zero for errors

Definition at line 25 of file api_msgpack.cpp.

◆ read() [1/7]

template<typename B , typename FF >
void bb::read ( B &  buf,
arithmetic_triple_< FF > &  constraint 
)
inline

Definition at line 81 of file gate_data.hpp.

◆ read() [2/7]

template<typename B , typename base_field , typename Params >
void bb::read ( B &  it,
field2< base_field, Params > &  value 
)

Definition at line 149 of file field2_declarations.hpp.

◆ read() [3/7]

template<typename B , typename Params >
void bb::read ( B &  it,
field< Params > &  value 
)

Definition at line 728 of file field_declarations.hpp.

◆ read() [4/7]

template<typename B , class Fr , size_t domain_end>
void bb::read ( B &  it,
Univariate< Fr, domain_end > &  univariate 
)
inline

Definition at line 541 of file univariate.hpp.

◆ read() [5/7]

template<typename B , class Fr , size_t domain_end, bool has_a0_plus_a1>
void bb::read ( B &  it,
UnivariateCoefficientBasis< Fr, domain_end, has_a0_plus_a1 > &  univariate 
)
inline

Definition at line 339 of file univariate_coefficient_basis.hpp.

◆ read() [6/7]

void bb::read ( uint8_t const *&  it,
Chonk::VerificationKey vk 
)
inline

Definition at line 350 of file chonk.hpp.

◆ read() [7/7]

template<typename PrecomputedCommitments , typename Transcript , VKSerializationMode SerializeMetadata>
void bb::read ( uint8_t const *&  it,
NativeVerificationKey_< PrecomputedCommitments, Transcript, SerializeMetadata > &  vk 
)
inline

Definition at line 549 of file flavor.hpp.

◆ read_file()

std::vector< uint8_t > bb::read_file ( const std::string &  filename,
size_t  bytes = 0 
)
inline

Definition at line 29 of file file_io.hpp.

◆ RefArray()

template<typename T , typename... Ts>
bb::RefArray ( T &  ,
Ts &  ... 
) -> RefArray< T, 1+sizeof...(Ts)>

Deduction guide for the RefArray class. Allows for RefArray {a, b, c} without explicit template params.

◆ RefVector()

template<typename T , typename... Ts>
bb::RefVector ( T &  ,
Ts &  ... 
) -> RefVector< T >

Deduction guide for the RefVector class. Allows for RefVector {a, b, c} without explicit template params.

◆ set_parallel_for_concurrency()

void bb::set_parallel_for_concurrency ( size_t  num_cores)

Definition at line 23 of file thread.cpp.

◆ slice() [1/2]

template<typename C >
C bb::slice ( C const &  container,
size_t  start 
)

Definition at line 9 of file container.hpp.

◆ slice() [2/2]

template<typename C >
C bb::slice ( C const &  container,
size_t  start,
size_t  end 
)

Definition at line 17 of file container.hpp.

◆ sparse_random_poly()

template<typename FF >
Polynomial< FF > bb::sparse_random_poly ( const size_t  size,
const size_t  num_nonzero 
)

Definition at line 24 of file commit.bench.cpp.

◆ structured_random_poly()

template<typename FF >
PolyData< FF > bb::structured_random_poly ( bool  non_zero_complement = false)

Definition at line 44 of file commit.bench.cpp.

◆ subrelation_is_linearly_independent()

template<typename Relation , size_t subrelation_index>
constexpr bool bb::subrelation_is_linearly_independent ( )
constexpr

Check whether a given subrelation is linearly independent from the other subrelations.

More often than not, we want multiply each subrelation contribution by a power of the relation separator challenge. In cases where we wish to define a subrelation that merges into another, we encode this in a boolean array SUBRELATION_LINEARLY_INDEPENDENT in the relation. If no such array is defined, then the default case where all subrelations are independent is engaged.

Definition at line 30 of file relation_types.hpp.

◆ sum()

template<template< typename, typename... > typename Cont, typename Inner , typename... Args>
Inner bb::sum ( Cont< Inner, Args... > const &  in)

Definition at line 70 of file container.hpp.

◆ sum_pairs()

template<template< typename, typename... > typename Cont, typename Left , typename Right , typename... Args>
std::pair< Left, Right > bb::sum_pairs ( Cont< std::pair< Left, Right >, Args... > const &  in)

Definition at line 81 of file container.hpp.

◆ tag_and_serialize()

template<bool in_circuit, typename Codec , typename T >
std::vector< typename Codec::DataType > bb::tag_and_serialize ( const T &  component,
const OriginTag tag 
)
inline

Tag a component with a given origin tag and serialize it to field elements.

Template Parameters
in_circuitWhether the transcript is in-circuit mode
CodecThe codec to use for serialization (provides DataType and serialize_to_fields)
TThe type of the component to tag and serialize
Parameters
componentThe component to tag and serialize
tagThe origin tag to assign
Returns
std::vector<typename Codec::DataType> Serialized field elements

Definition at line 281 of file origin_tag.hpp.

◆ tamper_with_proof() [1/2]

template<typename InnerProver , typename InnerFlavor , typename ProofType >
void bb::tamper_with_proof ( InnerProver &  inner_prover,
ProofType &  inner_proof,
TamperType  type 
)

Test method that provides several ways to tamper with a proof. TODO(https://github.com/AztecProtocol/barretenberg/issues/1298): Currently, several tests are failing due to challenges not being re-computed after tampering. We need to extend this tool to allow for more elaborate tampering.

Template Parameters
InnerProver
InnerFlavor
ProofType
Parameters
inner_prover
inner_proof
type

Definition at line 35 of file tamper_proof.hpp.

◆ tamper_with_proof() [2/2]

template<typename InnerProver , typename InnerFlavor , typename ProofType >
void bb::tamper_with_proof ( ProofType &  inner_proof,
bool  end_of_proof 
)

Tamper with a proof by modifying the first pairing point to be P+G (where G is the generator). This keeps the point on the curve but makes the proof invalid.

Definition at line 107 of file tamper_proof.hpp.

◆ TEST() [1/26]

bb::TEST ( BoomerangMegaCircuitBuilder  ,
BasicCircuit   
)

◆ TEST() [2/26]

bb::TEST ( BoomerangMegaCircuitBuilder  ,
OnlyGoblinEccOpQueueUltraOps   
)

Check that the ultra ops are recorded correctly in the EccOpQueue.

Definition at line 66 of file graph_description_megacircuitbuilder.test.cpp.

◆ TEST() [3/26]

bb::TEST ( MegaCircuitBuilder  ,
BaseCase   
)

Definition at line 53 of file mega_circuit_builder.test.cpp.

◆ TEST() [4/26]

bb::TEST ( MegaCircuitBuilder  ,
CompleteSelectorPartitioningCheck   
)

Check that the selector partitioning is correct for the mega circuit builder.

We check that for the arithmetic, delta_range, elliptic, memory, nnf, lookup, busread, poseidon2_external, poseidon2_internal blocks, and the other selectors are zero on that block.

Definition at line 170 of file mega_circuit_builder.test.cpp.

◆ TEST() [5/26]

bb::TEST ( MegaCircuitBuilder  ,
CopyConstructor   
)

Definition at line 14 of file mega_circuit_builder.test.cpp.

◆ TEST() [6/26]

bb::TEST ( MegaCircuitBuilder  ,
GoblinEccOpQueueUltraOps   
)

Check that the ultra ops are recorded correctly in the EccOpQueue.

Definition at line 136 of file mega_circuit_builder.test.cpp.

◆ TEST() [7/26]

bb::TEST ( MegaCircuitBuilder  ,
GoblinSimple   
)

Test the queueing of simple ecc ops via the Goblin builder.

There are two things to check here: 1) When ecc ops are queued by the builder, the corresponding native operations are performed correctly by the internal ecc op queue, and 2) The ecc op gate operands are correctly encoded in the op_wires, i.e. the operands can be reconstructed as expected.

Definition at line 69 of file mega_circuit_builder.test.cpp.

◆ TEST() [8/26]

bb::TEST ( UltraCircuitBuilder  ,
BadTagPermutation   
)

◆ TEST() [9/26]

bb::TEST ( UltraCircuitBuilder  ,
BaseCase   
)

Definition at line 36 of file ultra_circuit_builder_basic.test.cpp.

◆ TEST() [10/26]

bb::TEST ( UltraCircuitBuilder  ,
CheckCircuitShowcase   
)

Definition at line 65 of file ultra_circuit_builder_basic.test.cpp.

◆ TEST() [11/26]

bb::TEST ( UltraCircuitBuilder  ,
ComposedRangeConstraint   
)

Definition at line 111 of file ultra_circuit_builder_range.test.cpp.

◆ TEST() [12/26]

bb::TEST ( UltraCircuitBuilder  ,
CopyConstructor   
)

Definition at line 10 of file ultra_circuit_builder_basic.test.cpp.

◆ TEST() [13/26]

bb::TEST ( UltraCircuitBuilder  ,
NonTrivialTagPermutation   
)

◆ TEST() [14/26]

bb::TEST ( UltraCircuitBuilder  ,
NonTrivialTagPermutationAndCycles   
)

◆ TEST() [15/26]

bb::TEST ( UltraCircuitBuilder  ,
Ram   
)

Definition at line 85 of file ultra_circuit_builder_memory.test.cpp.

◆ TEST() [16/26]

bb::TEST ( UltraCircuitBuilder  ,
RamSimple   
)

A simple-as-possible RAM read test, for easier debugging.

Definition at line 55 of file ultra_circuit_builder_memory.test.cpp.

◆ TEST() [17/26]

bb::TEST ( UltraCircuitBuilder  ,
RangeChecksOnDuplicates   
)

Definition at line 133 of file ultra_circuit_builder_range.test.cpp.

◆ TEST() [18/26]

bb::TEST ( UltraCircuitBuilder  ,
RangeConstraint   
)

Definition at line 20 of file ultra_circuit_builder_range.test.cpp.

◆ TEST() [19/26]

bb::TEST ( UltraCircuitBuilder  ,
RangeWithGates   
)

Definition at line 81 of file ultra_circuit_builder_range.test.cpp.

◆ TEST() [20/26]

bb::TEST ( UltraCircuitBuilder  ,
RangeWithGatesWhereRangeIsNotAPowerOfTwo   
)

Definition at line 96 of file ultra_circuit_builder_range.test.cpp.

◆ TEST() [21/26]

bb::TEST ( UltraCircuitBuilder  ,
Rom   
)

Definition at line 11 of file ultra_circuit_builder_memory.test.cpp.

◆ TEST() [22/26]

bb::TEST ( UltraCircuitBuilder  ,
SortWidget   
)

◆ TEST() [23/26]

bb::TEST ( UltraCircuitBuilder  ,
SortWidgetComplex   
)

◆ TEST() [24/26]

bb::TEST ( UltraCircuitBuilder  ,
SortWidgetNeg   
)

◆ TEST() [25/26]

bb::TEST ( UltraCircuitBuilder  ,
SortWithEdgesGate   
)

◆ TEST() [26/26]

bb::TEST ( UltraCircuitBuilder  ,
TestNoLookupProof   
)

Definition at line 44 of file ultra_circuit_builder_basic.test.cpp.

◆ TEST_F() [1/30]

bb::TEST_F ( EccRelationsConsistency  ,
RecursiveToNativeConsistency   
)

Definition at line 49 of file ecc_relation_consistency.test.cpp.

◆ TEST_F() [2/30]

bb::TEST_F ( ECCVMRecursiveTests  ,
IndependentVKHash   
)

Definition at line 301 of file eccvm_recursive_verifier.test.cpp.

◆ TEST_F() [3/30]

bb::TEST_F ( ECCVMRecursiveTests  ,
SingleRecursiveVerification   
)

Definition at line 285 of file eccvm_recursive_verifier.test.cpp.

◆ TEST_F() [4/30]

bb::TEST_F ( ECCVMRecursiveTests  ,
SingleRecursiveVerificationFailure   
)

Definition at line 290 of file eccvm_recursive_verifier.test.cpp.

◆ TEST_F() [5/30]

bb::TEST_F ( ECCVMRecursiveTests  ,
SingleRecursiveVerificationFailureTamperedProof   
)

Definition at line 295 of file eccvm_recursive_verifier.test.cpp.

◆ TEST_F() [6/30]

bb::TEST_F ( IPATest  ,
AIsZeroAfterOneRound   
)

Definition at line 229 of file ipa.test.cpp.

◆ TEST_F() [7/30]

bb::TEST_F ( IPATest  ,
ChallengesAreZero   
)

Definition at line 185 of file ipa.test.cpp.

◆ TEST_F() [8/30]

bb::TEST_F ( KZGTest  ,
ConstantPolynomial   
)

Definition at line 94 of file kzg.test.cpp.

◆ TEST_F() [9/30]

bb::TEST_F ( KZGTest  ,
EmptyPolynomial   
)

Definition at line 103 of file kzg.test.cpp.

◆ TEST_F() [10/30]

bb::TEST_F ( KZGTest  ,
ShpleminiKzgShiftsRemoval   
)

Definition at line 257 of file kzg.test.cpp.

◆ TEST_F() [11/30]

bb::TEST_F ( KZGTest  ,
ShpleminiKzgWithShift   
)

Definition at line 145 of file kzg.test.cpp.

◆ TEST_F() [12/30]

bb::TEST_F ( KZGTest  ,
ShpleminiKzgWithShiftAndInterleaving   
)

Definition at line 198 of file kzg.test.cpp.

◆ TEST_F() [13/30]

bb::TEST_F ( KZGTest  ,
Single   
)

Definition at line 54 of file kzg.test.cpp.

◆ TEST_F() [14/30]

bb::TEST_F ( KZGTest  ,
SingleInLagrangeBasis   
)

Test opening proof of a polynomial given by its evaluations at \( i = 0, \ldots, n \). Should only be used for small values of \( n \).

Definition at line 117 of file kzg.test.cpp.

◆ TEST_F() [15/30]

bb::TEST_F ( KZGTest  ,
ZeroEvaluation   
)

Definition at line 64 of file kzg.test.cpp.

◆ TEST_F() [16/30]

bb::TEST_F ( KZGTest  ,
ZeroPolynomial   
)

Definition at line 77 of file kzg.test.cpp.

◆ TEST_F() [17/30]

bb::TEST_F ( MergeTranscriptTests  ,
ProverManifestConsistency   
)

Ensure consistency between the hardcoded manifest and the one generated by the merge prover.

Definition at line 595 of file merge.test.cpp.

◆ TEST_F() [18/30]

bb::TEST_F ( MergeTranscriptTests  ,
VerifierManifestConsistency   
)

Ensure consistency between prover and verifier manifests.

Definition at line 628 of file merge.test.cpp.

◆ TEST_F() [19/30]

bb::TEST_F ( ThreadTest  ,
BasicParallelFor   
)

Definition at line 28 of file thread.test.cpp.

◆ TEST_F() [20/30]

bb::TEST_F ( ThreadTest  ,
CalculateNumThreads   
)

Definition at line 42 of file thread.test.cpp.

◆ TEST_F() [21/30]

bb::TEST_F ( ThreadTest  ,
CalculateNumThreadsPow2   
)

Definition at line 65 of file thread.test.cpp.

◆ TEST_F() [22/30]

bb::TEST_F ( ThreadTest  ,
HardwareConcurrency   
)

Definition at line 153 of file thread.test.cpp.

◆ TEST_F() [23/30]

bb::TEST_F ( ThreadTest  ,
HardwareConcurrencyPow2   
)

Definition at line 169 of file thread.test.cpp.

◆ TEST_F() [24/30]

bb::TEST_F ( ThreadTest  ,
OneIteration   
)

Definition at line 94 of file thread.test.cpp.

◆ TEST_F() [25/30]

bb::TEST_F ( ThreadTest  ,
ParallelForRange   
)

Definition at line 107 of file thread.test.cpp.

◆ TEST_F() [26/30]

bb::TEST_F ( ThreadTest  ,
ParallelForRangeThreshold   
)

Definition at line 125 of file thread.test.cpp.

◆ TEST_F() [27/30]

bb::TEST_F ( ThreadTest  ,
SpawnedThreadsCanUseParallelFor   
)

Definition at line 194 of file thread.test.cpp.

◆ TEST_F() [28/30]

bb::TEST_F ( ThreadTest  ,
ZeroIterations   
)

Definition at line 84 of file thread.test.cpp.

◆ TEST_F() [29/30]

bb::TEST_F ( TranslatorRecursiveTests  ,
IndependentVKHash   
)

Definition at line 258 of file translator_recursive_verifier.test.cpp.

◆ TEST_F() [30/30]

bb::TEST_F ( TranslatorRecursiveTests  ,
SingleRecursiveVerification   
)

Definition at line 253 of file translator_recursive_verifier.test.cpp.

◆ transpile_artifact()

bool bb::transpile_artifact ( const std::string &  input_path,
const std::string &  output_path 
)

Transpile the artifact file (or copy if transpiler not enabled)

Definition at line 199 of file aztec_process.cpp.

◆ TYPED_TEST() [1/28]

bb::TYPED_TEST ( BatchedAffineAdditionTests  ,
Reduce   
)

Definition at line 28 of file batched_affine_addition.test.cpp.

◆ TYPED_TEST() [2/28]

bb::TYPED_TEST ( MergeTests  ,
DegreeCheckFailureAppend   
)

Definition at line 386 of file merge.test.cpp.

◆ TYPED_TEST() [3/28]

bb::TYPED_TEST ( MergeTests  ,
DegreeCheckFailurePrepend   
)

Definition at line 381 of file merge.test.cpp.

◆ TYPED_TEST() [4/28]

bb::TYPED_TEST ( MergeTests  ,
DifferentTranscriptOriginTagFailure   
)

Test that mixing values from different transcript instances causes instant failure.

Simulates a realistic scenario where a circuit contains two merge verifiers, each with their own transcript instance, and accidentally tries to use commitments from one verifier with the other verifier's transcript. This is a critical security vulnerability that the OriginTag system must detect.

The test creates two separate transcript instances (simulating two independent verifiers in the same circuit) and attempts to mix their values. The OriginTag system detects the parent tag mismatch and throws: "Tags from different transcripts were involved in the same computation"

Only runs in recursive context where OriginTag tracking is active.

Definition at line 424 of file merge.test.cpp.

◆ TYPED_TEST() [5/28]

bb::TYPED_TEST ( MergeTests  ,
EvalFailureAppend   
)

Definition at line 406 of file merge.test.cpp.

◆ TYPED_TEST() [6/28]

bb::TYPED_TEST ( MergeTests  ,
EvalFailurePrepend   
)

Definition at line 401 of file merge.test.cpp.

◆ TYPED_TEST() [7/28]

bb::TYPED_TEST ( MergeTests  ,
MergeFailureAppend   
)

Definition at line 396 of file merge.test.cpp.

◆ TYPED_TEST() [8/28]

bb::TYPED_TEST ( MergeTests  ,
MergeFailurePrepend   
)

Definition at line 391 of file merge.test.cpp.

◆ TYPED_TEST() [9/28]

bb::TYPED_TEST ( MergeTests  ,
MergePrependThenAppend   
)

Definition at line 376 of file merge.test.cpp.

◆ TYPED_TEST() [10/28]

bb::TYPED_TEST ( MergeTests  ,
MergeProofSizeCheck   
)

Definition at line 361 of file merge.test.cpp.

◆ TYPED_TEST() [11/28]

bb::TYPED_TEST ( MergeTests  ,
MultipleMergesPrepend   
)

Definition at line 371 of file merge.test.cpp.

◆ TYPED_TEST() [12/28]

bb::TYPED_TEST ( MergeTests  ,
SingleMerge   
)

Definition at line 366 of file merge.test.cpp.

◆ TYPED_TEST() [13/28]

bb::TYPED_TEST ( RecursiveVeriferCommitmentKeyTest  ,
EqualityTest   
)

Definition at line 40 of file verifier_commitment_key.test.cpp.

◆ TYPED_TEST() [14/28]

bb::TYPED_TEST ( ShpleminiTest  ,
CorrectnessOfGeminiClaimBatching   
)

Definition at line 146 of file shplemini.test.cpp.

◆ TYPED_TEST() [15/28]

bb::TYPED_TEST ( ShpleminiTest  ,
CorrectnessOfMultivariateClaimBatching   
)

Definition at line 52 of file shplemini.test.cpp.

◆ TYPED_TEST() [16/28]

bb::TYPED_TEST ( ShpleminiTest  ,
HighDegreeAttackAccept   
)

High degree attack test: prover commits to a higher degree polynomial than expected.

The polynomial is crafted such that it folds down to a constant (equal to the claimed evaluation) after the expected number of rounds. In this case, the verifier accepts. See: https://hackmd.io/zm5SDfBqTKKXGpI-zQHtpA?view

Definition at line 486 of file shplemini.test.cpp.

◆ TYPED_TEST() [17/28]

bb::TYPED_TEST ( ShpleminiTest  ,
HighDegreeAttackReject   
)

High degree attack test: prover commits to a random higher degree polynomial.

The polynomial does not fold down to a constant after the expected number of rounds. In this case, the verifier rejects with high probability.

Definition at line 558 of file shplemini.test.cpp.

◆ TYPED_TEST() [18/28]

bb::TYPED_TEST ( ShpleminiTest  ,
ShpleminiZKNoSumcheckOpenings   
)

Test Shplemini with ZK data consisting of a hiding polynomial generated by GeminiProver and Libra polynomials used to mask Sumcheck Round Univariates. This abstracts the PCS step in each ZK Flavor running over BN254.

Definition at line 263 of file shplemini.test.cpp.

◆ TYPED_TEST() [19/28]

bb::TYPED_TEST ( ShpleminiTest  ,
ShpleminiZKWithSumcheckOpenings   
)

Test Shplemini with ZK data consisting of a hiding polynomial generated by GeminiProver, Libra polynomials used to mask Sumcheck Round Univariates and prove/verify the claimed evaluations of committed sumcheck round univariates. This test abstracts the PCS step in each ZK Flavor running over Grumpkin.

Definition at line 376 of file shplemini.test.cpp.

◆ TYPED_TEST() [20/28]

bb::TYPED_TEST ( ShplonkTest  ,
ExportBatchClaimAndVerify   
)

Definition at line 92 of file shplonk.test.cpp.

◆ TYPED_TEST() [21/28]

bb::TYPED_TEST ( ShplonkTest  ,
ShplonkLinearlyDependent   
)

Definition at line 50 of file shplonk.test.cpp.

◆ TYPED_TEST() [22/28]

bb::TYPED_TEST ( ShplonkTest  ,
ShplonkSimple   
)

Definition at line 21 of file shplonk.test.cpp.

◆ TYPED_TEST() [23/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
LibraEvaluationsConsistency   
)

Definition at line 173 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST() [24/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
LibraEvaluationsConsistencyFailure   
)

Definition at line 210 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST() [25/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
ProverComputationsCorrectness   
)

Definition at line 52 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST() [26/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
TranslationMaskingTermConsistency   
)

Definition at line 255 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST() [27/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
TranslationMaskingTermConsistencyFailure   
)

Definition at line 307 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST() [28/28]

bb::TYPED_TEST ( SmallSubgroupIPATest  ,
VerifierEvaluations   
)

Definition at line 123 of file small_subgroup_ipa.test.cpp.

◆ TYPED_TEST_SUITE() [1/6]

bb::TYPED_TEST_SUITE ( BatchedAffineAdditionTests  ,
Curves   
)

◆ TYPED_TEST_SUITE() [2/6]

bb::TYPED_TEST_SUITE ( MergeTests  ,
CurveTypes   
)

◆ TYPED_TEST_SUITE() [3/6]

bb::TYPED_TEST_SUITE ( RecursiveVeriferCommitmentKeyTest  ,
Curves   
)

◆ TYPED_TEST_SUITE() [4/6]

bb::TYPED_TEST_SUITE ( ShpleminiTest  ,
TestSettings   
)

◆ TYPED_TEST_SUITE() [5/6]

bb::TYPED_TEST_SUITE ( ShplonkTest  ,
CurveTypes   
)

◆ TYPED_TEST_SUITE() [6/6]

bb::TYPED_TEST_SUITE ( SmallSubgroupIPATest  ,
TestFlavors   
)

◆ UltraCircuitChecker::check< MegaCircuitBuilder_< bb::fr > >()

◆ UltraCircuitChecker::init_empty_values< MegaCircuitBuilder_< bb::fr > >()

◆ UltraCircuitChecker::prepare_circuit< MegaCircuitBuilder_< bb::fr > >()

◆ unpack_from_file()

template<typename T >
T bb::unpack_from_file ( const std::filesystem::path &  filename)

Definition at line 56 of file private_execution_steps.cpp.

◆ unset_free_witness_tags()

template<bool in_circuit, typename DataType >
void bb::unset_free_witness_tags ( std::vector< DataType > &  input)
inline

Unsets free witness tags on all elements in a vector.

Only operates when in_circuit is true

Template Parameters
in_circuitWhether the transcript is in-circuit mode
DataTypeThe type of the elements in the vector
Parameters
inputThe vector of elements to process

Definition at line 261 of file origin_tag.hpp.

◆ write() [1/7]

template<typename B , typename FF >
void bb::write ( B &  buf,
arithmetic_triple_< FF > const &  constraint 
)
inline

Definition at line 93 of file gate_data.hpp.

◆ write() [2/7]

template<typename B , typename base_field , typename Params >
void bb::write ( B &  buf,
field2< base_field, Params > const &  value 
)

Definition at line 155 of file field2_declarations.hpp.

◆ write() [3/7]

template<typename B , typename Params >
void bb::write ( B &  buf,
field< Params > const &  value 
)

Definition at line 738 of file field_declarations.hpp.

◆ write() [4/7]

template<typename B , class Fr , size_t domain_end>
void bb::write ( B &  it,
Univariate< Fr, domain_end > const &  univariate 
)
inline

Definition at line 548 of file univariate.hpp.

◆ write() [5/7]

template<typename B , class Fr , size_t domain_end, bool has_a0_plus_a1>
void bb::write ( B &  it,
UnivariateCoefficientBasis< Fr, domain_end, has_a0_plus_a1 > const &  univariate 
)
inline

Definition at line 346 of file univariate_coefficient_basis.hpp.

◆ write() [6/7]

void bb::write ( std::vector< uint8_t > &  buf,
Chonk::VerificationKey const &  vk 
)
inline

Definition at line 366 of file chonk.hpp.

◆ write() [7/7]

template<typename PrecomputedCommitments , typename Transcript , VKSerializationMode SerializeMetadata>
void bb::write ( std::vector< uint8_t > &  buf,
NativeVerificationKey_< PrecomputedCommitments, Transcript, SerializeMetadata > const &  vk 
)
inline

Definition at line 567 of file flavor.hpp.

◆ write_curve_constants_msgpack_to_stdout()

void bb::write_curve_constants_msgpack_to_stdout ( )

Write msgpack-encoded curve constants to stdout.

Definition at line 90 of file curve_constants.cpp.

◆ write_file()

void bb::write_file ( const std::string &  filename,
std::vector< uint8_t > const &  data 
)
inline

Definition at line 58 of file file_io.hpp.

◆ zip_polys()

template<typename Poly , typename... Polys>
auto bb::zip_polys ( Poly &&  poly,
Polys &&...  polys 
)

Definition at line 534 of file polynomial.hpp.

Variable Documentation

◆ ADD_ASSIGN_SIZE

const size_t bb::ADD_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of ADD_ASSIGN instruction.

Definition at line 112 of file field.fuzzer.hpp.

◆ ADD_SIZE

const size_t bb::ADD_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3

Size of ADD instruction.

Definition at line 111 of file field.fuzzer.hpp.

◆ avm_enabled

const bool bb::avm_enabled = true

Definition at line 14 of file api_avm.cpp.

◆ BATCH_INVERT_SIZE

const size_t bb::BATCH_INVERT_SIZE
Initial value:
=
INSTRUCTION_HEADER_SIZE + INDEX_SIZE + sizeof(uint8_t)
const size_t INSTRUCTION_HEADER_SIZE
Size of instruction header in bytes.
const size_t INDEX_SIZE
Size of index field in bytes.

Size of BATCH_INVERT instruction.

Definition at line 133 of file field.fuzzer.hpp.

◆ BB_VERSION

const char* bb::BB_VERSION = BB_VERSION_PLACEHOLDER + BB_VERSION_SENTINEL_LEN
inline

Definition at line 14 of file version.hpp.

◆ BB_VERSION_PLACEHOLDER

const char *const bb::BB_VERSION_PLACEHOLDER = "BARRETENBERG_VERSION_SENTINEL00000000.00000000.00000000"

Definition at line 10 of file version.cpp.

◆ BB_VERSION_SENTINEL_LEN

constexpr size_t bb::BB_VERSION_SENTINEL_LEN = 29
constexpr

Definition at line 10 of file version.hpp.

◆ ck

Definition at line 20 of file ipa.fuzzer.cpp.

◆ COMMITMENT_TEST_NUM_BN254_POINTS

constexpr size_t bb::COMMITMENT_TEST_NUM_BN254_POINTS = 4096
constexpr

Definition at line 20 of file commitment_key.test.hpp.

◆ COMMITMENT_TEST_NUM_GRUMPKIN_POINTS

constexpr size_t bb::COMMITMENT_TEST_NUM_GRUMPKIN_POINTS = 1 << CONST_ECCVM_LOG_N
constexpr

Definition at line 21 of file commitment_key.test.hpp.

◆ COMMITMENT_TEST_NUM_POINTS

constexpr size_t bb::COMMITMENT_TEST_NUM_POINTS = 32
constexpr

Definition at line 18 of file ipa.fuzzer.cpp.

◆ DEFAULT_MIN_ITERS_PER_THREAD

const size_t bb::DEFAULT_MIN_ITERS_PER_THREAD = 1 << 4

Definition at line 96 of file thread.hpp.

◆ DIV_ASSIGN_SIZE

const size_t bb::DIV_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of DIV_ASSIGN instruction.

Definition at line 119 of file field.fuzzer.hpp.

◆ DIV_SIZE

const size_t bb::DIV_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3

Size of DIV instruction.

Definition at line 118 of file field.fuzzer.hpp.

◆ EQUAL_SIZE

const size_t bb::EQUAL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of EQUAL instruction.

Definition at line 127 of file field.fuzzer.hpp.

◆ FROM_MONTGOMERY_SIZE

const size_t bb::FROM_MONTGOMERY_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of FROM_MONTGOMERY instruction.

Definition at line 130 of file field.fuzzer.hpp.

◆ INCREMENT_SIZE

const size_t bb::INCREMENT_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE

Size of INCREMENT instruction.

Definition at line 113 of file field.fuzzer.hpp.

◆ INDEX_SIZE

const size_t bb::INDEX_SIZE = 1

Size of index field in bytes.

Definition at line 104 of file field.fuzzer.hpp.

◆ INSTRUCTION_HEADER_SIZE

const size_t bb::INSTRUCTION_HEADER_SIZE = 1

Size of instruction header in bytes.

Definition at line 103 of file field.fuzzer.hpp.

◆ INTERNAL_STATE_SIZE

const size_t bb::INTERNAL_STATE_SIZE = 32

Constant defining the number of elements in the VM's internal state.

Definition at line 30 of file field.fuzzer.hpp.

◆ INV_SIZE

const size_t bb::INV_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of INV instruction.

Definition at line 120 of file field.fuzzer.hpp.

◆ is_field_type_v

template<typename T >
constexpr bool bb::is_field_type_v = is_field_type<T>::value
inlineconstexpr

Definition at line 258 of file barycentric.hpp.

◆ IS_ZERO_SIZE

const size_t bb::IS_ZERO_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE

Size of IS_ZERO instruction.

Definition at line 126 of file field.fuzzer.hpp.

◆ MAX_LOG_NUM_GRUMPKIN_POINTS

constexpr size_t bb::MAX_LOG_NUM_GRUMPKIN_POINTS = 16
constexpr

Definition at line 231 of file commit.bench.cpp.

◆ MAX_LOG_NUM_POINTS

constexpr size_t bb::MAX_LOG_NUM_POINTS = 20
constexpr

Definition at line 91 of file commit.bench.cpp.

◆ MAX_NUM_GRUMPKIN_POINTS

constexpr size_t bb::MAX_NUM_GRUMPKIN_POINTS = 1 << MAX_LOG_NUM_GRUMPKIN_POINTS
constexpr

Definition at line 232 of file commit.bench.cpp.

◆ MAX_NUM_POINTS

constexpr size_t bb::MAX_NUM_POINTS = 1 << MAX_LOG_NUM_POINTS
constexpr

Definition at line 92 of file commit.bench.cpp.

◆ MIN_LOG_NUM_GRUMPKIN_POINTS

constexpr size_t bb::MIN_LOG_NUM_GRUMPKIN_POINTS = 12
constexpr

Definition at line 230 of file commit.bench.cpp.

◆ MIN_LOG_NUM_POINTS

constexpr size_t bb::MIN_LOG_NUM_POINTS = 16
constexpr

Definition at line 90 of file commit.bench.cpp.

◆ MUL_ASSIGN_SIZE

const size_t bb::MUL_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of MUL_ASSIGN instruction.

Definition at line 115 of file field.fuzzer.hpp.

◆ MUL_SIZE

const size_t bb::MUL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3

Size of MUL instruction.

Definition at line 114 of file field.fuzzer.hpp.

◆ NEG_SIZE

const size_t bb::NEG_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of NEG instruction.

Definition at line 121 of file field.fuzzer.hpp.

◆ NOT_EQUAL_SIZE

const size_t bb::NOT_EQUAL_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of NOT_EQUAL instruction.

Definition at line 128 of file field.fuzzer.hpp.

◆ NUM_DATABUS_COMMITMENTS

constexpr uint32_t bb::NUM_DATABUS_COMMITMENTS = 2
constexpr

Definition at line 16 of file databus.hpp.

◆ PARALLEL_FOR_MAX_NESTING

constexpr size_t bb::PARALLEL_FOR_MAX_NESTING = 2
constexpr

Definition at line 16 of file thread.hpp.

◆ PERMUTATION_ARGUMENT_VALUE_SEPARATOR

constexpr uint32_t bb::PERMUTATION_ARGUMENT_VALUE_SEPARATOR = 1 << 28
constexpr

Definition at line 9 of file constants.hpp.

◆ POW_SIZE

const size_t bb::POW_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3 + sizeof(uint64_t)

Size of POW instruction.

Definition at line 124 of file field.fuzzer.hpp.

◆ PROPAGATED_DATABUS_COMMITMENT_SIZE

constexpr uint32_t bb::PROPAGATED_DATABUS_COMMITMENT_SIZE = 8
constexpr

Definition at line 17 of file databus.hpp.

◆ PROPAGATED_DATABUS_COMMITMENTS_SIZE

constexpr uint32_t bb::PROPAGATED_DATABUS_COMMITMENTS_SIZE = PROPAGATED_DATABUS_COMMITMENT_SIZE * NUM_DATABUS_COMMITMENTS
constexpr

Definition at line 18 of file databus.hpp.

◆ REDUCE_ONCE_SIZE

const size_t bb::REDUCE_ONCE_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of REDUCE_ONCE instruction.

Definition at line 131 of file field.fuzzer.hpp.

◆ SELF_REDUCE_SIZE

const size_t bb::SELF_REDUCE_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE

Size of SELF_REDUCE instruction.

Definition at line 132 of file field.fuzzer.hpp.

◆ SET_VALUE_SIZE

const size_t bb::SET_VALUE_SIZE
Initial value:
=
INSTRUCTION_HEADER_SIZE + INDEX_SIZE + sizeof(numeric::uint256_t)

Size of SET_VALUE instruction.

Definition at line 109 of file field.fuzzer.hpp.

◆ SETTINGS_SIZE

const size_t bb::SETTINGS_SIZE = sizeof(VMSettings)

Definition at line 68 of file field.fuzzer.hpp.

◆ SPARSE_NUM_NONZERO

constexpr size_t bb::SPARSE_NUM_NONZERO = 100
constexpr

Definition at line 93 of file commit.bench.cpp.

◆ SQR_ASSIGN_SIZE

const size_t bb::SQR_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE

Size of SQR_ASSIGN instruction.

Definition at line 123 of file field.fuzzer.hpp.

◆ SQR_SIZE

const size_t bb::SQR_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of SQR instruction.

Definition at line 122 of file field.fuzzer.hpp.

◆ SQRT_SIZE

const size_t bb::SQRT_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of SQRT instruction.

Definition at line 125 of file field.fuzzer.hpp.

◆ SUB_ASSIGN_SIZE

const size_t bb::SUB_ASSIGN_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of SUB_ASSIGN instruction.

Definition at line 117 of file field.fuzzer.hpp.

◆ SUB_SIZE

const size_t bb::SUB_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 3

Size of SUB instruction.

Definition at line 116 of file field.fuzzer.hpp.

◆ TO_MONTGOMERY_SIZE

const size_t bb::TO_MONTGOMERY_SIZE = INSTRUCTION_HEADER_SIZE + INDEX_SIZE * 2

Size of TO_MONTGOMERY instruction.

Definition at line 129 of file field.fuzzer.hpp.

◆ unique_transcript_index

std::atomic<size_t> bb::unique_transcript_index { 0 }
inline

Definition at line 35 of file transcript.hpp.

◆ vk

Definition at line 21 of file ipa.fuzzer.cpp.