From 724e441c2afa0c0205c7ade5139ebb999f8212b6 Mon Sep 17 00:00:00 2001 From: brianp Date: Wed, 8 Feb 2023 16:11:34 -0800 Subject: [PATCH] Update StageNet configuration Adds additional configuration for StageNet as the deafult network. --- applications/tari_merge_mining_proxy/src/config.rs | 4 ++-- base_layer/core/tests/helpers/block_builders.rs | 11 +++++++++++ base_layer/wallet_ffi/src/lib.rs | 2 +- base_layer/wallet_ffi/wallet.h | 2 +- common/config/presets/a_common.toml | 6 +++--- common/config/presets/b_peer_seeds.toml | 7 +++++++ common/config/presets/c_base_node.toml | 5 ++++- 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/applications/tari_merge_mining_proxy/src/config.rs b/applications/tari_merge_mining_proxy/src/config.rs index ebd3bcaff3..53d3a7d40e 100644 --- a/applications/tari_merge_mining_proxy/src/config.rs +++ b/applications/tari_merge_mining_proxy/src/config.rs @@ -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" "#; @@ -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" diff --git a/base_layer/core/tests/helpers/block_builders.rs b/base_layer/core/tests/helpers/block_builders.rs index b20a43cffd..cd0e3b4c96 100644 --- a/base_layer/core/tests/helpers/block_builders.rs +++ b/base_layer/core/tests/helpers/block_builders.rs @@ -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 diff --git a/base_layer/wallet_ffi/src/lib.rs b/base_layer/wallet_ffi/src/lib.rs index ca6cbd10ce..53b7dc8f36 100644 --- a/base_layer/wallet_ffi/src/lib.rs +++ b/base_layer/wallet_ffi/src/lib.rs @@ -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. /// diff --git a/base_layer/wallet_ffi/wallet.h b/base_layer/wallet_ffi/wallet.h index cbae1a0de6..3a0cf244b6 100644 --- a/base_layer/wallet_ffi/wallet.h +++ b/base_layer/wallet_ffi/wallet.h @@ -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. * diff --git a/common/config/presets/a_common.toml b/common/config/presets/a_common.toml index cc421be6cb..cbc1716d92 100644 --- a/common/config/presets/a_common.toml +++ b/common/config/presets/a_common.toml @@ -6,12 +6,12 @@ ######################################################################################################################## [common] -#override_from="esmeralda" +#override_from="stagenet" #base_path="/.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") diff --git a/common/config/presets/b_peer_seeds.toml b/common/config/presets/b_peer_seeds.toml index 826574beb7..bd9c5cfbc4 100644 --- a/common/config/presets/b_peer_seeds.toml +++ b/common/config/presets/b_peer_seeds.toml @@ -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"] diff --git a/common/config/presets/c_base_node.toml b/common/config/presets/c_base_node.toml index 092be9a138..02607a8c9f 100644 --- a/common/config/presets/c_base_node.toml +++ b/common/config/presets/c_base_node.toml @@ -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