Skip to content

Commit

Permalink
chore: bump narwhal version (MystenLabs#3526)
Browse files Browse the repository at this point in the history
* chore: bump narwhal version

* chore: bump narwhal version

Co-authored-by: Francois Garillot <[email protected]>>

* chore: point to latest

* cargo hakari generate

Co-authored-by: Francois Garillot <[email protected]>>
  • Loading branch information
joyqvq and Francois Garillot authored Jul 27, 2022
1 parent a0b24ca commit 78a7fb9
Show file tree
Hide file tree
Showing 22 changed files with 282 additions and 122 deletions.
243 changes: 180 additions & 63 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/sui-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ futures = "0.3.21"
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.80"
tempfile = "3.3.0"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
strum = "0.24.1"
strum_macros = "0.24.2"
num_cpus = "1.13.1"
Expand All @@ -35,7 +35,7 @@ sui-config = { path = "../sui-config" }
sui-types = { path = "../sui-types" }

move-core-types = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a", features = ["address20"] }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "node" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "node" }
sui-quorum-driver = { path = "../sui-quorum-driver" }
sui-node = { path = "../sui-node" }
workspace-hack = { path = "../workspace-hack"}
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-cluster-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ serde = { version = "1.0.139", features = ["derive"] }
futures = "0.3.21"
serde_json = "1.0.80"
tempfile = "3.3.0"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing = { version = "0.1.35", features = ["log"] }
clap = { version = "3.1.14", features = ["derive"] }
reqwest = { version = "0.11.11", features = ["blocking", "json"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ multiaddr = "0.14.0"
once_cell = "1.11.0"
tracing = "0.1.35"

narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "config" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "crypto" }
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "config" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "crypto" }
move-binary-format = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a" }
move-package = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a" }
move-core-types = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a", features = ["address20"] }
Expand Down
12 changes: 7 additions & 5 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bytes = "1.2.0"
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.79"
serde_with = "1.14.0"
tokio = { version = "1.20.0", features = ["full", "tracing", "test-util"] }
tokio = { version = "1.20.1", features = ["full", "tracing", "test-util"] }
tokio-stream = { version = "0.1.8", features = ["sync", "net"] }
parking_lot = "0.12.1"
async-trait = "0.1.53"
Expand Down Expand Up @@ -49,10 +49,12 @@ move-vm-runtime = { git = "https://github.com/move-language/move", rev = "790715
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "123c9e40b529315e1c1d91a54fb717111c3e349c"}
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "123c9e40b529315e1c1d91a54fb717111c3e349c" }

narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "crypto", features=["copy_key"]}
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "executor" }
narwhal-types = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "types" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "node" }
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "config" }
narwhal-consensus = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "consensus" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "crypto", features=["copy_key"]}
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "executor" }
narwhal-types = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "types" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "node" }
workspace-hack = { path = "../workspace-hack"}

[dev-dependencies]
Expand Down
14 changes: 10 additions & 4 deletions crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ use sui_storage::{
write_ahead_log::{DBTxGuard, TxGuard, WriteAheadLog},
IndexStore,
};

