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

Commit

Permalink
chore: fmt + clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
duguorong009 committed Oct 31, 2023
1 parent c1e8f2a commit 95e0265
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions eigentrust-zk/src/circuits/dynamic_sets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ where
let mut s_inv_row = Vec::new();
for j in 0..NUM_NEIGHBOURS {
//
// NOTE: Current circuit impl assumes that the "attestations" are full, even including self-attestation.
// NOTE: Current circuit impl assumes that the "attestations" are full, even including self-attestation.
// Should be fixed later.
//
let att = attestations[i][j].clone().unwrap();
Expand All @@ -160,15 +160,15 @@ where
unassigned_msg_hashes.push(msg_hashes_row);
unassigned_s_invs.push(s_inv_row);

//
//
// TODO: Update/remove this concept of "default pubkey" in the future.
// This "default pubkey" can cause confusion & unexpected issues.
//
//
// Here, if the pubkey is not given (None), the "default" pubkey is added automatically.
// This means that if there is only 1 real pubkey,
// This means that if there is only 1 real pubkey,
// the "unassigned_pks" would include NUM_NEIGHBORS pubkeys with default pubkey.
//
// Example:
//
// Example:
// pks = [ Some(pk1), Some(pk2), None, None ]
// unassigned_pks = [ pk1, pk2, default_pk, default_pk ]
//
Expand Down
6 changes: 3 additions & 3 deletions eigentrust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ impl Client {
//
// TODO: Remove the following patch in the future.
//
// In real world scenario, the address(pubkey) does not give attestation itself,
// In real world scenario, the address(pubkey) does not give attestation itself,
// which is equal to "attestation_matrix[origin_index][origin_index] = None".
// But, the current EigenTrust circuit impl includes the check of
// But, the current EigenTrust circuit impl includes the check of
// "address_set[i] == attestaions[i][i].about".
// Hence, we add the self-attestation here, for temporary patch.
//
Expand Down Expand Up @@ -507,7 +507,7 @@ impl Client {
|| {
EigenError::ValidationError(format!(
"Participant {} not found",
participant_address.to_string()
participant_address
))
},
)?;
Expand Down

0 comments on commit 95e0265

Please sign in to comment.