Skip to content

Commit

Permalink
Use AuthorityKeyPair in narwhal_manager (#7422)
Browse files Browse the repository at this point in the history
Narwhal manager uses a hardcoded key pair type (bls12381::min_sig) but
should use the type defined in sui-types.
  • Loading branch information
jonas-lj authored Jan 16, 2023
1 parent d2506aa commit 01dfdc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/sui-core/src/narwhal_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
pub mod narwhal_manager_tests;

use arc_swap::ArcSwap;
use fastcrypto::bls12381;
use fastcrypto::traits::KeyPair;
use mysten_metrics::{monitored_scope, RegistryService};
use narwhal_config::{Committee, Parameters, SharedWorkerCache, WorkerId};
Expand All @@ -18,11 +17,11 @@ use narwhal_worker::TransactionValidator;
use std::path::PathBuf;
use std::sync::Arc;
use std::time::Instant;
use sui_types::crypto::NetworkKeyPair;
use sui_types::crypto::{AuthorityKeyPair, NetworkKeyPair};
use tokio::sync::Mutex;

pub struct NarwhalConfiguration<TxValidator: TransactionValidator> {
pub primary_keypair: bls12381::min_sig::BLS12381KeyPair,
pub primary_keypair: AuthorityKeyPair,
pub network_keypair: NetworkKeyPair,
pub worker_ids_and_keypairs: Vec<(WorkerId, NetworkKeyPair)>,

Expand All @@ -35,7 +34,7 @@ pub struct NarwhalConfiguration<TxValidator: TransactionValidator> {

pub struct NarwhalManager<TxValidator> {
storage_base_path: PathBuf,
primary_keypair: bls12381::min_sig::BLS12381KeyPair,
primary_keypair: AuthorityKeyPair,
network_keypair: NetworkKeyPair,
worker_ids_and_keypairs: Vec<(WorkerId, NetworkKeyPair)>,
primary_node: PrimaryNode,
Expand Down

1 comment on commit 01dfdc9

@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.

Owned Transactions Benchmark Results

Benchmark Report:
+-------------+-----+--------+-----+-----+-----+-----+-----+-----+-------+-----+
| duration(s) | tps | error% | min | p25 | p50 | p75 | p90 | p99 | p99.9 | max |
+==============================================================================+
| 60          | 100 | 0      | 12  | 55  | 57  | 60  | 93  | 101 | 103   | 104 |

Shared Transactions Benchmark Results

Benchmark Report:
+-------------+-----+--------+-----+-----+-----+-----+-----+-----+-------+------+
| duration(s) | tps | error% | min | p25 | p50 | p75 | p90 | p99 | p99.9 | max  |
+===============================================================================+
| 60          | 99  | 0      | 18  | 396 | 478 | 566 | 645 | 824 | 1283  | 1848 |

Narwhal Benchmark Results

 SUMMARY:
-----------------------------------------
 + CONFIG:
 Faults: 0 node(s)
 Committee size: 4 node(s)
 Worker(s) per node: 1 worker(s)
 Collocate primary and workers: True
 Input rate: 50,000 tx/s
 Transaction size: 512 B
 Execution time: 58 s

 Header number of batches threshold: 32 digests
 Header maximum number of batches: 1,000 digests
 Max header delay: 2,000 ms
 GC depth: 50 round(s)
 Sync retry delay: 10,000 ms
 Sync retry nodes: 3 node(s)
 batch size: 500,000 B
 Max batch delay: 200 ms
 Max concurrent requests: 500,000 

 + RESULTS:
 Batch creation avg latency: 77 ms
 Header creation avg latency: 1,778 ms
 	Batch to header avg latency: 959 ms
 Header to certificate avg latency: 7 ms
 	Request vote outbound avg latency: 3 ms
 Certificate commit avg latency: 3,015 ms

 Consensus TPS: 49,712 tx/s
 Consensus BPS: 25,452,290 B/s
 Consensus latency: 3,101 ms

 End-to-end TPS: 48,031 tx/s
 End-to-end BPS: 24,592,126 B/s
 End-to-end latency: 4,099 ms
-----------------------------------------

Please sign in to comment.