use sui_types::{
base_types::*,
batch::{TxSequenceNumber, UpdateItem},
committee::Committee,
crypto::AuthoritySignature,
crypto::PublicKey,
error::{SuiError, SuiResult},
fp_ensure,
messages::*,
Expand Down Expand Up @@ -1497,16 +1497,20 @@ impl AuthorityState {

#[async_trait]
impl ExecutionState for AuthorityState {
type PubKey = PublicKey;
type Transaction = ConsensusTransaction;
type Error = SuiError;
type Outcome = Vec<u8>;

/// This function will be called by Narwhal, after Narwhal sequenced this certificate.
#[instrument(level = "trace", skip_all)]
async fn handle_consensus_transaction(
&self,
// TODO [2533]: use this once integrating Narwhal reconfiguration
_consensus_output: &narwhal_consensus::ConsensusOutput<Self::PubKey>,
consensus_index: ExecutionIndices,
transaction: Self::Transaction,
) -> Result<Vec<u8>, Self::Error> {
) -> Result<(Self::Outcome, Option<narwhal_config::Committee<PublicKey>>), Self::Error> {
self.metrics.total_consensus_txns.inc();
match transaction {
ConsensusTransaction::UserTransaction(certificate) => {
Expand All @@ -1528,7 +1532,8 @@ impl ExecutionState for AuthorityState {
.await?;

// TODO: This return time is not ideal.
Ok(Vec::default())
// TODO [2533]: edit once integrating Narwhal reconfiguration
Ok((Vec::default(), None))
}
ConsensusTransaction::Checkpoint(fragment) => {
let seq = consensus_index;
Expand Down Expand Up @@ -1556,7 +1561,8 @@ impl ExecutionState for AuthorityState {

// TODO: This return time is not ideal. The authority submitting the checkpoint fragment
// is not expecting any reply.
Ok(Vec::default())
// TODO [2533]: edit once integrating Narwhal reconfiguration
Ok((Vec::default(), None))
}
}
}
Expand Down
12 changes: 11 additions & 1 deletion crates/sui-core/src/unit_tests/authority_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,11 @@ async fn shared_object() {
// Sequence the certificate to assign a sequence number to the shared object.
authority
.handle_consensus_transaction(
// TODO [2533]: use this once integrating Narwhal reconfiguration
&narwhal_consensus::ConsensusOutput {
certificate: narwhal_types::Certificate::default(),
consensus_index: narwhal_types::SequenceNumber::default(),
},
/* last_consensus_index */ ExecutionIndices::default(),
ConsensusTransaction::UserTransaction(Box::new(certificate.clone())),
)
Expand Down Expand Up @@ -1976,7 +1981,12 @@ async fn test_consensus_message_processed() {
async fn send_consensus(authority: &AuthorityState, cert: &CertifiedTransaction) {
authority
.handle_consensus_transaction(
ExecutionIndices::default(),
// TODO [2533]: use this once integrating Narwhal reconfiguration
&narwhal_consensus::ConsensusOutput {
certificate: narwhal_types::Certificate::default(),
consensus_index: narwhal_types::SequenceNumber::default(),
},
/* last_consensus_index */ ExecutionIndices::default(),
ConsensusTransaction::UserTransaction(Box::new(cert.clone())),
)
.await
Expand Down
10 changes: 10 additions & 0 deletions crates/sui-core/src/unit_tests/consensus_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ async fn listen_to_sequenced_transaction() {
// Set the shared object locks.
state
.handle_consensus_transaction(
// TODO [2533]: use this once integrating Narwhal reconfiguration
&narwhal_consensus::ConsensusOutput {
certificate: narwhal_types::Certificate::default(),
consensus_index: narwhal_types::SequenceNumber::default(),
},
ExecutionIndices::default(),
ConsensusTransaction::UserTransaction(certificate),
)
Expand Down Expand Up @@ -178,6 +183,11 @@ async fn submit_transaction_to_consensus() {
// Set the shared object locks.
state_guard
.handle_consensus_transaction(
// TODO [2533]: use this once integrating Narwhal reconfiguration
&narwhal_consensus::ConsensusOutput {
certificate: narwhal_types::Certificate::default(),
consensus_index: narwhal_types::SequenceNumber::default(),
},
ExecutionIndices::default(),
ConsensusTransaction::UserTransaction(certificate.clone()),
)
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async-trait = "0.1.53"
axum = "0.5.14"
clap = { version = "3.1.17", features = ["derive"] }
thiserror = "1.0.31"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.35"
serde = { version = "1.0.140", features = ["derive"] }
tower = { version = "0.4.12", features = ["util", "timeout", "load-shed", "limit"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ anyhow = { version = "1.0.58", features = ["backtrace"] }
async-trait = "0.1.53"
serde = { version = "1.0.140", features = ["derive"] }
tracing = "0.1.35"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
futures = "0.3.21"
prometheus = "0.13.1"
clap = { version = "3.1.17", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tracing = "0.1.35"
async-trait = "0.1.53"
serde = { version = "1.0.140", features = ["derive"] }
futures = "0.3.21"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
signature = "1.5.0"

sui-core = { path = "../sui-core" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anyhow = { version = "1.0.58", features = ["backtrace"] }
clap = { version = "3.1.17", features = ["derive"] }
multiaddr = "0.14.0"
prometheus = "0.13.1"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.35"
parking_lot = "0.12.1"
futures = "0.3.21"
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-open-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ anyhow = { version = "1.0.58", features = ["backtrace"] }
clap = { version = "3.1.17", features = ["derive"] }
pretty_assertions = "1.2.0"
serde_json = "1.0.80"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
hyper = { version = "0.14.20", features = ["full"] }

sui = { path = "../sui" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-quorum-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"

[dependencies]
arc-swap = "1.5.0"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.35"

sui-core = { path = "../sui-core" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ workspace-hack = { path = "../workspace-hack"}
[dev-dependencies]
clap = { version = "3.1.17", features = ["derive"] }
dirs = "4.0.0"
tokio = "1.20.0"
tokio = "1.20.1"
bcs = "0.1.3"
async-recursion = "1.0.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/sui-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ futures = "0.3.21"
flexstr = "^0.9"
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.80"
tokio = { version = "1.20.0", features = ["full", "tracing"] }
tokio = { version = "1.20.1", features = ["full", "tracing"] }
tokio-stream = "^0.1"
rocksdb = "0.18.0"
tracing = "0.1.35"
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"
anyhow = { version = "1.0.58", features = ["backtrace"] }
rand = "0.7.3"
tracing = "0.1.35"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
futures = "0.3.21"
tempfile = "3.3.0"
tonic-health = "0.6.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"

[dependencies]
anyhow = { version = "1.0.58", features = ["backtrace"] }
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.35"
clap = { version = "3.1.17", features = ["derive"] }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "123c9e40b529315e1c1d91a54fb717111c3e349c" }
Expand All @@ -18,7 +18,7 @@ futures = "0.3.21"
rocksdb = "0.18.0"
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "123c9e40b529315e1c1d91a54fb717111c3e349c"}
tempfile = "3.3.0"
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "executor" }
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "executor" }
serde_with = { version = "1.14.0", features = ["hex"] }
sui-storage = { path = "../sui-storage" }
serde = { version = "1.0.140", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ move-disassembler = { git = "https://github.com/move-language/move", rev = "7907
move-ir-types = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a" }
move-vm-types = { git = "https://github.com/move-language/move", rev = "79071528524f08b12e9abb84c1094d8e976aa17a" }

narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "executor" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "5ba330d0cefa33ba835ffe56489e6500a2909d8a", package = "crypto" }
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "executor" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "50411aa4b8b6eac7e45fa0e0da4ad8fc6c20395e", package = "crypto" }
workspace-hack = { path = "../workspace-hack"}

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ signature = "1.5.0"
camino = "1.0.9"
ed25519-dalek = "1"
base64ct = "1"
tokio = { version = "1.20.0", features = ["full"] }
tokio = { version = "1.20.1", features = ["full"] }
async-trait = "0.1.53"
serde_with = { version = "1.14.0", features = ["hex"] }
tracing = "0.1.35"
Expand Down
2 changes: 1 addition & 1 deletion crates/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bcs = "0.1.3"
jsonrpsee-http-server = "0.15.0"
jsonrpsee-http-client = "0.15.0"
prometheus = "0.13.1"
tokio = { version = "1.20.0", features = ["full", "tracing", "test-util"] }
tokio = { version = "1.20.1", features = ["full", "tracing", "test-util"] }
serde_json = "1.0.80"

sui = { path = "../sui" }
Expand Down
Loading

0 comments on commit 78a7fb9

Please sign in to comment.