Skip to content

Commit

Permalink
chore: updated fmt; removed warn
Browse files Browse the repository at this point in the history
  • Loading branch information
sifnoc committed Dec 14, 2023
1 parent 095f0ef commit 22b956c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion backend/src/apis/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ where
mst: Box<dyn Tree<N_CURRENCIES, N_BYTES>>,
params_path: &str,
) -> Result<Snapshot<LEVELS, N_CURRENCIES, N_BYTES>, Box<dyn std::error::Error>> {
let mst_inclusion_circuit = MstInclusionCircuit::<LEVELS, N_CURRENCIES, N_BYTES>::init_empty();
let mst_inclusion_circuit =
MstInclusionCircuit::<LEVELS, N_CURRENCIES, N_BYTES>::init_empty();

// get k from ptau file name
let parts: Vec<&str> = params_path.split("-").collect();
Expand Down
3 changes: 1 addition & 2 deletions zk_prover/examples/nova_incremental_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ fn run_test(circuit_filepath: String, witness_gen_filepath: String) {
let liabilities_state_2 =
build_liabilities_state_cur(liabilities_state_1, merkle_proof_2.root.hash);

let merkle_proof_3 =
build_merkle_proof("../csv/states/entry_16_3.csv".to_string(), 0).unwrap();
let merkle_proof_3 = build_merkle_proof("../csv/states/entry_16_3.csv".to_string(), 0).unwrap();
let liabilities_state_3 =
build_liabilities_state_cur(liabilities_state_2, merkle_proof_3.root.hash);

Expand Down
4 changes: 2 additions & 2 deletions zk_prover/src/chips/merkle_sum_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ impl<const N_CURRENCIES: usize> MerkleSumTreeChip<N_CURRENCIES> {
});

// Perform the assignment according to the swap at offset 1
let left_currency_balance = region.assign_advice(
let _left_currency_balance = region.assign_advice(
|| "assign left balance after swap",
self.config.advice[0],
1,
|| l1_val,
)?;

let right_currency_balance = region.assign_advice(
let _right_currency_balance = region.assign_advice(
|| "assign right balance after swap",
self.config.advice[1],
1,
Expand Down
6 changes: 4 additions & 2 deletions zk_prover/src/chips/poseidon/poseidon_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ pub(crate) const MDS: [[Fp; 2]; 2] = [
0x7782_e150_9b1d_0fdb,
0x2b9d_4b41_10c9_ae99,
]),
], [
],
[
Fp::from_raw([
0xf573_f431_221f_8ff9,
0xb6c0_9d55_7013_fff1,
Expand Down Expand Up @@ -968,7 +969,8 @@ pub(crate) const MDS_INV: [[Fp; 2]; 2] = [
0x4c98_62a1_d97d_1510,
0x1eb9_e1dc_19a3_3a62,
]),
], [
],
[
Fp::from_raw([
0x763f_7875_036b_cb02,
0x8ce5_1690_30a2_ad69,
Expand Down
2 changes: 1 addition & 1 deletion zk_prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pub mod chips;
/// Zk circuits with a full prover and verifier. A circuit can be viewed as an assembly of chips.
pub mod circuits;
/// Utilities to build the merkle sum tree data structure. No zk proof in here.
pub mod merkle_sum_tree;
pub mod merkle_sum_tree;
4 changes: 2 additions & 2 deletions zk_prover/src/merkle_sum_tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub mod utils;
use halo2_proofs::halo2curves::bn256::Fr as Fp;

/// A struct representing a Merkle Proof.
///
///
/// Fields:
/// * `entry`: The entry for which the proof is generated
/// * `root`: The root of the Merkle Sum Tree
Expand All @@ -17,7 +17,7 @@ use halo2_proofs::halo2curves::bn256::Fr as Fp;
pub struct MerkleProof<const N_CURRENCIES: usize, const N_BYTES: usize>
where
[usize; N_CURRENCIES + 1]: Sized,
[usize; N_CURRENCIES + 2]: Sized,
[usize; N_CURRENCIES + 2]: Sized,
{
pub entry: Entry<N_CURRENCIES>,
pub root: Node<N_CURRENCIES>,
Expand Down

0 comments on commit 22b956c

Please sign in to comment.