33 for (
size_t i = 0; i < num_iterations; i++) {
42static constexpr TraceStructure SMALL_TEST_STRUCTURE_FOR_OVERFLOWS{ .
ecc_op = 1 << 14,
45 .pub_inputs = 1 << 14,
46 .arithmetic = 1 << 15,
47 .delta_range = 1 << 14,
51 .poseidon2_external = 1 << 14,
52 .poseidon2_internal = 1 << 15,
89 generate_sha256_test_circuit<MegaBuilder>(
builder, 9);
92 generate_sha256_test_circuit<MegaBuilder>(
builder, 8);
115 for (
size_t i = 0; i < 3; ++i) {
116 auto point = Point::random_element(&
engine);
118 builder.queue_ecc_add_accum(point);
119 builder.queue_ecc_mul_accum(point, scalar);
131 for (
size_t i = 0; i < num_ops; ++i) {
152 for (
size_t idx = 0; idx < num_circuits - 1; ++idx) {
154 if (idx == num_circuits - 2) {
184 const size_t NUM_ECDSA_VERIFICATIONS = 2;
185 const size_t NUM_SHA_HASHES = 10;
187 generate_sha256_test_circuit<MegaBuilder>(
builder, NUM_SHA_HASHES);
CommitmentKey object over a pairing group 𝔾₁.
Used to construct execution trace representations of elliptic curve operations.
void prove_merge(const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >(), const MergeSettings merge_settings=MergeSettings::PREPEND)
Construct a merge proof for the goblin ECC ops in the provided circuit; append the proof to the merge...
std::shared_ptr< OpQueue > op_queue
std::deque< MergeProof > merge_verification_queue
Curve::AffineElement Point
static void add_some_ecc_op_gates(MegaBuilder &builder)
Generate a simple test circuit with some ECC op gates and conventional arithmetic gates.
static void construct_mock_app_circuit(MegaBuilder &builder, bool large=false)
Populate a builder with some arbitrary but nontrivial constraints.
static void construct_simple_circuit(MegaBuilder &builder)
Generate a simple test circuit with some ECC op gates and conventional arithmetic gates.
static void construct_mock_folding_kernel(MegaBuilder &builder)
Construct a mock kernel circuit.
static void randomise_op_queue(MegaBuilder &builder, size_t num_ops)
Add some randomness into the op queue.
RecursiveVerifierInstance::VKAndHash RecursiveVKAndHash
static void construct_and_merge_mock_circuits(Goblin &goblin, const size_t num_circuits=3)
static constexpr size_t NUM_WIRES
std::shared_ptr< RecursiveVerifierInstance > RecursiveVerifierAccumulator
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
static constexpr size_t NUM_WIRES
The recursive counterpart to the "native" Mega flavor.
static void construct_arithmetic_circuit(Builder &builder, const size_t target_log2_dyadic_size=4, bool include_public_inputs=true)
Populate a builder with a specified number of arithmetic gates; includes a PI.
static void construct_goblin_ecc_op_circuit(MegaCircuitBuilder &builder)
Populate a builder with some arbitrary goblinized ECC ops, one of each type.
static constexpr size_t NUM_RANDOM_OPS_END
static constexpr size_t NUM_RANDOM_OPS_START
The VerifierInstance encapsulates all the necessary information for a Mega Honk Verifier to verify a ...
typename Group::affine_element AffineElement
static byte_array< Builder > hash(const byte_array_ct &input)
Represents a dynamic array of bytes in-circuit.
static void add_default(Builder &builder)
Add default public inputs when they are not present.
The stdlib counterpart of VerifierInstance, used in recursive folding verification.
typename Flavor::VKAndHash VKAndHash
void generate_ecdsa_verification_test_circuit(Builder &builder, size_t num_iterations)
Generate a simple ecdsa verification circuit for testing purposes.
Entry point for Barretenberg command-line interface.
void generate_sha256_test_circuit(Builder &builder, size_t num_iterations)
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static field random_element(numeric::RNG *engine=nullptr) noexcept