Skip to content

Commit

Permalink
config: rework validator configs (MystenLabs#1939)
Browse files Browse the repository at this point in the history
This patch does a large rework of our validator configs. Specifically it
creates a single `ValidatorConfig` which represents all of the
configuration a Validator needs to start up. It also creates a
light-weight `ValidatorInfo` type which contains information we expect
to know about other validators (stake, public key, network address) and
will eventually be read from on-chain. This is a replacement for the
`AuthorityInfo` type which was a type that all validators have for all
other validators but included some odd information like the on-disk path
to a validator's db which other validators don't need to know about.

This patch also does an initial rework of creating a `NetworkConfig`
which is used when you want to create N validators to run locally.
There's still some additional work that will need to be done to make
this nicer for testing purposes but this is a good start.
  • Loading branch information
bmwill authored May 13, 2022
1 parent 1fe9b1a commit 2746dd4
Show file tree
Hide file tree
Showing 29 changed files with 945 additions and 1,239 deletions.
25 changes: 25 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[workspace]
members = [
"crates/sui-config",
"crates/sui-network",
"crates/x",
"faucet",
Expand Down
23 changes: 23 additions & 0 deletions crates/sui-config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "sui-config"
version = "0.0.0"
authors = ["Mysten Labs <[email protected]>"]
license = "Apache-2.0"
publish = false
edition = "2021"

[dependencies]
anyhow = { version = "1.0.57", features = ["backtrace"] }
serde = { version = "1.0.137", features = ["derive"] }
serde_json = "1.0.80"
rand = "0.7.3"
dirs = "4.0.0"
multiaddr = "0.14.0"
debug-ignore = { version = "1.0.2", features = ["serde"] }
tracing = "0.1.34"

narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "23745f48103656eae4a4205d0b3edd53ad8894de", package = "config" }
narwhal-crypto = { git = "https://github.com/MystenLabs/narwhal", rev = "23745f48103656eae4a4205d0b3edd53ad8894de", package = "crypto" }

sui-framework = { path = "../../sui_programmability/framework" }
sui-types = { path = "../../sui_types" }
Loading

0 comments on commit 2746dd4

Please sign in to comment.