Skip to content

Commit

Permalink
Update StageNet configuration
Browse files Browse the repository at this point in the history
Adds additional configuration for StageNet as the deafult network.
  • Loading branch information
brianp committed Feb 9, 2023
1 parent dd7f227 commit 6f411b0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
4 changes: 2 additions & 2 deletions applications/tari_merge_mining_proxy/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mod test {
[config_b.merge_mining_proxy]
submit_to_origin = false
monerod_url = [ "http://network.b.org" ]
monerod_password = "password_esmeralda"
monerod_password = "password_stagenet"
base_node_grpc_address = "/dns4/base_node_b/tcp/8080"
"#;

Expand All @@ -133,7 +133,7 @@ mod test {
assert_eq!(config.monerod_url.as_slice(), &["http://network.b.org".to_string()]);
assert!(!config.submit_to_origin);
assert_eq!(config.monerod_username.as_str(), "cmot");
assert_eq!(config.monerod_password.as_str(), "password_esmeralda");
assert_eq!(config.monerod_password.as_str(), "password_stagenet");
assert_eq!(
config.base_node_grpc_address.to_string().as_str(),
"/dns4/base_node_b/tcp/8080"
Expand Down
11 changes: 11 additions & 0 deletions base_layer/core/tests/helpers/block_builders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ fn genesis_template(
(block, output)
}

// #[ignore = "used to generate a new stagenet genesis block"]
/// This is a helper function to generate and print out a block that can be used as the genesis block.
/// 1. Run `cargo test --package tari_core --test mempool -- helpers::block_builders::print_new_genesis_block_stagenet
/// --exact --nocapture`
/// 1. The block and range proof will be printed
/// 1. Profit!
#[test]
fn print_new_genesis_block_stagenet() {
print_new_genesis_block(Network::StageNet, "Tokenized and connected");
}

// #[ignore = "used to generate a new esmeralda genesis block"]
/// This is a helper function to generate and print out a block that can be used as the genesis block.
/// 1. Run `cargo test --package tari_core --test mempool -- helpers::block_builders::print_new_genesis_block_esmeralda
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4650,7 +4650,7 @@ pub unsafe extern "C" fn transport_config_destroy(transport: *mut TariTransportC
/// `database_path` - The database path char array pointer which. This is the folder path where the
/// database files will be created and the application has write access to
/// `discovery_timeout_in_secs`: specify how long the Discovery Timeout for the wallet is.
/// `network`: name of network to connect to. Valid values are: esmeralda, dibbler, igor, localnet, mainnet
/// `network`: name of network to connect to. Valid values are: esmeralda, dibbler, igor, localnet, mainnet, stagenet
/// `error_out` - Pointer to an int which will be modified to an error code should one occur, may not be null. Functions
/// as an out parameter.
///
Expand Down
2 changes: 1 addition & 1 deletion base_layer/wallet_ffi/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -2478,7 +2478,7 @@ void transport_config_destroy(TariTransportConfig *transport);
* `database_path` - The database path char array pointer which. This is the folder path where the
* database files will be created and the application has write access to
* `discovery_timeout_in_secs`: specify how long the Discovery Timeout for the wallet is.
* `network`: name of network to connect to. Valid values are: esmeralda, dibbler, igor, localnet, mainnet
* `network`: name of network to connect to. Valid values are: esmeralda, dibbler, igor, localnet, mainnet, stagenet
* `error_out` - Pointer to an int which will be modified to an error code should one occur, may not be null. Functions
* as an out parameter.
*
Expand Down
6 changes: 3 additions & 3 deletions common/config/presets/a_common.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
########################################################################################################################

[common]
#override_from="esmeralda"
#override_from="stagenet"
#base_path="<HOME>/.tari"

[esmeralda.auto_update]
[stagenet.auto_update]
# Customize the hosts that are used to check for updates. These hosts must contain update information in DNS TXT records.
update_uris = ["updates.esmeralda.taripulse.com"]
update_uris = ["updates.stagenet.taripulse.com"]

[auto_update]
# Name server for auto update (default = "1.1.1.1:53/cloudflare.net")
Expand Down
7 changes: 7 additions & 0 deletions common/config/presets/b_peer_seeds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
# All DNS seed records must pass DNSSEC validation
#dns_seeds_use_dnssec = false

[stagenet.p2p.seeds]
# DNS seeds hosts - DNS TXT records are queried from these hosts and the resulting peers added to the comms peer list.
dns_seeds = ["seeds.stagenet.tari.com"]
# Custom specified peer seed nodes
peer_seeds = [
]

[esmeralda.p2p.seeds]
# DNS seeds hosts - DNS TXT records are queried from these hosts and the resulting peers added to the comms peer list.
dns_seeds = ["seeds.esmeralda.tari.com"]
Expand Down
5 changes: 4 additions & 1 deletion common/config/presets/c_base_node.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ identity_file = "config/base_node_id_igor.json"
# A path to the file that stores your node identity and secret key (default = "config/base_node_id.json")
identity_file = "config/base_node_id_esmeralda.json"

[stagenet.base_node]
# A path to the file that stores your node identity and secret key (default = "config/base_node_id.json")
identity_file = "config/base_node_id_stagenet.json"
# The socket to expose for the gRPC base node server (default = "/ip4/127.0.0.1/tcp/18142")
#grpc_address = "/ip4/127.0.0.1/tcp/18142"

[base_node]
# Selected network (Note: Not implemented properly, please specify on the command line) (default = "emseralda")
#network = "emseralda"
#network = "stagenet"

# Set to false to disable the base node GRPC server (default = true)
#grpc_enabled = true
Expand Down

0 comments on commit 6f411b0

Please sign in to comment.