Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions phase1-coordinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ edition = "2018"
[[bin]]
name = "phase1-coordinator"
path = "src/main.rs"
required-features = ["parallel"]

[dependencies]
phase1 = { path = "../phase1" }
Expand Down
23 changes: 5 additions & 18 deletions phase1-coordinator/src/commands/aggregation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ mod tests {
use crate::{
authentication::Dummy,
commands::{Aggregation, Seed, SigningKey, SEED_LENGTH},
objects::Task,
storage::{Locator, Storage},
testing::prelude::*,
Coordinator,
Expand Down Expand Up @@ -181,10 +182,7 @@ mod tests {
assert_eq!(0, round_height);

let contributors = vec![contributor.clone()];
let verifiers = vec![verifier.clone()];
coordinator
.next_round(*TEST_STARTED_AT, contributors, verifiers)
.unwrap();
coordinator.next_round(*TEST_STARTED_AT, contributors).unwrap();
}

// Check current round height is now 1.
Expand Down Expand Up @@ -240,21 +238,10 @@ mod tests {
contribute.unwrap();
}
}
{
// Acquire the lock as the verifier.
let try_lock = coordinator.try_lock_chunk(chunk_id, &verifier.clone());
if try_lock.is_err() {
error!(
"Failed to acquire lock as verifier {:?}\n{}",
&verifier,
serde_json::to_string_pretty(&coordinator.current_round().unwrap()).unwrap()
);
try_lock.unwrap();
}
}
{
// Run verification as verifier.
let verify = coordinator.run_verification(round_height, chunk_id, 1, &verifier, &verifier_signing_key);
let task = Task::new(chunk_id, 1);
let verify = coordinator.run_verification(round_height, &task, &verifier, &verifier_signing_key);
if verify.is_err() {
error!(
"Failed to run verification as verifier {:?}\n{}",
Expand All @@ -265,7 +252,7 @@ mod tests {
}

// Run verification as the verifier.
let verify = coordinator.verify_contribution(chunk_id, &verifier.clone());
let verify = coordinator.verify_contribution(&task, &verifier.clone());
if verify.is_err() {
error!(
"Failed to run verification as verifier {:?}\n{}",
Expand Down
7 changes: 2 additions & 5 deletions phase1-coordinator/src/commands/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ mod tests {
let contributor = Lazy::force(&TEST_CONTRIBUTOR_ID).clone();
let contributor_signing_key = "secret_key".to_string();

let verifier = Lazy::force(&TEST_VERIFIER_ID).clone();
let _verifier = Lazy::force(&TEST_VERIFIER_ID).clone();
let verifier_signing_key = "secret_key".to_string();

{
Expand All @@ -373,10 +373,7 @@ mod tests {
assert_eq!(0, round_height);

let contributors = vec![contributor.clone()];
let verifiers = vec![verifier.clone()];
coordinator
.next_round(*TEST_STARTED_AT, contributors, verifiers)
.unwrap();
coordinator.next_round(*TEST_STARTED_AT, contributors).unwrap();
}

// Check current round height is now 1.
Expand Down
Loading