Skip to content

Commit 9273488

Browse files
committed
nits
1 parent e7272b2 commit 9273488

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

algorithms/src/snark/varuna/mode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ impl SNARKMode for VarunaNonHidingMode {
3939
}
4040

4141
/// The different Varuna Versions.
42+
#[repr(u8)]
4243
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
4344
pub enum VarunaVersion {
4445
V1 = 1,

console/program/src/data/future/to_bits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<N: Network> ToBits for Future<N> {
6969
.write_bits_be(vec);
7070
vec.extend_from_slice(&function_name_bits);
7171

72-
// Write the number of arguments.s
72+
// Write the number of arguments.
7373
u8::try_from(self.arguments.len()).or_halt_with::<N>("arguments exceed u8::MAX").write_bits_be(vec);
7474

7575
// Write the arguments.

console/program/src/data/plaintext/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl<N: Network> Plaintext<N> {
8989
}
9090
}
9191

92-
/// Returns the `Plaintext` as a `Vec<N::Field>`, if it is a u8 array.
92+
/// Returns the `Plaintext` as a `Vec<N::Field>`, if it is a field array.
9393
pub fn as_field_array(&self) -> Result<Vec<Field<N>>> {
9494
match self {
9595
Self::Array(elements, _) => {

synthesizer/program/src/logic/instruction/operation/snark_verify.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,13 @@ impl<N: Network, const VARIANT: u8> SnarkVerification<N, VARIANT> {
415415
);
416416
// Check that the number of circuit is properly bound.
417417
ensure!(
418-
num_circuits < MAX_SNARK_VERIFY_CIRCUITS,
418+
num_circuits <= MAX_SNARK_VERIFY_CIRCUITS,
419419
"Instruction '{}' supports a maximum of {MAX_SNARK_VERIFY_CIRCUITS} batched circuits, found {num_circuits} circuits.",
420420
Self::opcode()
421421
);
422422
// Check that the total number of instances/assignments is properly bound.
423423
ensure!(
424-
num_instances < MAX_SNARK_VERIFY_INSTANCES,
424+
num_instances <= MAX_SNARK_VERIFY_INSTANCES,
425425
"Instruction '{}' supports a maximum of {MAX_SNARK_VERIFY_INSTANCES} batched instances, found {num_instances} instances.",
426426
Self::opcode()
427427
);
@@ -436,7 +436,7 @@ impl<N: Network, const VARIANT: u8> SnarkVerification<N, VARIANT> {
436436
_ => bail!(
437437
"Instruction '{}' expects the fourth input to be a byte array. Found input of type '{}'",
438438
Self::opcode(),
439-
input_types[2]
439+
input_types[3]
440440
),
441441
}
442442

0 commit comments

Comments
 (0)