Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c0153a5
[empty] Start merge-train. Choo choo.
Jul 15, 2025
dfdc1b5
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
3efb90e
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
f447c5a
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
0772339
feat!: Merge with degree check (#15562)
federicobarbacovi Jul 15, 2025
ff8bd12
fix: Fix the docker build action for fuzzing (#15719)
Sarkoxed Jul 15, 2025
ecaa2d5
fix: restore accidentally deleted files (#15724)
johnathan79717 Jul 15, 2025
3eb8414
fix: civc wasm memory regression (#15722)
iakovenkos Jul 15, 2025
aa0f43c
feat: mmap backed polynomials (#15531)
johnathan79717 Jul 15, 2025
3ab6d4a
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
9bb979b
kernels start with eq and reset
Jul 15, 2025
cc9ba6e
cleanup
Jul 15, 2025
829b1a3
remove whitespace
Jul 15, 2025
0428551
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
917523f
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
ddfc800
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
2c3b398
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
37932f1
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
740b698
feat(bbapi): CLI uses bbapi CIVC (#15702)
ludamad Jul 15, 2025
8d0ef02
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
64640de
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
6595929
update vks
Jul 15, 2025
3e2eb01
Merge remote-tracking branch 'origin/merge-train/barretenberg' into m…
Jul 15, 2025
4f3ffc1
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
b8b1bf0
again
Jul 15, 2025
7297bfa
Merge branch 'next' into merge-train/barretenberg
Jul 15, 2025
1cbe628
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
4a951db
Merge remote-tracking branch 'origin/merge-train/barretenberg' into m…
Jul 16, 2025
65fe8a9
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
667ae09
fix issues
Jul 16, 2025
78bd2ed
Merge remote-tracking branch 'origin/merge-train/barretenberg' into m…
Jul 16, 2025
5de48f4
wopsie
Jul 16, 2025
43cfb9f
remove added archive and undo unnecessary modifications
Jul 16, 2025
9f27abb
[empty] Start merge-train. Choo choo.
Jul 16, 2025
6893736
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
6cd32ca
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
29c5a1f
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
921cd03
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
0968cf0
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
de7c071
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
8456fac
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
ad3dea5
Merge branch 'next' into merge-train/barretenberg
Jul 16, 2025
7ea4056
Merge branch 'next' into merge-train/barretenberg
Jul 17, 2025
8b71509
Merge branch 'next' into merge-train/barretenberg
Jul 17, 2025
b10e089
is kernel set only in the builder constructor
Jul 17, 2025
4d6cc06
Merge remote-tracking branch 'origin/merge-train/barretenberg' into m…
Jul 17, 2025
5ed5b7c
update vks
Jul 17, 2025
29d3baf
Merge remote-tracking branch 'origin/merge-train/barretenberg' into m…
Jul 18, 2025
745ac41
vks
Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
444 changes: 391 additions & 53 deletions avm-transpiler/Cargo.lock

Large diffs are not rendered by default.

Binary file added barretenberg/cpp/bb-civc-inputs.tar.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd ..
# - Generate a hash for versioning: sha256sum bb-civc-inputs.tar.gz
# - Upload the compressed results: aws s3 cp bb-civc-inputs.tar.gz s3://aztec-ci-artifacts/protocol/bb-civc-inputs-[hash(0:8)].tar.gz
# Note: In case of the "Test suite failed to run ... Unexpected token 'with' " error, need to run: docker pull aztecprotocol/build:3.0
pinned_civc_inputs_url="https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/protocol/bb-civc-inputs-ff124547.tar.gz"
pinned_civc_inputs_url="https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/protocol/bb-civc-inputs-c373cc52.tar.gz"

# For easily rerunning the inputs generation
if [[ "${1:-}" == "--update_inputs" ]]; then
Expand Down
3 changes: 0 additions & 3 deletions barretenberg/cpp/src/barretenberg/client_ivc/client_ivc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ ClientIVC::PairingPoints ClientIVC::perform_recursive_verification_and_databus_c
*/
void ClientIVC::complete_kernel_circuit_logic(ClientCircuit& circuit)
{
circuit.is_kernel = true;

// Transcript to be shared shared across recursive verification of the folding of K_{i-1} (kernel), A_{i,1} (app),
// .., A_{i, n} (app)
Expand Down Expand Up @@ -235,8 +234,6 @@ void ClientIVC::accumulate(ClientCircuit& circuit,
BB_ASSERT_LT(
num_circuits_accumulated, num_circuits, "ClientIVC: Attempting to accumulate more circuits than expected.");

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a closed so I removed it

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1454): Investigate whether is_kernel should be part of
// the circuit VK
if (circuit.is_kernel) {
// Transcript to be shared across folding of K_{i} (kernel), A_{i+1,1} (app), .., A_{i+1, n} (app)
accumulation_transcript = std::make_shared<Transcript>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class PrivateFunctionExecutionMockCircuitProducer {
// Assume only every second circuit is a kernel, unless force_is_kernel == true
bool is_kernel = (circuit_counter % 2 == 0) || force_is_kernel;

ClientCircuit circuit{ ivc.goblin.op_queue };
ClientCircuit circuit{ ivc.goblin.op_queue, is_kernel };
if (is_kernel) {
GoblinMockCircuits::construct_mock_folding_kernel(circuit); // construct mock base logic
mock_databus.populate_kernel_databus(circuit); // populate databus inputs/outputs
Expand Down Expand Up @@ -183,18 +183,17 @@ class ClientIVCMockCircuitProducer {
* only necessary if the structured trace is not in use).
*
*/
static ClientCircuit create_mock_circuit(ClientIVC& ivc, size_t log2_num_gates = 16)
static ClientCircuit create_mock_circuit(ClientIVC& ivc, size_t log2_num_gates = 16, bool is_kernel = false)
{
ClientCircuit circuit{ ivc.goblin.op_queue };
ClientCircuit circuit{ ivc.goblin.op_queue, is_kernel };
MockCircuits::construct_arithmetic_circuit(circuit, log2_num_gates, /* include_public_inputs= */ false);
return circuit;
}

public:
ClientCircuit create_next_circuit(ClientIVC& ivc, size_t log2_num_gates = 16, const size_t num_public_inputs = 0)
{

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was actually a kinda bug cus create_mock_circuit was recreating the circuit

ClientCircuit circuit{ ivc.goblin.op_queue };
circuit = create_mock_circuit(ivc, log2_num_gates); // construct mock base logic
ClientCircuit circuit = create_mock_circuit(ivc, log2_num_gates, is_kernel); // construct mock base logic
while (circuit.num_public_inputs() < num_public_inputs) {
circuit.add_public_variable(13634816); // arbitrary number
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,11 @@ template <> MegaCircuitBuilder create_circuit(AcirProgram& program, const Progra

auto op_queue = (metadata.ivc == nullptr) ? std::make_shared<ECCOpQueue>() : metadata.ivc->goblin.op_queue;

// If the incoming program is a kernel, it will have at least one ivc_recursion_constraint.
bool is_kernel = !constraints.ivc_recursion_constraints.empty();

// Construct a builder using the witness and public input data from acir and with the goblin-owned op_queue
auto builder = MegaCircuitBuilder{ op_queue, witness, constraints.public_inputs, constraints.varnum };
auto builder = MegaCircuitBuilder{ op_queue, witness, constraints.public_inputs, constraints.varnum, is_kernel };

// Populate constraints in the builder via the data in constraint_system
build_constraints(builder, program, metadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ template <typename FF_> class EccOpQueueRelationImpl {

template <typename FF> using EccOpQueueRelation = Relation<EccOpQueueRelationImpl<FF>>;

} // namespace bb
} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ template <typename FF> class MegaCircuitBuilder_ : public UltraCircuitBuilder_<M
public:
MegaCircuitBuilder_(const size_t size_hint = 0,
std::shared_ptr<ECCOpQueue> op_queue_in = std::make_shared<ECCOpQueue>(),
bool is_kernel = false,
MergeSettings settings = MergeSettings::PREPEND)
: UltraCircuitBuilder_<MegaExecutionTraceBlocks>(size_hint)
, op_queue(std::move(op_queue_in))
, is_kernel(is_kernel)
{
PROFILE_THIS();
// Instantiate the subtable to be populated with goblin ecc ops from this circuit. The merge settings indicate
Expand All @@ -62,10 +64,18 @@ template <typename FF> class MegaCircuitBuilder_ : public UltraCircuitBuilder_<M

// Set indices to constants corresponding to Goblin ECC op codes
set_goblin_ecc_op_code_constant_variables();

// If the incoming circuit is a kernel, start its subtable with an eq and reset operation to ensure a
// neighbouring misconfigured subtable cannot affect the current one.
if (is_kernel) {
queue_ecc_eq();
}
};

MegaCircuitBuilder_(std::shared_ptr<ECCOpQueue> op_queue_in, MergeSettings settings = MergeSettings::PREPEND)
: MegaCircuitBuilder_(0, op_queue_in, settings)
MegaCircuitBuilder_(std::shared_ptr<ECCOpQueue> op_queue_in,
bool is_kernel = false,
MergeSettings settings = MergeSettings::PREPEND)
: MegaCircuitBuilder_(0, op_queue_in, is_kernel, settings)
{}

/**
Expand All @@ -86,16 +96,24 @@ template <typename FF> class MegaCircuitBuilder_ : public UltraCircuitBuilder_<M
auto& witness_values,
const std::vector<uint32_t>& public_inputs,
size_t varnum,
bool is_kernel = false,
MergeSettings merge_settings = MergeSettings::PREPEND)
: UltraCircuitBuilder_<MegaExecutionTraceBlocks>(/*size_hint=*/0, witness_values, public_inputs, varnum)
, op_queue(std::move(op_queue_in))
, is_kernel(is_kernel)
{
// Instantiate the subtable to be populated with goblin ecc ops from this circuit. The merge settings indicate
// whether the subtable should be prepended or appended to the existing subtables from prior circuits.
op_queue->initialize_new_subtable(merge_settings);

// Set indices to constants corresponding to Goblin ECC op codes
set_goblin_ecc_op_code_constant_variables();

// If the incoming circuit is a kernel, start its subtable with an eq and reset operation to ensure a
// neighbouring misconfigured subtable cannot affect the current one.
if (is_kernel) {
queue_ecc_eq();
}
};

/**
Expand Down
Loading