Skip to content

Commit

Permalink
consensus: create new config for each authority (#1916)
Browse files Browse the repository at this point in the history
Create a new Narwhal configuration for each authority we want to start
in order to avoid binding to the exact same ports. Eventaully we'll want
this config to be a part of a larger ValidatorConfig.
  • Loading branch information
bmwill committed May 12, 2022
1 parent f620bea commit 6544875
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sui/src/sui_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,14 @@ impl SuiNetwork {
);

let consensus_committee = make_default_narwhal_committee(&config.authorities)?;
let consensus_parameters = ConsensusParameters::default();

// Pass in the newtwork parameters of all authorities
let net = config.get_authority_infos();

let mut spawned_authorities = Vec::new();

for authority in &config.authorities {
let consensus_parameters = ConsensusParameters::default();
let key_pair = key_pairs.get(&authority.public_key).unwrap_or_else(|| {
panic!(
"Can't find key pair for authority {:?}",
Expand Down
10 changes: 5 additions & 5 deletions test_utils/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ where
{
let states = test_authority_states(objects).await;
let consensus_committee = make_default_narwhal_committee(authorities).unwrap();
let consensus_parameters = ConsensusParameters {
max_header_delay: std::time::Duration::from_millis(200),
header_size: 1,
..ConsensusParameters::default()
};
let mut handles = Vec::new();
for ((state, config), key_pair) in states
.into_iter()
.zip(authorities.iter())
.zip(key_pairs.iter())
{
let consensus_parameters = ConsensusParameters {
max_header_delay: std::time::Duration::from_millis(200),
header_size: 1,
..ConsensusParameters::default()
};
let handle = make_authority(
/* authority */ config,
key_pair,
Expand Down

1 comment on commit 6544875

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bench results

�[0m�[0m�[1m�[32m Finished�[0m release [optimized] target(s) in 0.36s
�[0m�[0m�[1m�[32m Running�[0m target/release/bench microbench throughput
�[2m2022-05-12T15:52:44.058423Z�[0m �[32m INFO�[0m �[2msui::benchmark�[0m�[2m:�[0m benchmark : Benchmark { committee_size: 1, send_timeout_us: 400000000, recv_timeout_us: 400000000, buffer_size: 65000, tcp_connections: 0, db_cpus: 1, use_native: false, batch_size: 2000, running_mode: SingleValidatorThread, working_dir: None, bench_type: MicroBenchmark { host: "127.0.0.1", port: 9555, type_: Throughput { num_transactions: 100000 } } }
�[2m2022-05-12T15:52:44.059038Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m authority address hex: 0xbbe84181fcfc2f45a4b6b9c503cdcb83e3df3d6d
�[2m2022-05-12T15:52:44.059125Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m Open database on path: "/tmp/DB_0x4279ac1ce866b95d5b932016dd036e0b8440c69d"
�[2m2022-05-12T15:52:45.037801Z�[0m �[32m INFO�[0m �[2msui::benchmark::validator_preparer�[0m�[2m:�[0m Spawning a validator thread...
thread '' panicked at 'called Result::unwrap() on an Err value: InvalidMultiaddr', sui/src/benchmark/load_generator.rs:274:51
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: <core::future::from_generator::GenFuture as core::future::future::Future>::poll
4: tokio::park::thread::CachedParkThread::block_on
5: tokio::runtime::thread_pool::ThreadPool::block_on
6: tokio::runtime::Runtime::block_on
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
�[2m2022-05-12T15:52:51.204000Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204007Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204039Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204067Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204087Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204116Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204181Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204195Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204191Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204201Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204215Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204223Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204227Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204224Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204232Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204237Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204239Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204230Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204235Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204248Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204259Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204238Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204256Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204262Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204275Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204250Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204234Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204285Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204243Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204294Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204255Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204231Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204251Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204261Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204266Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204241Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204267Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204269Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204270Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204244Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204274Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204252Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204278Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204281Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204291Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204287Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204292Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204297Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
�[2m2022-05-12T15:52:51.204253Z�[0m �[31mERROR�[0m �[2msui::benchmark::load_generator�[0m�[2m:�[0m Received Error Custom { kind: Other, error: RpcError("error trying to connect: tcp connect error: Connection refused (os error 111)") }
Throughout: 666920.0963032619 tps

Please sign in to comment.