Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TymurKhr committed Aug 30, 2019
1 parent 1f1afd7 commit df9b5a5
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 31 deletions.
2 changes: 1 addition & 1 deletion core/circuit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]

[dependencies]
models = { path = "../models" }
models = { path = "../models", version = "0.0.1" }
pairing = { package = "pairing_ce", version = "0.17.0" }
bellman = { package = "bellman_ce", version = "0.3.0" }
franklin_crypto = { package = "franklin-crypto", git = "ssh://[email protected]/matter-labs/franklin-crypto.git", branch="master"}
Expand Down
1 change: 1 addition & 0 deletions core/circuit/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
too-many-arguments-threshold = 12
6 changes: 1 addition & 5 deletions core/circuit/src/witness/close_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ mod test {
let sender_leaf = CircuitAccount::<Bn256> {
subtree: CircuitBalanceTree::new(franklin_constants::BALANCE_TREE_DEPTH as u32),
nonce: Fr::zero(),
pub_key_hash: sender_pub_key_hash, // pub_x: validator_x.clone(),
// pub_y: validator_y.clone(),
pub_key_hash: sender_pub_key_hash,
};
println!("zero root_hash equals: {}", sender_leaf.subtree.root_hash());

Expand Down Expand Up @@ -223,9 +222,7 @@ mod test {
sig_bits.reverse();
sig_bits.truncate(80);

// println!(" capacity {}",<Bn256 as JubjubEngine>::Fs::Capacity);
let signature = sign(&sig_bits, &sender_sk, p_g, params, rng);
//assert!(tree.verify_proof(sender_leaf_number, sender_leaf.clone(), tree.merkle_path(sender_leaf_number)));

let operations = calculate_close_account_operations_from_witness(
&close_account_witness,
Expand Down Expand Up @@ -276,7 +273,6 @@ mod test {
if err.is_some() {
panic!("ERROR satisfying in {}", err.unwrap());
}
// assert_eq!(cs.num_constraints(), 1)
}
}

Expand Down
4 changes: 2 additions & 2 deletions core/data_restore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ tokio = "0.1"
bitvec = "0.11"
log = "0.4"

plasma = { path = "../plasma" }
models = { path = "../models" }
plasma = { path = "../plasma", version = "0.1.1" }
models = { path = "../models", version = "0.0.1" }
2 changes: 1 addition & 1 deletion core/eth_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2018"

[dependencies]
models = { package = "models", path = "../models" }
models = { path = "../models", version = "0.0.1" }
serde = "1.0.90"
serde_derive = "1.0.90"
ethereum-types = "0.4.0"
Expand Down
4 changes: 2 additions & 2 deletions core/key_generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ time = "0.1"
pairing = { package = "pairing_ce", version = "0.17.0" }
franklin_crypto = { package = "franklin-crypto", git = "ssh://[email protected]/matter-labs/franklin-crypto.git"}
bellman = { package = "bellman_ce", version = "0.3.0" }
models = { path = "../models" }
circuit= { path = "../circuit" }
models = { path = "../models", version = "0.0.1" }
circuit= { path = "../circuit", version = "0.1.1" }
hex = "0.3.2"
rust-crypto = "0.2"
ff = { package = "ff_ce", version = "0.6.0", features = ["derive"] }
Expand Down
9 changes: 0 additions & 9 deletions core/key_generator/src/vk_contract_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
use bellman::groth16;
use pairing::{CurveAffine, Engine};

// fn unpack<T: CurveAffine>(t: &T) -> Vec<String>
// {
// t.into_uncompressed().as_ref().chunks(32).map(|c| "0x".to_owned() + &hex::encode(c)).collect()
// }

fn unpack_g1<E: Engine>(point: &E::G1Affine) -> Vec<String> {
let uncompressed = point.into_uncompressed();
let uncompressed_slice = uncompressed.as_ref();
Expand All @@ -25,10 +20,6 @@ fn unpack_g2<E: Engine>(point: &E::G2Affine) -> Vec<String> {
.chunks(32)
.map(|c| "0x".to_owned() + &hex::encode(c))
.collect()

// let to_reorder: Vec<String> = uncompressed_slice.chunks(32).map(|c| "0x".to_owned() + &hex::encode(c)).collect();

// vec![to_reorder[1].clone(), to_reorder[0].clone(), to_reorder[3].clone(), to_reorder[2].clone()]
}

const SHIFT: &str = " ";
Expand Down
2 changes: 1 addition & 1 deletion core/plasma/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
]

[dependencies]
models = { package = "models", path = "../models" }
models = { path = "../models", version = "0.0.1" }
bigdecimal = { version = "0.0.14", features = ["serde"]}
log = "0.4"
failure = "0.1"
Expand Down
8 changes: 4 additions & 4 deletions core/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.0.1"
edition = "2018"

[dependencies]
plasma = { path = "../plasma" }
models = { package = "models", path = "../models" }
storage = { path = "../storage" }
circuit = { package = "circuit", path = "../circuit"}
plasma = { path = "../plasma", version = "0.1.1" }
models = { path = "../models", version = "0.0.1" }
storage = { path = "../storage", version = "0.0.1" }
circuit = { path = "../circuit", version = "0.1.1"}

ff = { package = "ff_ce", version = "0.6.0", features = ["derive"] }
pairing = { package = "pairing_ce", version = "0.17.0" }
Expand Down
1 change: 0 additions & 1 deletion clippy.toml → core/prover/clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
too-many-arguments-threshold = 12
cognitive-complexity-threshold = 30
8 changes: 4 additions & 4 deletions core/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ version = "0.0.1"
edition = "2018"

[dependencies]
eth_client = { path = "../eth_client" }
plasma = { path = "../plasma" }
models = { package = "models", path = "../models" }
storage = { path = "../storage" }
eth_client = { path = "../eth_client", version = "0.1.0" }
plasma = { path = "../plasma", version = "0.1.1" }
models = { path = "../models", version = "0.0.1" }
storage = { path = "../storage", version = "0.0.1" }

ff = { package = "ff_ce", version = "0.6.0", features = ["derive"] }
pairing = { package = "pairing_ce", version = "0.17.0" }
Expand Down
3 changes: 2 additions & 1 deletion core/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version = "0.0.1"
edition = "2018"

[dependencies]
models = { package = "models", path = "../models" }
models = { path = "../models", version = "0.0.1" }

fnv = "1.0.6"
serde = "1.0.90"
serde_derive = "1.0.90"
Expand Down

0 comments on commit df9b5a5

Please sign in to comment.