Skip to content

Commit 636c9e9

Browse files
committed
Merge remote-tracking branch 'origin/master' into 6304-sha-msg-block-size
2 parents c600000 + 8dec847 commit 636c9e9

File tree

409 files changed

+16054
-6571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+16054
-6571
lines changed

.aztec-sync-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
670af8a158633d106a3f1df82dbd28ef9a9e4ceb
1+
ab0c80d7493e6bdbc58dcd517b248de6ddd6fd67

Cargo.lock

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acvm-repo/acir/codegen/acir.cpp

Lines changed: 97 additions & 365 deletions
Large diffs are not rendered by default.

acvm-repo/acir/src/circuit/black_box_functions.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ pub enum BlackBoxFunc {
7676
///
7777
/// [grumpkin]: https://hackmd.io/@aztec-network/ByzgNxBfd#2-Grumpkin---A-curve-on-top-of-BN-254-for-SNARK-efficient-group-operations
7878
SchnorrVerify,
79-
/// Will be deprecated
80-
PedersenCommitment,
81-
/// Will be deprecated
82-
PedersenHash,
8379
/// Verifies a ECDSA signature over the secp256k1 curve.
8480
/// - inputs:
8581
/// - x coordinate of public key as 32 bytes
@@ -117,11 +113,6 @@ pub enum BlackBoxFunc {
117113
/// scalar $a$: `a=low+high*2^{128}`, with `low, high < 2^{128}`
118114
MultiScalarMul,
119115

120-
/// Computes the Keccak-256 (Ethereum version) of the inputs.
121-
/// - inputs: Vector of bytes (witness, 8)
122-
/// - outputs: Array of 32 bytes (witness, 8)
123-
Keccak256,
124-
125116
/// Keccak Permutation function of width 1600
126117
/// - inputs: An array of 25 64-bit Keccak lanes that represent a keccak sponge of 1600 bits
127118
/// - outputs: The result of a keccak f1600 permutation on the input state. Also an array of 25 Keccak lanes.
@@ -216,7 +207,6 @@ impl BlackBoxFunc {
216207
BlackBoxFunc::AND => "and",
217208
BlackBoxFunc::XOR => "xor",
218209
BlackBoxFunc::RANGE => "range",
219-
BlackBoxFunc::Keccak256 => "keccak256",
220210
BlackBoxFunc::Keccakf1600 => "keccakf1600",
221211
BlackBoxFunc::RecursiveAggregation => "recursive_aggregation",
222212
BlackBoxFunc::EcdsaSecp256r1 => "ecdsa_secp256r1",
@@ -228,8 +218,6 @@ impl BlackBoxFunc {
228218
BlackBoxFunc::BigIntToLeBytes => "bigint_to_le_bytes",
229219
BlackBoxFunc::Poseidon2Permutation => "poseidon2_permutation",
230220
BlackBoxFunc::Sha256Compression => "sha256_compression",
231-
BlackBoxFunc::PedersenCommitment => "pedersen_commitment",
232-
BlackBoxFunc::PedersenHash => "pedersen_hash",
233221
}
234222
}
235223

@@ -246,7 +234,6 @@ impl BlackBoxFunc {
246234
"and" => Some(BlackBoxFunc::AND),
247235
"xor" => Some(BlackBoxFunc::XOR),
248236
"range" => Some(BlackBoxFunc::RANGE),
249-
"keccak256" => Some(BlackBoxFunc::Keccak256),
250237
"keccakf1600" => Some(BlackBoxFunc::Keccakf1600),
251238
"recursive_aggregation" => Some(BlackBoxFunc::RecursiveAggregation),
252239
"bigint_add" => Some(BlackBoxFunc::BigIntAdd),
@@ -257,8 +244,6 @@ impl BlackBoxFunc {
257244
"bigint_to_le_bytes" => Some(BlackBoxFunc::BigIntToLeBytes),
258245
"poseidon2_permutation" => Some(BlackBoxFunc::Poseidon2Permutation),
259246
"sha256_compression" => Some(BlackBoxFunc::Sha256Compression),
260-
"pedersen_commitment" => Some(BlackBoxFunc::PedersenCommitment),
261-
"pedersen_hash" => Some(BlackBoxFunc::PedersenHash),
262247
_ => None,
263248
}
264249
}

acvm-repo/acir/src/circuit/opcodes/black_box_function_call.rs

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,6 @@ pub enum BlackBoxFuncCall<F> {
117117
message: Vec<FunctionInput<F>>,
118118
output: Witness,
119119
},
120-
/// Will be deprecated
121-
PedersenCommitment {
122-
inputs: Vec<FunctionInput<F>>,
123-
domain_separator: u32,
124-
outputs: (Witness, Witness),
125-
},
126-
/// Will be deprecated
127-
PedersenHash {
128-
inputs: Vec<FunctionInput<F>>,
129-
domain_separator: u32,
130-
output: Witness,
131-
},
132120
EcdsaSecp256k1 {
133121
public_key_x: Box<[FunctionInput<F>; 32]>,
134122
public_key_y: Box<[FunctionInput<F>; 32]>,
@@ -161,15 +149,6 @@ pub enum BlackBoxFuncCall<F> {
161149
input2: Box<[FunctionInput<F>; 3]>,
162150
outputs: (Witness, Witness, Witness),
163151
},
164-
Keccak256 {
165-
inputs: Vec<FunctionInput<F>>,
166-
/// This is the number of bytes to take
167-
/// from the input. Note: if `var_message_size`
168-
/// is more than the number of bytes in the input,
169-
/// then an error is returned.
170-
var_message_size: FunctionInput<F>,
171-
outputs: Box<[Witness; 32]>,
172-
},
173152
Keccakf1600 {
174153
inputs: Box<[FunctionInput<F>; 25]>,
175154
outputs: Box<[Witness; 25]>,
@@ -258,7 +237,6 @@ impl<F: Copy> BlackBoxFuncCall<F> {
258237
BlackBoxFuncCall::EcdsaSecp256r1 { .. } => BlackBoxFunc::EcdsaSecp256r1,
259238
BlackBoxFuncCall::MultiScalarMul { .. } => BlackBoxFunc::MultiScalarMul,
260239
BlackBoxFuncCall::EmbeddedCurveAdd { .. } => BlackBoxFunc::EmbeddedCurveAdd,
261-
BlackBoxFuncCall::Keccak256 { .. } => BlackBoxFunc::Keccak256,
262240
BlackBoxFuncCall::Keccakf1600 { .. } => BlackBoxFunc::Keccakf1600,
263241
BlackBoxFuncCall::RecursiveAggregation { .. } => BlackBoxFunc::RecursiveAggregation,
264242
BlackBoxFuncCall::BigIntAdd { .. } => BlackBoxFunc::BigIntAdd,
@@ -269,8 +247,6 @@ impl<F: Copy> BlackBoxFuncCall<F> {
269247
BlackBoxFuncCall::BigIntToLeBytes { .. } => BlackBoxFunc::BigIntToLeBytes,
270248
BlackBoxFuncCall::Poseidon2Permutation { .. } => BlackBoxFunc::Poseidon2Permutation,
271249
BlackBoxFuncCall::Sha256Compression { .. } => BlackBoxFunc::Sha256Compression,
272-
BlackBoxFuncCall::PedersenCommitment { .. } => BlackBoxFunc::PedersenCommitment,
273-
BlackBoxFuncCall::PedersenHash { .. } => BlackBoxFunc::PedersenHash,
274250
}
275251
}
276252

@@ -284,8 +260,6 @@ impl<F: Copy> BlackBoxFuncCall<F> {
284260
| BlackBoxFuncCall::Blake2s { inputs, .. }
285261
| BlackBoxFuncCall::Blake3 { inputs, .. }
286262
| BlackBoxFuncCall::BigIntFromLeBytes { inputs, .. }
287-
| BlackBoxFuncCall::PedersenCommitment { inputs, .. }
288-
| BlackBoxFuncCall::PedersenHash { inputs, .. }
289263
| BlackBoxFuncCall::Poseidon2Permutation { inputs, .. } => inputs.to_vec(),
290264

291265
BlackBoxFuncCall::Keccakf1600 { inputs, .. } => inputs.to_vec(),
@@ -365,11 +339,6 @@ impl<F: Copy> BlackBoxFuncCall<F> {
365339
inputs.extend(hashed_message.iter().copied());
366340
inputs
367341
}
368-
BlackBoxFuncCall::Keccak256 { inputs, var_message_size, .. } => {
369-
let mut inputs = inputs.clone();
370-
inputs.push(*var_message_size);
371-
inputs
372-
}
373342
BlackBoxFuncCall::RecursiveAggregation {
374343
verification_key: key,
375344
proof,
@@ -390,8 +359,7 @@ impl<F: Copy> BlackBoxFuncCall<F> {
390359
pub fn get_outputs_vec(&self) -> Vec<Witness> {
391360
match self {
392361
BlackBoxFuncCall::Blake2s { outputs, .. }
393-
| BlackBoxFuncCall::Blake3 { outputs, .. }
394-
| BlackBoxFuncCall::Keccak256 { outputs, .. } => outputs.to_vec(),
362+
| BlackBoxFuncCall::Blake3 { outputs, .. } => outputs.to_vec(),
395363

396364
BlackBoxFuncCall::Keccakf1600 { outputs, .. } => outputs.to_vec(),
397365

@@ -404,9 +372,7 @@ impl<F: Copy> BlackBoxFuncCall<F> {
404372
| BlackBoxFuncCall::XOR { output, .. }
405373
| BlackBoxFuncCall::SchnorrVerify { output, .. }
406374
| BlackBoxFuncCall::EcdsaSecp256k1 { output, .. }
407-
| BlackBoxFuncCall::PedersenHash { output, .. }
408375
| BlackBoxFuncCall::EcdsaSecp256r1 { output, .. } => vec![*output],
409-
BlackBoxFuncCall::PedersenCommitment { outputs, .. } => vec![outputs.0, outputs.1],
410376
BlackBoxFuncCall::MultiScalarMul { outputs, .. }
411377
| BlackBoxFuncCall::EmbeddedCurveAdd { outputs, .. } => {
412378
vec![outputs.0, outputs.1, outputs.2]
@@ -479,14 +445,6 @@ fn get_outputs_string(outputs: &[Witness]) -> String {
479445

480446
impl<F: std::fmt::Display + Copy> std::fmt::Display for BlackBoxFuncCall<F> {
481447
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
482-
match self {
483-
BlackBoxFuncCall::PedersenCommitment { .. } => {
484-
return write!(f, "BLACKBOX::Deprecated")
485-
}
486-
BlackBoxFuncCall::PedersenHash { .. } => return write!(f, "BLACKBOX::Deprecated"),
487-
_ => (),
488-
}
489-
490448
let uppercase_name = self.name().to_uppercase();
491449
write!(f, "BLACKBOX::{uppercase_name} ")?;
492450
// INPUTS

acvm-repo/acir/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mod reflection {
3535
use acir_field::FieldElement;
3636
use brillig::{
3737
BinaryFieldOp, BinaryIntOp, BitSize, BlackBoxOp, HeapValueType, IntegerBitSize,
38-
Opcode as BrilligOpcode, ValueOrArray,
38+
MemoryAddress, Opcode as BrilligOpcode, ValueOrArray,
3939
};
4040
use serde_reflection::{Tracer, TracerConfig};
4141

@@ -84,6 +84,7 @@ mod reflection {
8484
tracer.trace_simple_type::<ExpressionOrMemory<FieldElement>>().unwrap();
8585
tracer.trace_simple_type::<BitSize>().unwrap();
8686
tracer.trace_simple_type::<IntegerBitSize>().unwrap();
87+
tracer.trace_simple_type::<MemoryAddress>().unwrap();
8788

8889
let registry = tracer.registry().unwrap();
8990

acvm-repo/acir/tests/test_program_serialization.rs

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ fn multi_scalar_mul_circuit() {
9191
let bytes = Program::serialize_program(&program);
9292

9393
let expected_serialization: Vec<u8> = vec![
94-
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 141, 11, 10, 0, 32, 8, 67, 43, 181, 15, 221, 255,
95-
186, 145, 210, 130, 149, 240, 112, 234, 212, 156, 78, 12, 39, 67, 71, 158, 142, 80, 29, 44,
96-
228, 66, 90, 168, 119, 189, 74, 115, 131, 174, 78, 115, 58, 124, 70, 254, 130, 59, 74, 253,
97-
68, 255, 255, 221, 39, 54, 29, 134, 27, 102, 193, 0, 0, 0,
94+
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 93, 77, 9, 14, 0, 32, 8, 202, 171, 227, 255, 255, 109,
95+
217, 162, 141, 114, 99, 2, 162, 74, 57, 53, 18, 2, 46, 208, 70, 122, 99, 162, 43, 113, 35,
96+
239, 102, 157, 230, 1, 94, 19, 45, 209, 145, 11, 202, 43, 238, 56, 249, 133, 254, 255, 187,
97+
79, 45, 204, 84, 220, 246, 193, 0, 0, 0,
9898
];
9999

100100
assert_eq!(bytes, expected_serialization)
@@ -165,25 +165,25 @@ fn simple_brillig_foreign_call() {
165165
let brillig_bytecode = BrilligBytecode {
166166
bytecode: vec![
167167
brillig::Opcode::Const {
168-
destination: MemoryAddress(0),
168+
destination: MemoryAddress::direct(0),
169169
bit_size: BitSize::Integer(IntegerBitSize::U32),
170170
value: FieldElement::from(1_usize),
171171
},
172172
brillig::Opcode::Const {
173-
destination: MemoryAddress(1),
173+
destination: MemoryAddress::direct(1),
174174
bit_size: BitSize::Integer(IntegerBitSize::U32),
175175
value: FieldElement::from(0_usize),
176176
},
177177
brillig::Opcode::CalldataCopy {
178-
destination_address: MemoryAddress(0),
179-
size_address: MemoryAddress(0),
180-
offset_address: MemoryAddress(1),
178+
destination_address: MemoryAddress::direct(0),
179+
size_address: MemoryAddress::direct(0),
180+
offset_address: MemoryAddress::direct(1),
181181
},
182182
brillig::Opcode::ForeignCall {
183183
function: "invert".into(),
184-
destinations: vec![ValueOrArray::MemoryAddress(MemoryAddress::from(0))],
184+
destinations: vec![ValueOrArray::MemoryAddress(MemoryAddress::direct(0))],
185185
destination_value_types: vec![HeapValueType::field()],
186-
inputs: vec![ValueOrArray::MemoryAddress(MemoryAddress::from(0))],
186+
inputs: vec![ValueOrArray::MemoryAddress(MemoryAddress::direct(0))],
187187
input_value_types: vec![HeapValueType::field()],
188188
},
189189
brillig::Opcode::Stop { return_data_offset: 0, return_data_size: 1 },
@@ -214,12 +214,12 @@ fn simple_brillig_foreign_call() {
214214
let bytes = Program::serialize_program(&program);
215215

216216
let expected_serialization: Vec<u8> = vec![
217-
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 173, 81, 73, 10, 192, 48, 8, 140, 165, 91, 160, 183,
218-
126, 196, 254, 160, 159, 233, 161, 151, 30, 74, 200, 251, 19, 136, 130, 132, 196, 75, 28,
219-
16, 199, 17, 212, 65, 112, 5, 123, 14, 32, 190, 80, 230, 90, 130, 181, 155, 50, 142, 225,
220-
2, 187, 89, 40, 239, 157, 106, 2, 82, 116, 138, 51, 118, 239, 171, 222, 108, 232, 218, 139,
221-
125, 198, 179, 113, 83, 188, 29, 57, 86, 226, 239, 23, 159, 63, 104, 63, 238, 213, 45, 237,
222-
108, 244, 18, 195, 174, 252, 193, 92, 2, 0, 0,
217+
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 173, 79, 73, 10, 128, 48, 12, 204, 40, 46, 5, 111, 126,
218+
36, 254, 192, 207, 120, 240, 226, 65, 196, 247, 91, 48, 129, 80, 218, 122, 48, 3, 33, 147,
219+
9, 89, 6, 244, 98, 140, 1, 225, 157, 100, 173, 45, 84, 91, 37, 243, 63, 44, 240, 219, 197,
220+
246, 223, 38, 37, 176, 34, 85, 156, 169, 251, 144, 233, 183, 142, 206, 67, 114, 215, 121,
221+
63, 15, 84, 135, 222, 157, 98, 244, 194, 247, 227, 222, 206, 11, 31, 19, 165, 186, 164,
222+
207, 153, 222, 3, 91, 101, 84, 220, 120, 2, 0, 0,
223223
];
224224

225225
assert_eq!(bytes, expected_serialization)
@@ -242,55 +242,61 @@ fn complex_brillig_foreign_call() {
242242
let brillig_bytecode = BrilligBytecode {
243243
bytecode: vec![
244244
brillig::Opcode::Const {
245-
destination: MemoryAddress(0),
245+
destination: MemoryAddress::direct(0),
246246
bit_size: BitSize::Integer(IntegerBitSize::U32),
247247
value: FieldElement::from(3_usize),
248248
},
249249
brillig::Opcode::Const {
250-
destination: MemoryAddress(1),
250+
destination: MemoryAddress::direct(1),
251251
bit_size: BitSize::Integer(IntegerBitSize::U32),
252252
value: FieldElement::from(0_usize),
253253
},
254254
brillig::Opcode::CalldataCopy {
255-
destination_address: MemoryAddress(32),
256-
size_address: MemoryAddress(0),
257-
offset_address: MemoryAddress(1),
255+
destination_address: MemoryAddress::direct(32),
256+
size_address: MemoryAddress::direct(0),
257+
offset_address: MemoryAddress::direct(1),
258258
},
259259
brillig::Opcode::Const {
260-
destination: MemoryAddress(0),
260+
destination: MemoryAddress::direct(0),
261261
value: FieldElement::from(32_usize),
262262
bit_size: BitSize::Integer(IntegerBitSize::U32),
263263
},
264264
brillig::Opcode::Const {
265-
destination: MemoryAddress(3),
265+
destination: MemoryAddress::direct(3),
266266
bit_size: BitSize::Integer(IntegerBitSize::U32),
267267
value: FieldElement::from(1_usize),
268268
},
269269
brillig::Opcode::Const {
270-
destination: MemoryAddress(4),
270+
destination: MemoryAddress::direct(4),
271271
bit_size: BitSize::Integer(IntegerBitSize::U32),
272272
value: FieldElement::from(3_usize),
273273
},
274274
brillig::Opcode::CalldataCopy {
275-
destination_address: MemoryAddress(1),
276-
size_address: MemoryAddress(3),
277-
offset_address: MemoryAddress(4),
275+
destination_address: MemoryAddress::direct(1),
276+
size_address: MemoryAddress::direct(3),
277+
offset_address: MemoryAddress::direct(4),
278278
},
279279
// Oracles are named 'foreign calls' in brillig
280280
brillig::Opcode::ForeignCall {
281281
function: "complex".into(),
282282
inputs: vec![
283-
ValueOrArray::HeapArray(HeapArray { pointer: 0.into(), size: 3 }),
284-
ValueOrArray::MemoryAddress(MemoryAddress::from(1)),
283+
ValueOrArray::HeapArray(HeapArray {
284+
pointer: MemoryAddress::direct(0),
285+
size: 3,
286+
}),
287+
ValueOrArray::MemoryAddress(MemoryAddress::direct(1)),
285288
],
286289
input_value_types: vec![
287290
HeapValueType::Array { size: 3, value_types: vec![HeapValueType::field()] },
288291
HeapValueType::field(),
289292
],
290293
destinations: vec![
291-
ValueOrArray::HeapArray(HeapArray { pointer: 0.into(), size: 3 }),
292-
ValueOrArray::MemoryAddress(MemoryAddress::from(35)),
293-
ValueOrArray::MemoryAddress(MemoryAddress::from(36)),
294+
ValueOrArray::HeapArray(HeapArray {
295+
pointer: MemoryAddress::direct(0),
296+
size: 3,
297+
}),
298+
ValueOrArray::MemoryAddress(MemoryAddress::direct(35)),
299+
ValueOrArray::MemoryAddress(MemoryAddress::direct(36)),
294300
],
295301
destination_value_types: vec![
296302
HeapValueType::Array { size: 3, value_types: vec![HeapValueType::field()] },
@@ -338,17 +344,17 @@ fn complex_brillig_foreign_call() {
338344

339345
let bytes = Program::serialize_program(&program);
340346
let expected_serialization: Vec<u8> = vec![
341-
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 213, 85, 81, 14, 194, 48, 8, 133, 118, 186, 53, 241,
342-
207, 11, 152, 232, 1, 58, 189, 128, 119, 49, 254, 105, 244, 211, 227, 59, 50, 154, 49, 214,
343-
100, 31, 163, 201, 246, 146, 133, 174, 5, 10, 15, 72, 17, 122, 52, 221, 135, 188, 222, 177,
344-
116, 44, 105, 223, 195, 24, 73, 247, 206, 50, 46, 67, 139, 118, 190, 98, 169, 24, 221, 6,
345-
98, 244, 5, 98, 4, 81, 255, 21, 214, 219, 178, 46, 166, 252, 249, 204, 252, 84, 208, 207,
346-
215, 158, 255, 107, 150, 141, 38, 154, 140, 28, 76, 7, 111, 132, 212, 61, 65, 201, 116, 86,
347-
217, 101, 115, 11, 226, 62, 99, 223, 145, 88, 56, 205, 228, 102, 127, 239, 53, 6, 69, 184,
348-
97, 78, 109, 96, 127, 37, 106, 81, 11, 126, 100, 103, 17, 14, 48, 116, 213, 227, 243, 254,
349-
190, 158, 63, 175, 40, 149, 102, 132, 179, 88, 95, 212, 57, 42, 59, 109, 43, 33, 31, 140,
350-
156, 46, 102, 244, 230, 124, 31, 97, 104, 141, 244, 48, 253, 1, 180, 46, 168, 159, 181, 6,
351-
0, 0,
347+
31, 139, 8, 0, 0, 0, 0, 0, 0, 255, 213, 85, 93, 10, 194, 48, 12, 78, 155, 233, 54, 240,
348+
205, 11, 8, 122, 128, 76, 47, 176, 187, 136, 111, 138, 62, 122, 124, 45, 75, 88, 23, 139,
349+
19, 76, 64, 63, 24, 89, 75, 242, 229, 159, 6, 24, 208, 60, 191, 192, 255, 11, 150, 145,
350+
101, 186, 71, 152, 66, 116, 123, 150, 244, 29, 186, 96, 199, 69, 94, 49, 198, 63, 136, 17,
351+
29, 98, 132, 172, 255, 63, 216, 111, 203, 190, 152, 214, 15, 11, 251, 83, 193, 176, 95, 75,
352+
62, 215, 44, 27, 93, 232, 100, 20, 225, 117, 241, 38, 144, 233, 105, 149, 4, 229, 185, 183,
353+
201, 232, 208, 42, 191, 198, 252, 36, 213, 216, 192, 103, 249, 250, 228, 185, 39, 225, 71,
354+
23, 126, 234, 132, 191, 114, 234, 83, 173, 234, 149, 231, 146, 251, 93, 193, 56, 129, 199,
355+
235, 229, 118, 62, 221, 177, 96, 170, 205, 19, 182, 234, 188, 43, 148, 108, 142, 67, 144,
356+
63, 52, 239, 244, 67, 65, 127, 206, 102, 13, 227, 56, 201, 195, 246, 0, 155, 0, 46, 128,
357+
245, 6, 0, 0,
352358
];
353359

354360
assert_eq!(bytes, expected_serialization)

acvm-repo/acvm/src/pwg/blackbox/hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn get_hash_input<F: AcirField>(
4949
// in the message, then we error.
5050
if num_bytes_to_take > message_input.len() {
5151
return Err(OpcodeResolutionError::BlackBoxFunctionFailed(
52-
acir::BlackBoxFunc::Keccak256,
52+
acir::BlackBoxFunc::Blake2s,
5353
format!("the number of bytes to take from the message is more than the number of bytes in the message. {} > {}", num_bytes_to_take, message_input.len()),
5454
));
5555
}

0 commit comments

Comments
 (0)