Skip to content

Commit

Permalink
[rename] cleanups in config
Browse files Browse the repository at this point in the history
  • Loading branch information
davidiw committed Mar 7, 2022
1 parent 41980e7 commit 1521a7e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
26 changes: 13 additions & 13 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,29 @@ The configuration for validator `I`, can be produced by:
config-builder validator \
-a $PUBLIC_MULTIADDR_FOR_VALIDATOR_I \
-b $PUBLIC_MULTIADDR_FOR_VALIDATOR_0 \
-d /opt/diem/data \
-d /opt/aptos/data \
-i $I \
-l $ANY_MULTIADDR_FOR_VALIDATOR_I \
-n $TOTAL_NUMBER_OF_VALIDATORS \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s $SHARED_SECRET

As an example, this is the 2nd Validator (offset 1) in a 4 Validator TestNet:

config-builder validator \
-a "/ip4/1.1.1.2/tcp/7000" \
-b "/ip4/1.1.1.1/tcp/7000" \
-d /opt/diem/data \
-d /opt/aptos/data \
-i 1 \
-l "/ip4/0.0.0.0/tcp/7000" \
-n 4 \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s 0123456789abcdef101112131415161718191a1b1c1d1e1f2021222324252627

To create a mint service's key:

config-builder faucet \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s 0123456789abcdef101112131415161718191a1b1c1d1e1f2021222324252627

Instantiating a FullNode config is similar to instantiating a Validator config.
Expand All @@ -97,10 +97,10 @@ networks.
config-builder full-node (create | extend) \
-a $PUBLIC_MULTIADDR_FOR_FULL_NODE_I \
-b $PUBLIC_MULTIADDR_FOR_FULL_NODE_0 \
-d /opt/diem/data \
-d /opt/aptos/data \
-l $ANY_MULTIADDR_FOR_FULL_NODE_I \
-n $TOTAL_NUMBER_OF_VALIDATORS \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s $VALIDATOR_SHARED_SECRET \
[ -i $I -f $TOTAL_NUMBER_OF_FULL_NODES -c $FULL_NODE_SHARED_SECRET | -p ]

Expand All @@ -110,10 +110,10 @@ configuration.
config-builder full-node extend \
-a "/ip4/1.1.1.2/tcp/7100" \
-b "/ip4/1.1.1.2/tcp/7100" \
-d /opt/diem/data \
-d /opt/aptos/data \
-l "/ip4/0.0.0.0/tcp/7100" \
-n 4 \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s 0123456789abcdef101112131415161718191a1b1c1d1e1f2021222324252627 \
-i 0 \
-f 4 \
Expand All @@ -125,10 +125,10 @@ Validator/FullNode hybrid configured above.
config-builder full-node create \
-a "/ip4/1.1.1.3/tcp/7100" \
-b "/ip4/1.1.1.2/tcp/7100" \
-d /opt/diem/fn/data \
-d /opt/aptos/fn/data \
-l "/ip4/0.0.0.0/tcp/7100" \
-n 4 \
-o /opt/diem/fn/etc \
-o /opt/aptos/fn/etc \
-s 0123456789abcdef101112131415161718191a1b1c1d1e1f2021222324252627 \
-i 1 \
-f 4 \
Expand All @@ -139,10 +139,10 @@ Similarly a public network could be added via:
config-builder full-node create \
-a "/ip4/1.1.1.2/tcp/7100" \
-b "/ip4/1.1.1.2/tcp/7100" \
-d /opt/diem/fn/data \
-d /opt/aptos/fn/data \
-l "/ip4/0.0.0.0/tcp/7100" \
-n 4 \
-o /opt/diem/etc \
-o /opt/aptos/etc \
-s 0123456789abcdef101112131415161718191a1b1c1d1e1f2021222324252627 \
-p

Expand Down
2 changes: 1 addition & 1 deletion config/management/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use structopt::StructOpt;
/// // cmd [OPTIONS] --test <test>
///```
/// Config for diem management tools
/// Config for aptos management tools
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct Config {
#[serde(deserialize_with = "chain_id::deserialize_config_chain_id")]
Expand Down
6 changes: 3 additions & 3 deletions config/management/src/secure_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,19 @@ mod tests {
let path_str = path.path().to_str().unwrap();

let github = format!(
"backend=github;repository_owner=diem;repository=diem;token={}",
"backend=github;repository_owner=aptos;repository=aptos;token={}",
path_str
);
storage(&github).unwrap();

let github = format!(
"backend=github;repository_owner=diem;repository=diem;token={};namespace=test",
"backend=github;repository_owner=aptos;repository=aptos;token={};namespace=test",
path_str
);
storage(&github).unwrap();

let github = format!(
"backend=github;repository_owner=diem;repository=diem;branch=genesis;token={};namespace=test",
"backend=github;repository_owner=aptos;repository=aptos;branch=genesis;token={};namespace=test",
path_str
);
storage(&github).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub struct BaseConfig {
impl Default for BaseConfig {
fn default() -> BaseConfig {
BaseConfig {
data_dir: PathBuf::from("/opt/diem/data"),
data_dir: PathBuf::from("/opt/aptos/data"),
role: RoleType::Validator,
waypoint: WaypointConfig::None,
}
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/secure_backend_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl Default for OnDiskStorageConfig {
Self {
namespace: None,
path: PathBuf::from("secure_storage.json"),
data_dir: PathBuf::from("/opt/diem/data"),
data_dir: PathBuf::from("/opt/aptos/data"),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/storage_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Default for StorageConfig {
// conservatively safe minimal prune window. It'll take a few Gigabytes of disk space
// depending on the size of an average account blob.
prune_window: Some(1_000_000),
data_dir: PathBuf::from("/opt/diem/data"),
data_dir: PathBuf::from("/opt/aptos/data"),
// Default read/write/connection timeout, in milliseconds
timeout_ms: 30_000,
rocksdb_config: RocksdbConfig::default(),
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/test_data/public_full_node.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
base:
# Update this value to the location you want Diem to store its database
data_dir: "/opt/diem/data"
data_dir: "/opt/aptos/data"
role: "full_node"
waypoint:
# Update this value to that which Diem publicly provides. Please regard the directions
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/test_data/validator.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
base:
data_dir: "/opt/diem/data"
data_dir: "/opt/aptos/data"
role: "validator"
waypoint:
from_storage:
Expand Down
2 changes: 1 addition & 1 deletion config/src/config/test_data/validator_full_node.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
base:
data_dir: "/opt/diem/data"
data_dir: "/opt/aptos/data"
role: "full_node"
waypoint:
from_storage:
Expand Down

0 comments on commit 1521a7e

Please sign in to comment.