Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
peinlcy committed Jan 28, 2024
1 parent d973b60 commit f48a600
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion circuits/src/builtins/bitwise/bitwise_stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ mod tests {
use crate::stark::stark::Stark;
use crate::stark::vars::StarkEvaluationVars;
use assembler::encoder::encode_asm_from_json_file;

use core::program::Program;
use core::state::state_storage::StateStorage;
use core::types::account::Address;
Expand Down
12 changes: 10 additions & 2 deletions circuits/src/generation/ctl_test/debug_trace_print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ use std::{

use assembler::encoder::encode_asm_from_json_file;
use core::{
crypto::{hash::Hasher, ZkHasher}, merkle_tree::log::{StorageLog, StorageLogKind, WitnessStorageLog}, state::state_storage::StateStorage, types::merkle_tree::{encode_addr, tree_key_default}, vm::transaction::init_tx_context_mock
crypto::{hash::Hasher, ZkHasher},
merkle_tree::log::{StorageLog, StorageLogKind, WitnessStorageLog},
state::state_storage::StateStorage,
types::merkle_tree::{encode_addr, tree_key_default},
vm::transaction::init_tx_context_mock,
};
use executor::{
load_tx::init_tape,
Expand Down Expand Up @@ -248,7 +252,11 @@ pub fn get_exec_trace(

program.prophets = prophets;
// FIXME: account tree is not used, merkle root cannot update.
let res = process.execute(&mut program, &StateStorage::new_test(), &mut BatchCacheManager::default());
let res = process.execute(
&mut program,
&StateStorage::new_test(),
&mut BatchCacheManager::default(),
);
match res {
Ok(_) => {}
Err(e) => {
Expand Down
6 changes: 5 additions & 1 deletion circuits/src/stark/ola_stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,11 @@ mod tests {

program.prophets = prophets;
// FIXME: account tree is not used, merkle root cannot update.
let res = process.execute(&mut program, &StateStorage::new_test(), &mut BatchCacheManager::default());
let res = process.execute(
&mut program,
&StateStorage::new_test(),
&mut BatchCacheManager::default(),
);
match res {
Ok(_) => {}
Err(e) => {
Expand Down
12 changes: 10 additions & 2 deletions circuits/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ pub fn test_stark_with_asm_path<Row, const COL_NUM: usize, E, H>(

program.prophets = prophets;
// FIXME: account tree is not used, merkle root cannot update.
let res = process.execute(&mut program, &StateStorage::new_test(), &mut BatchCacheManager::default());
let res = process.execute(
&mut program,
&StateStorage::new_test(),
&mut BatchCacheManager::default(),
);
match res {
Ok(_) => {}
Err(e) => {
Expand Down Expand Up @@ -309,7 +313,11 @@ pub fn simple_test_stark<const COL_NUM: usize, E, H>(
});

// FIXME: account tree is not used, merkle root cannot update.
let res = process.execute(&mut program, &StateStorage::new_test(), &mut BatchCacheManager::default());
let res = process.execute(
&mut program,
&StateStorage::new_test(),
&mut BatchCacheManager::default(),
);
match res {
Ok(_) => {}
Err(e) => {
Expand Down
2 changes: 1 addition & 1 deletion mini-ola/src/subcommands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod call;
pub mod deploy;
pub mod invoke;
pub mod parser;
pub mod call;
2 changes: 1 addition & 1 deletion mini-ola/src/subcommands/parser.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{bail, Ok, Result};
use ola_lang_abi::{FixedArray4, Param, Type, Value};

use crate::utils::{h256_from_hex_be, h256_to_u64_array, OLA_FIELD_ORDER, u64_array_to_h256};
use crate::utils::{h256_from_hex_be, h256_to_u64_array, u64_array_to_h256, OLA_FIELD_ORDER};

pub struct ToValue;
impl ToValue {
Expand Down
2 changes: 1 addition & 1 deletion mini-ola/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ pub fn address_from_hex_be(value: &str) -> anyhow::Result<[u8; 32]> {
anyhow::bail!("Key out of range.");
};
Ok(parsed_bytes)
}
}
2 changes: 1 addition & 1 deletion zk-vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ mod config;
mod preexecutor;
mod vm_manager;

pub use vm_manager::*;
pub use preexecutor::*;
pub use vm_manager::*;

#[cfg(test)]
pub mod test;
Expand Down

0 comments on commit f48a600

Please sign in to comment.