Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-koshy committed Aug 10, 2022
1 parent 4df7305 commit 6035eef
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
5 changes: 0 additions & 5 deletions benchmark/benchmark/full_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,8 @@ def run(self, debug=False):
self.node_parameters.print(PathMaker.parameters_file())

# Run the clients (they will wait for the nodes to be ready).
<< << << < HEAD
workers_addresses = committee.workers_addresses(self.faults)
rate_share = ceil(rate / committee.workers())
== == == =
workers_addresses = worker_cache.workers_addresses(self.faults)
rate_share = ceil(rate / worker_cache.workers())
>>>>>> > cd36ad6d(Fix local benchmark, client demo & tests)
for i, addresses in enumerate(workers_addresses):
for (id, address) in addresses:
cmd = CommandMaker.run_client(
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _update(self, hosts, bench_parameters):
mem_profiling=bench_parameters.mem_profile))
cmd = [
f'(cd {self.settings.repo_name} && git fetch -f)',
f'(cd {self.settings.repo_name} && git checkout -f {self.settings.branch})',
f'(cd {self.settings.repo_name} && git checkout -f {self.settings.branch} --)',
f'(cd {self.settings.repo_name} && git pull -f)',
'source $HOME/.cargo/env',
f'(cd {self.settings.repo_name}/node && {compile_cmd})',
Expand Down
3 changes: 2 additions & 1 deletion executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
batch_loader::BatchLoader, core::Core, metrics::ExecutorMetrics, subscriber::Subscriber,
};
use async_trait::async_trait;
use config::SharedWorkerCache;
use config::{SharedCommittee, SharedWorkerCache};
use consensus::ConsensusOutput;
use crypto::PublicKey;
use prometheus::Registry;
Expand Down Expand Up @@ -100,6 +100,7 @@ impl Executor {
/// Spawn a new client subscriber.
pub async fn spawn<State>(
name: PublicKey,
committee: SharedCommittee,
worker_cache: SharedWorkerCache,
store: Store<BatchDigest, SerializedBatchMessage>,
execution_state: Arc<State>,
Expand Down
1 change: 1 addition & 0 deletions node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ impl Node {
// subscriber handler if it missed some transactions.
let executor_handles = Executor::spawn(
name,
committee,
worker_cache,
store.batch_store.clone(),
execution_state,
Expand Down
2 changes: 2 additions & 0 deletions primary/tests/epoch_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ async fn test_simple_committee_update() {
// The configuration of epoch 0.
let keys_0 = keys(None);
let committee_0 = pure_committee_from_keys(&keys_0);
let worker_cache_0 = worker_cache_from_keys(&keys_0);

// Spawn the committee of epoch 0.
let mut rx_channels = Vec::new();
Expand All @@ -482,6 +483,7 @@ async fn test_simple_committee_update() {
name,
signer,
Arc::new(ArcSwap::from_pointee(committee_0.clone())),
Arc::new(ArcSwap::from_pointee(worker_cache_0.clone())),
parameters.clone(),
store.header_store.clone(),
store.certificate_store.clone(),
Expand Down
4 changes: 2 additions & 2 deletions primary/tests/nodes_bootstrapping_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async fn test_loss_of_liveness_without_recovery() {
let node_advance_delay = Duration::from_secs(60);

// A cluster of 4 nodes will be created
let mut cluster = Cluster::new(None, None, true);
let mut cluster = Cluster::new(None, None, None, true);

// ===== Start the cluster ====
cluster.start(Some(4), Some(1), None).await;
Expand Down Expand Up @@ -163,7 +163,7 @@ async fn test_loss_of_liveness_with_recovery() {
let node_advance_delay = Duration::from_secs(60);

// A cluster of 4 nodes will be created
let mut cluster = Cluster::new(None, None, true);
let mut cluster = Cluster::new(None, None, None, true);

// ===== Start the cluster ====
cluster.start(Some(4), Some(1), None).await;
Expand Down
2 changes: 1 addition & 1 deletion test_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use indexmap::IndexMap;
use multiaddr::Multiaddr;
use rand::{rngs::StdRng, Rng, SeedableRng as _};
use std::{
collections::{BTreeSet, HashMap, VecDeque},
collections::{BTreeSet, VecDeque},
ops::RangeInclusive,
pin::Pin,
sync::Arc,
Expand Down
1 change: 0 additions & 1 deletion worker/src/tests/quorum_waiter_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: Apache-2.0
use super::*;
use crate::worker::WorkerMessage;
use crypto::traits::KeyPair;
use test_utils::{batch, resolve_name_and_committee_and_worker_cache, WorkerToWorkerMockServer};

#[tokio::test]
Expand Down

0 comments on commit 6035eef

Please sign in to comment.