Skip to content

Commit

Permalink
Fix + fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoletta committed Jan 11, 2024
1 parent b2ba10b commit e91b523
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
32 changes: 27 additions & 5 deletions vm/src/air_private_input.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#[cfg(feature = "std")]
use std::path::PathBuf;

use crate::{stdlib::collections::HashMap, vm::runners::builtin_runner::{HASH_BUILTIN_NAME, RANGE_CHECK_BUILTIN_NAME, SIGNATURE_BUILTIN_NAME, BITWISE_BUILTIN_NAME, EC_OP_BUILTIN_NAME, KECCAK_BUILTIN_NAME, POSEIDON_BUILTIN_NAME}};
use crate::{
stdlib::collections::HashMap,
vm::runners::builtin_runner::{
BITWISE_BUILTIN_NAME, EC_OP_BUILTIN_NAME, HASH_BUILTIN_NAME, KECCAK_BUILTIN_NAME,
POSEIDON_BUILTIN_NAME, RANGE_CHECK_BUILTIN_NAME, SIGNATURE_BUILTIN_NAME,
},
};
use serde::{Deserialize, Serialize};

use crate::Felt252;
Expand Down Expand Up @@ -105,12 +111,28 @@ impl AirPrivateInput {
trace_path: trace_file.as_path().canonicalize().unwrap_or(trace_file),
memory_path: memory_file.as_path().canonicalize().unwrap_or(memory_file),
pedersen: self.0.get(HASH_BUILTIN_NAME).cloned().unwrap_or_default(),
range_check: self.0.get(RANGE_CHECK_BUILTIN_NAME).cloned().unwrap_or_default(),
ecdsa: self.0.get(SIGNATURE_BUILTIN_NAME).cloned().unwrap_or_default(),
bitwise: self.0.get(BITWISE_BUILTIN_NAME).cloned().unwrap_or_default(),
range_check: self
.0
.get(RANGE_CHECK_BUILTIN_NAME)
.cloned()
.unwrap_or_default(),
ecdsa: self
.0
.get(SIGNATURE_BUILTIN_NAME)
.cloned()
.unwrap_or_default(),
bitwise: self
.0
.get(BITWISE_BUILTIN_NAME)
.cloned()
.unwrap_or_default(),
ec_op: self.0.get(EC_OP_BUILTIN_NAME).cloned().unwrap_or_default(),
keccak: self.0.get(KECCAK_BUILTIN_NAME).cloned().unwrap_or_default(),
poseidon: self.0.get(POSEIDON_BUILTIN_NAME).cloned().unwrap_or_default(),
poseidon: self
.0
.get(POSEIDON_BUILTIN_NAME)
.cloned()
.unwrap_or_default(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion vm/src/vm/runners/builtin_runner/ec_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ impl EcOpBuiltinRunner {
.enumerate()
{
// Add the input cells of each ec_op instance to the private inputs
if let (Ok(p_x), Ok(p_y), Ok(m), Ok(q_x), Ok(q_y)) = (
if let (Ok(p_x), Ok(p_y), Ok(q_x), Ok(q_y), Ok(m)) = (
memory.get_integer((self.base as isize, off).into()),
memory.get_integer((self.base as isize, off + 1).into()),
memory.get_integer((self.base as isize, off + 2).into()),
Expand Down

0 comments on commit e91b523

Please sign in to comment.