From a99294fd707fedfcc476cb9841f3c861f58eb677 Mon Sep 17 00:00:00 2001 From: Boyu Yang Date: Mon, 16 Oct 2023 15:29:03 +0800 Subject: [PATCH] refactor: no plain-text private key in configuration file --- common/config-parser/src/types/config.rs | 66 +++++++++++++++++--- devtools/chain/bls.key | Bin 0 -> 32 bytes devtools/chain/config.toml | 5 +- devtools/chain/k8s/node_1.toml | 4 +- devtools/chain/k8s/node_1_bls.key | Bin 0 -> 32 bytes devtools/chain/k8s/node_1_net.key | 2 + devtools/chain/k8s/node_2.toml | 4 +- devtools/chain/k8s/node_2_bls.key | 1 + devtools/chain/k8s/node_2_net.key | 1 + devtools/chain/k8s/node_3.toml | 4 +- devtools/chain/k8s/node_3_bls.key | 1 + devtools/chain/k8s/node_3_net.key | 1 + devtools/chain/k8s/node_4.toml | 4 +- devtools/chain/k8s/node_4_bls.key | 1 + devtools/chain/k8s/node_4_net.key | 1 + devtools/chain/k8s/sync_nodes/node_5.toml | 70 ---------------------- devtools/chain/k8s/sync_nodes/node_6.toml | 70 ---------------------- devtools/chain/k8s/sync_nodes/node_7.toml | 70 ---------------------- devtools/chain/k8s/sync_nodes/node_8.toml | 70 ---------------------- devtools/chain/net.key | 2 + devtools/chain/nodes/node_1.toml | 4 +- devtools/chain/nodes/node_1_bls.key | Bin 0 -> 32 bytes devtools/chain/nodes/node_1_net.key | 2 + devtools/chain/nodes/node_2.toml | 4 +- devtools/chain/nodes/node_2_bls.key | 1 + devtools/chain/nodes/node_2_net.key | 1 + devtools/chain/nodes/node_3.toml | 4 +- devtools/chain/nodes/node_3_bls.key | 1 + devtools/chain/nodes/node_3_net.key | 1 + devtools/chain/nodes/node_4.toml | 4 +- devtools/chain/nodes/node_4_bls.key | 1 + devtools/chain/nodes/node_4_net.key | 1 + 32 files changed, 94 insertions(+), 307 deletions(-) create mode 100644 devtools/chain/bls.key create mode 100644 devtools/chain/k8s/node_1_bls.key create mode 100644 devtools/chain/k8s/node_1_net.key create mode 100644 devtools/chain/k8s/node_2_bls.key create mode 100644 devtools/chain/k8s/node_2_net.key create mode 100644 devtools/chain/k8s/node_3_bls.key create mode 100644 devtools/chain/k8s/node_3_net.key create mode 100644 devtools/chain/k8s/node_4_bls.key create mode 100644 devtools/chain/k8s/node_4_net.key delete mode 100644 devtools/chain/k8s/sync_nodes/node_5.toml delete mode 100644 devtools/chain/k8s/sync_nodes/node_6.toml delete mode 100644 devtools/chain/k8s/sync_nodes/node_7.toml delete mode 100644 devtools/chain/k8s/sync_nodes/node_8.toml create mode 100644 devtools/chain/net.key create mode 100644 devtools/chain/nodes/node_1_bls.key create mode 100644 devtools/chain/nodes/node_1_net.key create mode 100644 devtools/chain/nodes/node_2_bls.key create mode 100644 devtools/chain/nodes/node_2_net.key create mode 100644 devtools/chain/nodes/node_3_bls.key create mode 100644 devtools/chain/nodes/node_3_net.key create mode 100644 devtools/chain/nodes/node_4_bls.key create mode 100644 devtools/chain/nodes/node_4_net.key diff --git a/common/config-parser/src/types/config.rs b/common/config-parser/src/types/config.rs index daf9e7367..ff3bfb548 100644 --- a/common/config-parser/src/types/config.rs +++ b/common/config-parser/src/types/config.rs @@ -1,13 +1,17 @@ -use std::{collections::HashMap, ffi::OsStr, io, net::SocketAddr, path::PathBuf}; +use std::{ + collections::HashMap, + ffi::OsStr, + fs::File, + io::{self, Read as _}, + net::SocketAddr, + path::{Path, PathBuf}, +}; use clap::builder::{StringValueParser, TypedValueParser, ValueParserFactory}; use serde::Deserialize; use tentacle_multiaddr::MultiAddr; -use protocol::{ - codec::deserialize_256bits_key, - types::{Key256Bits, H160}, -}; +use protocol::types::{Key256Bits, H160}; use crate::parse_file; @@ -24,11 +28,13 @@ pub const DEFAULT_CACHE_SIZE: usize = 100; pub struct Config { // crypto /// `net_privkey` is used for network connection. - #[serde(deserialize_with = "deserialize_256bits_key")] - pub net_privkey: Key256Bits, + #[serde(skip)] + pub net_privkey: Key256Bits, + pub net_privkey_file: PathBuf, /// `bls_privkey` is used for signing consensus messages. - #[serde(deserialize_with = "deserialize_256bits_key")] - pub bls_privkey: Key256Bits, + #[serde(skip)] + pub bls_privkey: Key256Bits, + pub bls_privkey_file: PathBuf, // db config pub data_path: PathBuf, @@ -124,9 +130,51 @@ impl TypedValueParser for ConfigValueParser { ); clap::Error::raw(kind, msg) }) + .and_then(|mut config: Self::Value| { + let privkey_path = dir_path.join(&config.net_privkey_file); + config.net_privkey = load_privkey_from_file(&privkey_path)?; + Ok(config) + }) + .and_then(|mut config: Self::Value| { + let privkey_path = dir_path.join(&config.bls_privkey_file); + config.bls_privkey = load_privkey_from_file(&privkey_path)?; + Ok(config) + }) } } +fn load_privkey_from_file(privkey_path: &Path) -> Result { + File::open(privkey_path) + .and_then(|mut f| { + let mut buffer = Vec::new(); + f.read_to_end(&mut buffer).map(|_| buffer) + }) + .map_err(|err| { + let kind = clap::error::ErrorKind::InvalidValue; + let msg = format!( + "failed to parse private key file {} since {err}", + privkey_path.display() + ); + clap::Error::raw(kind, msg) + }) + .and_then(|bytes| { + const LEN: usize = 32; + if bytes.len() == LEN { + let mut v = [0u8; 32]; + v.copy_from_slice(&bytes); + Ok(Key256Bits::from(v)) + } else { + let kind = clap::error::ErrorKind::InvalidValue; + let msg = format!( + "failed to parse private key file {} since its length is {} but expect {LEN}.", + privkey_path.display(), + bytes.len() + ); + Err(clap::Error::raw(kind, msg)) + } + }) +} + #[derive(Clone, Debug, Deserialize)] pub struct ConfigApi { pub http_listening_address: Option, diff --git a/devtools/chain/bls.key b/devtools/chain/bls.key new file mode 100644 index 0000000000000000000000000000000000000000..fb6b29a015997c61acf8834b8ef7048fe121b8df GIT binary patch literal 32 ocmZ>)+z=mib?=p&m0k0?oue6+vV`gWW6G$Q`u4l~-LLl~00%G-ga7~l literal 0 HcmV?d00001 diff --git a/devtools/chain/config.toml b/devtools/chain/config.toml index 8052429a5..19e964e1f 100644 --- a/devtools/chain/config.toml +++ b/devtools/chain/config.toml @@ -1,8 +1,9 @@ # crypto +# file paths to private keys. # net_privkey is used for network, bls_privkey is use for sign consensus messages # DO NOT USE this private key in any production environment! -net_privkey = "0x37aa0f893d05914a4def0460c0a984d3611546cfb26924d7a7ca6e0db9950a2d" -bls_privkey = "0x4179b05f5ad5bdd46ca98a9e8b435b00a504562dfe02687895edf747ddf5de18" +net_privkey_file = "net.key" +bls_privkey_file = "bls.key" # db config data_path = "./devtools/chain/data" diff --git a/devtools/chain/k8s/node_1.toml b/devtools/chain/k8s/node_1.toml index 5ff758ce2..c4b5cff0d 100644 --- a/devtools/chain/k8s/node_1.toml +++ b/devtools/chain/k8s/node_1.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x37aa0f893d05914a4def0460c0a984d3611546cfb26924d7a7ca6e0db9950a2d" -bls_privkey = "0x4179b05f5ad5bdd46ca98a9e8b435b00a504562dfe02687895edf747ddf5de18" +net_privkey_file = "node_1_net.key" +bls_privkey_file = "node_1_bls.key" # db config data_path = "./devtools/chain/data1" diff --git a/devtools/chain/k8s/node_1_bls.key b/devtools/chain/k8s/node_1_bls.key new file mode 100644 index 0000000000000000000000000000000000000000..fb6b29a015997c61acf8834b8ef7048fe121b8df GIT binary patch literal 32 ocmZ>)+z=mib?=p&m0k0?oue6+vV`gWW6G$Q`u4l~-LLl~00%G-ga7~l literal 0 HcmV?d00001 diff --git a/devtools/chain/k8s/node_1_net.key b/devtools/chain/k8s/node_1_net.key new file mode 100644 index 000000000..5a5922e28 --- /dev/null +++ b/devtools/chain/k8s/node_1_net.key @@ -0,0 +1,2 @@ +7=JM`aFϲi$קn +- \ No newline at end of file diff --git a/devtools/chain/k8s/node_2.toml b/devtools/chain/k8s/node_2.toml index 56ab53a55..f4afd65d2 100644 --- a/devtools/chain/k8s/node_2.toml +++ b/devtools/chain/k8s/node_2.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x383fcff8683b8115e31613949be24254b4204ffbe43c227408a76334a2e3fb32" -bls_privkey = "0x422951d5ac7ddbe86cae7d2d4c82af713785b3177043ac6feb50eda7e360b860" +net_privkey_file = "node_2_net.key" +bls_privkey_file = "node_2_bls.key" # db config data_path = "./devtools/chain/data2" diff --git a/devtools/chain/k8s/node_2_bls.key b/devtools/chain/k8s/node_2_bls.key new file mode 100644 index 000000000..cd6f02556 --- /dev/null +++ b/devtools/chain/k8s/node_2_bls.key @@ -0,0 +1 @@ +B)Qլ}l}-Lq7pCoP`` \ No newline at end of file diff --git a/devtools/chain/k8s/node_2_net.key b/devtools/chain/k8s/node_2_net.key new file mode 100644 index 000000000..447f6d0eb --- /dev/null +++ b/devtools/chain/k8s/node_2_net.key @@ -0,0 +1 @@ +8?h;BT O<"tc42 \ No newline at end of file diff --git a/devtools/chain/k8s/node_3.toml b/devtools/chain/k8s/node_3.toml index e0608b012..13ebb3f7c 100644 --- a/devtools/chain/k8s/node_3.toml +++ b/devtools/chain/k8s/node_3.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x51ce21643b911347c5d5c85c323d9d5421810dc89f46b688720b2715f5e8e936" -bls_privkey = "0x51a04542786ca3bae046d1c7451b6a0745efdcc66c39ede37827172f964d5fdf" +net_privkey_file = "node_3_net.key" +bls_privkey_file = "node_3_bls.key" # db config data_path = "./devtools/chain/data3" diff --git a/devtools/chain/k8s/node_3_bls.key b/devtools/chain/k8s/node_3_bls.key new file mode 100644 index 000000000..842aa1f0a --- /dev/null +++ b/devtools/chain/k8s/node_3_bls.key @@ -0,0 +1 @@ +QEBxlFEjEl9x'/M_ \ No newline at end of file diff --git a/devtools/chain/k8s/node_3_net.key b/devtools/chain/k8s/node_3_net.key new file mode 100644 index 000000000..11c4efc2f --- /dev/null +++ b/devtools/chain/k8s/node_3_net.key @@ -0,0 +1 @@ +Q!d;G\2=T! ȟFr '6 \ No newline at end of file diff --git a/devtools/chain/k8s/node_4.toml b/devtools/chain/k8s/node_4.toml index 16b48542c..c4f519b9b 100644 --- a/devtools/chain/k8s/node_4.toml +++ b/devtools/chain/k8s/node_4.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x69ff51f4c22f30615f68b88efa740f8f1b9169e88842b83d189748d06f1a948e" -bls_privkey = "0x67fc8772fdcff8140564e9c4ed693fffd0929c68f24529ee2fb2adfbe9c453fe" +net_privkey_file = "node_4_net.key" +bls_privkey_file = "node_4_bls.key" # db config data_path = "./devtools/chain/data4" diff --git a/devtools/chain/k8s/node_4_bls.key b/devtools/chain/k8s/node_4_bls.key new file mode 100644 index 000000000..a8566e265 --- /dev/null +++ b/devtools/chain/k8s/node_4_bls.key @@ -0,0 +1 @@ +grdi?ВhE)/S \ No newline at end of file diff --git a/devtools/chain/k8s/node_4_net.key b/devtools/chain/k8s/node_4_net.key new file mode 100644 index 000000000..f44ad278f --- /dev/null +++ b/devtools/chain/k8s/node_4_net.key @@ -0,0 +1 @@ +iQ/0a_htiB=Ho \ No newline at end of file diff --git a/devtools/chain/k8s/sync_nodes/node_5.toml b/devtools/chain/k8s/sync_nodes/node_5.toml deleted file mode 100644 index 9725fc210..000000000 --- a/devtools/chain/k8s/sync_nodes/node_5.toml +++ /dev/null @@ -1,70 +0,0 @@ -# crypto -privkey = "0x0179ffa9c9d7bfdef64b29b5800bf6954caa033973a875ddc4393826b9c78db0" - -# db config -data_path = "./devtools/chain/data5" - -[rpc] -http_listening_address = "0.0.0.0:8000" -ws_listening_address = "0.0.0.0:8010" -maxconn = 25000 -max_payload_size = 10485760 -client_version = "0.1.0" - -[network] -listening_address = "/ip4/0.0.0.0/tcp/8001" -rpc_timeout = 10 - -[synchronization] -sync_txs_chunk_size = 5000 - -[[network.bootstraps]] -multi_address = "/dns4/axon1/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj" - -[[network.bootstraps]] -multi_address = "/dns4/axon2/tcp/8001/p2p/QmaHBJqULbLGDn7Td196goNebH6XMTMMu2sKNNP2DiX9S2" - -[[network.bootstraps]] -multi_address = "/dns4/axon3/tcp/8001/p2p/QmQLufVVmBuHKoYhdDCqUFYVtLYs1quryoaA1mkQYQdWkn" - -[[network.bootstraps]] -multi_address = "/dns4/axon4/tcp/8001/p2p/QmXoSkz4zkHHiFZqmDZQ4gFYtJ72uqtp4m6FX373X4VkRq" - -[[network.bootstraps]] -multi_address = "/dns4/axon5/tcp/8001/p2p/QmQwC19oF4hFeGtdnh6WDDVQW21wrKBmWZQwYDJjgNPN1e" - -[[network.bootstraps]] -multi_address = "/dns4/axon6/tcp/8001/p2p/QmXD1VMW32oL9CXn9vYovTtUsfDrwSQ3ck85VAcTXwShTb" - -[[network.bootstraps]] -multi_address = "/dns4/axon7/tcp/8001/p2p/QmPtrSTykXdJTnSMRqtXUY7Qy7FzvCcd1um1s3qyYprpBc" - -[[network.bootstraps]] -multi_address = "/dns4/axon8/tcp/8001/p2p/QmXVWZ2QgnK4FQhQ9gVagyxzbcaV7XU5qZT8VuBMjqKDar" - -[mempool] -timeout_gap = 20 -pool_size = 20000000 -broadcast_txs_size = 200 -broadcast_txs_interval = 200 - -[executor] -triedb_cache_size = 500 - -[logger] -filter = "info" -log_to_console = true -console_show_file_and_line = false -log_path = "logs/" -log_to_file = true -file_size_limit = 1073741824 # 1 GiB -metrics = true -# you can specify log level for modules with config below -# modules_level = { "overlord::state::process" = "debug", core_consensus = "error" } - -[rocksdb] -max_open_files = 64 -cache_size = 200 -# Provide an options file to tune RocksDB for your workload and your system configuration. -# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). -options_file = "default.db-options" diff --git a/devtools/chain/k8s/sync_nodes/node_6.toml b/devtools/chain/k8s/sync_nodes/node_6.toml deleted file mode 100644 index e307c3474..000000000 --- a/devtools/chain/k8s/sync_nodes/node_6.toml +++ /dev/null @@ -1,70 +0,0 @@ -# crypto -privkey = "0x3914e28bdc5da1112f60bba7c3b3138c75fdbd334043f25fd297589143860ad5" - -# db config -data_path = "./devtools/chain/data6" - -[rpc] -http_listening_address = "0.0.0.0:8000" -ws_listening_address = "0.0.0.0:8010" -maxconn = 25000 -max_payload_size = 10485760 -client_version = "0.1.0" - -[network] -listening_address = "/ip4/0.0.0.0/tcp/8001" -rpc_timeout = 10 - -[synchronization] -sync_txs_chunk_size = 5000 - -[[network.bootstraps]] -multi_address = "/dns4/axon1/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj" - -[[network.bootstraps]] -multi_address = "/dns4/axon2/tcp/8001/p2p/QmaHBJqULbLGDn7Td196goNebH6XMTMMu2sKNNP2DiX9S2" - -[[network.bootstraps]] -multi_address = "/dns4/axon3/tcp/8001/p2p/QmQLufVVmBuHKoYhdDCqUFYVtLYs1quryoaA1mkQYQdWkn" - -[[network.bootstraps]] -multi_address = "/dns4/axon4/tcp/8001/p2p/QmXoSkz4zkHHiFZqmDZQ4gFYtJ72uqtp4m6FX373X4VkRq" - -[[network.bootstraps]] -multi_address = "/dns4/axon5/tcp/8001/p2p/QmQwC19oF4hFeGtdnh6WDDVQW21wrKBmWZQwYDJjgNPN1e" - -[[network.bootstraps]] -multi_address = "/dns4/axon6/tcp/8001/p2p/QmXD1VMW32oL9CXn9vYovTtUsfDrwSQ3ck85VAcTXwShTb" - -[[network.bootstraps]] -multi_address = "/dns4/axon7/tcp/8001/p2p/QmPtrSTykXdJTnSMRqtXUY7Qy7FzvCcd1um1s3qyYprpBc" - -[[network.bootstraps]] -multi_address = "/dns4/axon8/tcp/8001/p2p/QmXVWZ2QgnK4FQhQ9gVagyxzbcaV7XU5qZT8VuBMjqKDar" - -[mempool] -timeout_gap = 20 -pool_size = 20000000 -broadcast_txs_size = 200 -broadcast_txs_interval = 200 - -[executor] -triedb_cache_size = 500 - -[logger] -filter = "info" -log_to_console = true -console_show_file_and_line = false -log_path = "logs/" -log_to_file = true -file_size_limit = 1073741824 # 1 GiB -metrics = true -# you can specify log level for modules with config below -# modules_level = { "overlord::state::process" = "debug", core_consensus = "error" } - -[rocksdb] -max_open_files = 64 -cache_size = 200 -# Provide an options file to tune RocksDB for your workload and your system configuration. -# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). -options_file = "default.db-options" diff --git a/devtools/chain/k8s/sync_nodes/node_7.toml b/devtools/chain/k8s/sync_nodes/node_7.toml deleted file mode 100644 index b3b45a670..000000000 --- a/devtools/chain/k8s/sync_nodes/node_7.toml +++ /dev/null @@ -1,70 +0,0 @@ -# crypto -privkey = "0x69e99b40bc26bbbafe68989b3972eb1028b5c8de3eac20a1fb2b68f3a259722e" - -# db config -data_path = "./devtools/chain/data7" - -[rpc] -http_listening_address = "0.0.0.0:8000" -ws_listening_address = "0.0.0.0:8010" -maxconn = 25000 -max_payload_size = 10485760 -client_version = "0.1.0" - -[network] -listening_address = "/ip4/0.0.0.0/tcp/8001" -rpc_timeout = 10 - -[synchronization] -sync_txs_chunk_size = 5000 - -[[network.bootstraps]] -multi_address = "/dns4/axon1/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj" - -[[network.bootstraps]] -multi_address = "/dns4/axon2/tcp/8001/p2p/QmaHBJqULbLGDn7Td196goNebH6XMTMMu2sKNNP2DiX9S2" - -[[network.bootstraps]] -multi_address = "/dns4/axon3/tcp/8001/p2p/QmQLufVVmBuHKoYhdDCqUFYVtLYs1quryoaA1mkQYQdWkn" - -[[network.bootstraps]] -multi_address = "/dns4/axon4/tcp/8001/p2p/QmXoSkz4zkHHiFZqmDZQ4gFYtJ72uqtp4m6FX373X4VkRq" - -[[network.bootstraps]] -multi_address = "/dns4/axon5/tcp/8001/p2p/QmQwC19oF4hFeGtdnh6WDDVQW21wrKBmWZQwYDJjgNPN1e" - -[[network.bootstraps]] -multi_address = "/dns4/axon6/tcp/8001/p2p/QmXD1VMW32oL9CXn9vYovTtUsfDrwSQ3ck85VAcTXwShTb" - -[[network.bootstraps]] -multi_address = "/dns4/axon7/tcp/8001/p2p/QmPtrSTykXdJTnSMRqtXUY7Qy7FzvCcd1um1s3qyYprpBc" - -[[network.bootstraps]] -multi_address = "/dns4/axon8/tcp/8001/p2p/QmXVWZ2QgnK4FQhQ9gVagyxzbcaV7XU5qZT8VuBMjqKDar" - -[mempool] -timeout_gap = 20 -pool_size = 20000000 -broadcast_txs_size = 200 -broadcast_txs_interval = 200 - -[executor] -triedb_cache_size = 500 - -[logger] -filter = "info" -log_to_console = true -console_show_file_and_line = false -log_path = "logs/" -log_to_file = true -file_size_limit = 1073741824 # 1 GiB -metrics = true -# you can specify log level for modules with config below -# modules_level = { "overlord::state::process" = "debug", core_consensus = "error" } - -[rocksdb] -max_open_files = 64 -cache_size = 200 -# Provide an options file to tune RocksDB for your workload and your system configuration. -# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). -options_file = "default.db-options" diff --git a/devtools/chain/k8s/sync_nodes/node_8.toml b/devtools/chain/k8s/sync_nodes/node_8.toml deleted file mode 100644 index 2de28d884..000000000 --- a/devtools/chain/k8s/sync_nodes/node_8.toml +++ /dev/null @@ -1,70 +0,0 @@ -# crypto -privkey = "0x2df9df719f297aa88bfa2d5278743ac7c6612285716ea5db49a2fb8b6216a4a2" - -# db config -data_path = "./devtools/chain/data8" - -[rpc] -http_listening_address = "0.0.0.0:8000" -ws_listening_address = "0.0.0.0:8010" -maxconn = 25000 -max_payload_size = 10485760 -client_version = "0.1.0" - -[network] -listening_address = "/ip4/0.0.0.0/tcp/8001" -rpc_timeout = 10 - -[synchronization] -sync_txs_chunk_size = 5000 - -[[network.bootstraps]] -multi_address = "/dns4/axon1/tcp/8001/p2p/QmNk6bBwkLPuqnsrtxpp819XLZY3ymgjs3p1nKtxBVgqxj" - -[[network.bootstraps]] -multi_address = "/dns4/axon2/tcp/8001/p2p/QmaHBJqULbLGDn7Td196goNebH6XMTMMu2sKNNP2DiX9S2" - -[[network.bootstraps]] -multi_address = "/dns4/axon3/tcp/8001/p2p/QmQLufVVmBuHKoYhdDCqUFYVtLYs1quryoaA1mkQYQdWkn" - -[[network.bootstraps]] -multi_address = "/dns4/axon4/tcp/8001/p2p/QmXoSkz4zkHHiFZqmDZQ4gFYtJ72uqtp4m6FX373X4VkRq" - -[[network.bootstraps]] -multi_address = "/dns4/axon5/tcp/8001/p2p/QmQwC19oF4hFeGtdnh6WDDVQW21wrKBmWZQwYDJjgNPN1e" - -[[network.bootstraps]] -multi_address = "/dns4/axon6/tcp/8001/p2p/QmXD1VMW32oL9CXn9vYovTtUsfDrwSQ3ck85VAcTXwShTb" - -[[network.bootstraps]] -multi_address = "/dns4/axon7/tcp/8001/p2p/QmPtrSTykXdJTnSMRqtXUY7Qy7FzvCcd1um1s3qyYprpBc" - -[[network.bootstraps]] -multi_address = "/dns4/axon8/tcp/8001/p2p/QmXVWZ2QgnK4FQhQ9gVagyxzbcaV7XU5qZT8VuBMjqKDar" - -[mempool] -timeout_gap = 20 -pool_size = 20000000 -broadcast_txs_size = 200 -broadcast_txs_interval = 200 - -[executor] -triedb_cache_size = 500 - -[logger] -filter = "info" -log_to_console = true -console_show_file_and_line = false -log_path = "logs/" -log_to_file = true -file_size_limit = 1073741824 # 1 GiB -metrics = true -# you can specify log level for modules with config below -# modules_level = { "overlord::state::process" = "debug", core_consensus = "error" } - -[rocksdb] -max_open_files = 64 -cache_size = 200 -# Provide an options file to tune RocksDB for your workload and your system configuration. -# More details can be found in [the official tuning guide](https://github.com/facebook/rocksdb/wiki/RocksDB-Tuning-Guide). -options_file = "default.db-options" diff --git a/devtools/chain/net.key b/devtools/chain/net.key new file mode 100644 index 000000000..5a5922e28 --- /dev/null +++ b/devtools/chain/net.key @@ -0,0 +1,2 @@ +7=JM`aFϲi$קn +- \ No newline at end of file diff --git a/devtools/chain/nodes/node_1.toml b/devtools/chain/nodes/node_1.toml index 6aba2724d..c184dde49 100644 --- a/devtools/chain/nodes/node_1.toml +++ b/devtools/chain/nodes/node_1.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x37aa0f893d05914a4def0460c0a984d3611546cfb26924d7a7ca6e0db9950a2d" -bls_privkey = "0x4179b05f5ad5bdd46ca98a9e8b435b00a504562dfe02687895edf747ddf5de18" +net_privkey_file = "node_1_net.key" +bls_privkey_file = "node_1_bls.key" # db config data_path = "./devtools/chain/data/node_1" diff --git a/devtools/chain/nodes/node_1_bls.key b/devtools/chain/nodes/node_1_bls.key new file mode 100644 index 0000000000000000000000000000000000000000..fb6b29a015997c61acf8834b8ef7048fe121b8df GIT binary patch literal 32 ocmZ>)+z=mib?=p&m0k0?oue6+vV`gWW6G$Q`u4l~-LLl~00%G-ga7~l literal 0 HcmV?d00001 diff --git a/devtools/chain/nodes/node_1_net.key b/devtools/chain/nodes/node_1_net.key new file mode 100644 index 000000000..5a5922e28 --- /dev/null +++ b/devtools/chain/nodes/node_1_net.key @@ -0,0 +1,2 @@ +7=JM`aFϲi$קn +- \ No newline at end of file diff --git a/devtools/chain/nodes/node_2.toml b/devtools/chain/nodes/node_2.toml index 6f3b72fb6..517b9cb8a 100644 --- a/devtools/chain/nodes/node_2.toml +++ b/devtools/chain/nodes/node_2.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x383fcff8683b8115e31613949be24254b4204ffbe43c227408a76334a2e3fb32" -bls_privkey = "0x422951d5ac7ddbe86cae7d2d4c82af713785b3177043ac6feb50eda7e360b860" +net_privkey_file = "node_2_net.key" +bls_privkey_file = "node_2_bls.key" # db config data_path = "./devtools/chain/data/node_2" diff --git a/devtools/chain/nodes/node_2_bls.key b/devtools/chain/nodes/node_2_bls.key new file mode 100644 index 000000000..cd6f02556 --- /dev/null +++ b/devtools/chain/nodes/node_2_bls.key @@ -0,0 +1 @@ +B)Qլ}l}-Lq7pCoP`` \ No newline at end of file diff --git a/devtools/chain/nodes/node_2_net.key b/devtools/chain/nodes/node_2_net.key new file mode 100644 index 000000000..447f6d0eb --- /dev/null +++ b/devtools/chain/nodes/node_2_net.key @@ -0,0 +1 @@ +8?h;BT O<"tc42 \ No newline at end of file diff --git a/devtools/chain/nodes/node_3.toml b/devtools/chain/nodes/node_3.toml index 4ca7e7f62..91d3991be 100644 --- a/devtools/chain/nodes/node_3.toml +++ b/devtools/chain/nodes/node_3.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x51ce21643b911347c5d5c85c323d9d5421810dc89f46b688720b2715f5e8e936" -bls_privkey = "0x51a04542786ca3bae046d1c7451b6a0745efdcc66c39ede37827172f964d5fdf" +net_privkey_file = "node_3_net.key" +bls_privkey_file = "node_3_bls.key" # db config data_path = "./devtools/chain/data/node_3" diff --git a/devtools/chain/nodes/node_3_bls.key b/devtools/chain/nodes/node_3_bls.key new file mode 100644 index 000000000..842aa1f0a --- /dev/null +++ b/devtools/chain/nodes/node_3_bls.key @@ -0,0 +1 @@ +QEBxlFEjEl9x'/M_ \ No newline at end of file diff --git a/devtools/chain/nodes/node_3_net.key b/devtools/chain/nodes/node_3_net.key new file mode 100644 index 000000000..11c4efc2f --- /dev/null +++ b/devtools/chain/nodes/node_3_net.key @@ -0,0 +1 @@ +Q!d;G\2=T! ȟFr '6 \ No newline at end of file diff --git a/devtools/chain/nodes/node_4.toml b/devtools/chain/nodes/node_4.toml index 29e64952a..6f9f03193 100644 --- a/devtools/chain/nodes/node_4.toml +++ b/devtools/chain/nodes/node_4.toml @@ -1,6 +1,6 @@ # crypto -net_privkey = "0x69ff51f4c22f30615f68b88efa740f8f1b9169e88842b83d189748d06f1a948e" -bls_privkey = "0x67fc8772fdcff8140564e9c4ed693fffd0929c68f24529ee2fb2adfbe9c453fe" +net_privkey_file = "node_4_net.key" +bls_privkey_file = "node_4_bls.key" # db config data_path = "./devtools/chain/data/node_4" diff --git a/devtools/chain/nodes/node_4_bls.key b/devtools/chain/nodes/node_4_bls.key new file mode 100644 index 000000000..a8566e265 --- /dev/null +++ b/devtools/chain/nodes/node_4_bls.key @@ -0,0 +1 @@ +grdi?ВhE)/S \ No newline at end of file diff --git a/devtools/chain/nodes/node_4_net.key b/devtools/chain/nodes/node_4_net.key new file mode 100644 index 000000000..f44ad278f --- /dev/null +++ b/devtools/chain/nodes/node_4_net.key @@ -0,0 +1 @@ +iQ/0a_htiB=Ho \ No newline at end of file