Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
chore: clean the code
Browse files Browse the repository at this point in the history
  • Loading branch information
duguorong009 committed Oct 31, 2023
1 parent e911d1b commit c1e8f2a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
4 changes: 1 addition & 3 deletions eigentrust-zk/src/circuits/dynamic_sets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ where
/// Constructs a new EigenTrustSet circuit
pub fn new(
attestations: Vec<Vec<Option<SignedAttestation<C, N, NUM_LIMBS, NUM_BITS, P>>>>,
pks: Vec<Option<PublicKey<C, N, NUM_LIMBS, NUM_BITS, P, EC>>>, domain: N,
pks: Vec<Option<PublicKey<C, N, NUM_LIMBS, NUM_BITS, P, EC>>>, _domain: N,
) -> Self {
let mut unassigned_attestations = Vec::new();
let mut unassigned_msg_hashes = Vec::new();
Expand Down Expand Up @@ -462,7 +462,6 @@ impl<
ops.push(opinions);
op_hashes.push(op_hash);
}
println!("halo2_op_hashes: \n{:?}\n", op_hashes);

let mut sponge = SH::init(&config.common, layouter.namespace(|| "op_hasher"))?;
sponge.update(&op_hashes);
Expand All @@ -478,7 +477,6 @@ impl<
let ctx = &mut RegionCtx::new(region, 0);
let op_hash = ctx.copy_assign(config.common.advice[0], ops_hash.clone())?;
let op_hash_res = ctx.copy_assign(config.common.advice[1], op_hash_res.clone())?;
println!("op_hash == op_hash_res \n{:?}\n{:?}", op_hash, op_hash_res);
ctx.constrain_equal(op_hash, op_hash_res)?;
Ok(())
},
Expand Down
8 changes: 0 additions & 8 deletions eigentrust-zk/src/circuits/dynamic_sets/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ where
Self { attestation, signature }
}

/// Constructs a new empty attestation
pub fn empty(domain: N) -> Self {
let attestation = Attestation::<N> { domain, ..Default::default() };
let signature = Signature { r: Integer::one(), s: Integer::one(), ..Default::default() };

Self { attestation, signature }
}

/// Constructs a new empty attestation with about
pub fn empty_with_about(about: N, domain: N) -> Self {
let attestation = Attestation::<N> { about, domain, ..Default::default() };
Expand Down
1 change: 0 additions & 1 deletion eigentrust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ impl Client {

let mut sponge = PoseidonNativeSponge::new();
sponge.update(&op_hashes);
println!("cli_op_hashes: \n{op_hashes:?}\n");
let opinions_hash = sponge.squeeze();

// Calculate scores
Expand Down

0 comments on commit c1e8f2a

Please sign in to comment.