Skip to content

Commit

Permalink
choire: update narwhal pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Jun 23, 2022
1 parent bb429df commit 68470b9
Show file tree
Hide file tree
Showing 9 changed files with 1,142 additions and 288 deletions.
1,242 changes: 1,009 additions & 233 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions crates/sui-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2021"

[dependencies]
bcs = "0.1.3"
arc-swap = "1.5.0"
anyhow = { version = "1.0.57", features = ["backtrace"] }
serde = { version = "1.0.137", features = ["derive"] }
serde_yaml = "0.8.23"
Expand All @@ -19,8 +20,8 @@ once_cell = "1.11.0"
debug-ignore = { version = "1.0.2", features = ["serde"] }
tracing = "0.1.34"

narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "config" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "crypto" }
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "config" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "crypto" }
move-binary-format = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }
move-package = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }

Expand Down
15 changes: 8 additions & 7 deletions crates/sui-config/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use crate::{
utils, ConsensusConfig, NetworkConfig, NodeConfig, ValidatorInfo, AUTHORITIES_DB_NAME,
CONSENSUS_DB_NAME, DEFAULT_STAKE,
};
use arc_swap::ArcSwap;
use debug_ignore::DebugIgnore;
use narwhal_config::{
Authority, Committee as ConsensusCommittee, PrimaryAddresses, Stake, WorkerAddresses,
};
use narwhal_config::{Authority, PrimaryAddresses, Stake, WorkerAddresses};
use rand::rngs::OsRng;
use std::{
collections::BTreeMap,
num::NonZeroUsize,
path::{Path, PathBuf},
sync::Arc,
Expand Down Expand Up @@ -157,10 +157,11 @@ impl<R: ::rand::RngCore + ::rand::CryptoRng> ConfigBuilder<R> {

(name, authority)
})
.collect();
let narwhal_committee = DebugIgnore(ConsensusCommittee {
authorities: narwhal_committee,
});
.collect::<BTreeMap<_, _>>();
let narwhal_committee = DebugIgnore(Arc::new(narwhal_config::Committee {
authorities: ArcSwap::new(Arc::new(narwhal_committee)),
epoch: genesis.epoch(),
}));

let validator_configs = validators
.into_iter()
Expand Down
7 changes: 2 additions & 5 deletions crates/sui-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::Config;
use anyhow::Result;
use debug_ignore::DebugIgnore;
use multiaddr::Multiaddr;
use narwhal_config::Committee as ConsensusCommittee;
use narwhal_config::Parameters as ConsensusParameters;
use narwhal_config::SharedCommittee as ConsensusCommittee;
use narwhal_crypto::ed25519::Ed25519PublicKey;
use serde::{Deserialize, Serialize};
use std::net::SocketAddr;
Expand Down Expand Up @@ -106,10 +106,7 @@ pub struct ConsensusConfig {
pub consensus_address: Multiaddr,
pub consensus_db_path: PathBuf,

//TODO make narwhal config serializable
#[serde(skip_serializing)]
#[serde(default)]
pub narwhal_config: DebugIgnore<ConsensusParameters>,
pub narwhal_config: ConsensusParameters,

pub narwhal_committee: DebugIgnore<ConsensusCommittee<Ed25519PublicKey>>,
}
Expand Down
8 changes: 4 additions & 4 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ move-vm-types = { git = "https://github.com/move-language/move", rev = "ae62d5f1

typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223"}

narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "executor" }
narwhal-types = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "types" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "node" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "crypto" }
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "executor" }
narwhal-types = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "types" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "node" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "crypto" }
workspace-hack = { path = "../workspace-hack"}

[dev-dependencies]
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 @@ -47,6 +47,6 @@ move-disassembler = { git = "https://github.com/move-language/move", rev = "ae62
move-ir-types = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }
move-vm-types = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }

narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "executor" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "crypto" }
narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "executor" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "crypto" }
workspace-hack = { path = "../workspace-hack"}
2 changes: 1 addition & 1 deletion crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ move-binary-format = { git = "https://github.com/move-language/move", rev = "ae6
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }
move-unit-test = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }

narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "node" }
narwhal-node = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "node" }

once_cell = "1.11.0"

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 @@ -28,7 +28,7 @@ sui-gateway = { path = "../sui-gateway" }
move-package = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae" }
move-core-types = { git = "https://github.com/move-language/move", rev = "ae62d5f1955a9b92c3ddd31d3cc4467f9aff76ae", features = ["address20"] }
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev ="ff5c1d69057fe93be658377462ca2875a57a0223"}
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "config" }
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "05fa85552c49f0775a47d72c37074c9ca1754900", package = "config" }

sui-config = { path = "../sui-config" }
sui-types = { path = "../sui-types" }
Expand Down
Loading

0 comments on commit 68470b9

Please sign in to comment.