Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8fb8b04
chore: remove round.cpp and round.hpp in dsl/acir_format (#19412)
nishatkoti Jan 8, 2026
0b67469
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
5861e91
chore: docs for translator (#19056)
suyash67 Jan 8, 2026
d4aff88
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
6e19652
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
654ba1a
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
c55e412
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
5cac8c6
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
76d642b
chore: update noir/noir-repo to match next branch
johnathan79717 Jan 8, 2026
bc9c343
chore: update avm-transpiler Cargo.lock for noir submodule
johnathan79717 Jan 8, 2026
62abebe
fix: revert noir/noir-repo to match next and update Cargo.lock
johnathan79717 Jan 8, 2026
5824b41
fix: add actionable error when bb verify cannot find vk file (#19398)
johnathan79717 Jan 8, 2026
4d4a5df
chore: `utils.cpp` audit (#19425)
federicobarbacovi Jan 8, 2026
eb5dd6d
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
78c8ba5
chore: sha audit 1 (#19072)
ledwards2225 Jan 8, 2026
c05b11d
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
22f1d45
fix: improve no artifacts found message to include search path (#19432)
critesjosh Jan 8, 2026
c779718
chore: simplify Flavors' Transcripts + VKs deduplication (#19326)
iakovenkos Jan 8, 2026
be16085
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
29e4a7b
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
77bf710
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
28719d9
Add correct VKSerializationMode to AVM VerificationKey Classes
iakovenkos Jan 8, 2026
c7c359a
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
25f68f7
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
569dd36
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
75db26c
Merge branch 'next' into merge-train/barretenberg
Jan 8, 2026
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
1,577 changes: 1,096 additions & 481 deletions avm-transpiler/Cargo.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "barretenberg/common/assert.hpp"
#include "barretenberg/stdlib/hash/blake2s/blake2s.hpp"
#include "barretenberg/stdlib/primitives/byte_array/byte_array.hpp"
#include "round.hpp"

namespace acir_format {

Expand All @@ -24,16 +23,12 @@ template <typename Builder> void create_blake2s_constraints(Builder& builder, co

for (const auto& witness_index_num_bits : constraint.inputs) {
auto witness_index = witness_index_num_bits.blackbox_input;
auto num_bits = witness_index_num_bits.num_bits;

// XXX: The implementation requires us to truncate the element to the nearest byte and not bit
auto num_bytes = round_to_nearest_byte(num_bits);
BB_ASSERT_LTE(num_bytes, 32U, "Input num_bytes exceeds 32 per element in blake2s");

field_ct element = to_field_ct(witness_index, builder);

// byte_array_ct(field, num_bytes) constructor adds range constraints for each byte
byte_array_ct element_bytes(element, num_bytes);
// byte_array_ct(field, num_bytes) constructor adds range constraints for each byte. Note that num_bytes =
// ceil(witness_index_num_bits.num_bits/8). Here, num_bits is set to 8 when constructing the vector of inputs in
// the Blake2s constraint. Hence, we set num_bytes = 1.
byte_array_ct element_bytes(element, 1);

// Safe write: both arr and element_bytes are constrained
arr.write(element_bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "barretenberg/common/assert.hpp"
#include "barretenberg/stdlib/hash/blake3s/blake3s.hpp"
#include "barretenberg/stdlib/primitives/byte_array/byte_array.hpp"
#include "round.hpp"

namespace acir_format {

Expand All @@ -22,15 +21,12 @@ template <typename Builder> void create_blake3_constraints(Builder& builder, con

for (const auto& witness_index_num_bits : constraint.inputs) {
auto witness_index = witness_index_num_bits.blackbox_input;
auto num_bits = witness_index_num_bits.num_bits;

// XXX: The implementation requires us to truncate the element to the nearest byte and not bit
auto num_bytes = round_to_nearest_byte(num_bits);
BB_ASSERT_LTE(num_bytes, 32U, "Input num_bytes exceeds 32 per element in blake3s");
field_ct element = to_field_ct(witness_index, builder);

// byte_array_ct(field, num_bytes) constructor adds range constraints for each byte
byte_array_ct element_bytes(element, num_bytes);
// byte_array_ct(field, num_bytes) constructor adds range constraints for each byte. Note that num_bytes =
// ceil(witness_index_num_bits.num_bits/8). Here, num_bits is set to 8 when constructing the vector of inputs in
// the Blake3 constraint. Hence, we set num_bytes = 1.
byte_array_ct element_bytes(element, 1);

// Safe write: both arr and element_bytes are constrained
arr.write(element_bytes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ template <typename Builder> inline constexpr size_t ECDSA_SECP256K1 = 41994 + ZE
template <typename Builder>
inline constexpr size_t ECDSA_SECP256R1 = 72209 + ZERO_GATE + (IsMegaBuilder<Builder> ? 2 : 0);

template <typename Builder> inline constexpr size_t BLAKE2S = 2959 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t BLAKE3 = 2165 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t BLAKE2S = 2952 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t BLAKE3 = 2158 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t KECCAK_PERMUTATION = 17387 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t POSEIDON2_PERMUTATION = 73 + ZERO_GATE + MEGA_OFFSET<Builder>;
template <typename Builder> inline constexpr size_t MULTI_SCALAR_MUL = 3550 + ZERO_GATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "keccak_constraint.hpp"
#include "barretenberg/stdlib/hash/keccak/keccak.hpp"
#include "barretenberg/stdlib/primitives/circuit_builders/circuit_builders_fwd.hpp"
#include "round.hpp"

namespace acir_format {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ TYPED_TEST(OpcodeGateCountTests, Blake2s)

blake2s_constraint.inputs.push_back(Blake2sInput{
.blackbox_input = WitnessOrConstant<bb::fr>::from_index(0),
.num_bits = 32,
.num_bits = 8,
});

for (size_t i = 0; i < 32; ++i) {
Expand Down Expand Up @@ -466,7 +466,7 @@ TYPED_TEST(OpcodeGateCountTests, Blake3)

blake3_constraint.inputs.push_back(Blake3Input{
.blackbox_input = WitnessOrConstant<bb::fr>::from_index(0),
.num_bits = 32,
.num_bits = 8,
});

for (size_t i = 0; i < 32; ++i) {
Expand Down
29 changes: 0 additions & 29 deletions barretenberg/cpp/src/barretenberg/dsl/acir_format/round.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions barretenberg/cpp/src/barretenberg/dsl/acir_format/round.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "sha256_constraint.hpp"
#include "barretenberg/serialize/msgpack_impl.hpp"
#include "barretenberg/stdlib/hash/sha256/sha256.hpp"
#include "round.hpp"

namespace acir_format {

Expand Down
Loading
Loading