From 7fe1ba12d45c9e3c832294147d61e770e1226bd0 Mon Sep 17 00:00:00 2001 From: zoz <97761083+0xzoz@users.noreply.github.com> Date: Sun, 12 May 2024 13:54:40 -0700 Subject: [PATCH] [docs] add key rotation document (#238) --- Cargo.lock | 23 ++--- docs/hot_upgrades.md | 22 +++-- docs/key_rotation.md | 93 +++++++++++++++++++ private-keys.yaml | 6 -- public-keys.yaml | 7 -- tools/config/src/make_yaml_public_fullnode.rs | 2 +- tools/txs/Cargo.toml | 1 + tools/txs/src/submit_transaction.rs | 4 +- tools/txs/src/txs_cli_community.rs | 2 +- tools/txs/src/txs_cli_user.rs | 74 ++++++++++----- tools/txs/tests/key_rotation.rs | 12 +-- types/src/legacy_types/app_cfg.rs | 6 +- validator-full-node-identity.yaml | 3 - validator-identity.yaml | 5 - 14 files changed, 184 insertions(+), 76 deletions(-) create mode 100644 docs/key_rotation.md delete mode 100644 private-keys.yaml delete mode 100644 public-keys.yaml delete mode 100644 validator-full-node-identity.yaml delete mode 100644 validator-identity.yaml diff --git a/Cargo.lock b/Cargo.lock index 6e910133c..20b8ad4af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5644,7 +5644,7 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libra" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "clap 4.5.4", @@ -5664,7 +5664,7 @@ dependencies = [ [[package]] name = "libra-cached-packages" -version = "7.0.1" +version = "7.0.2" dependencies = [ "bcs 0.1.4", "diem-types", @@ -5675,7 +5675,7 @@ dependencies = [ [[package]] name = "libra-config" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "clap 4.5.4", @@ -5699,7 +5699,7 @@ dependencies = [ [[package]] name = "libra-framework" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "bcs 0.1.4", @@ -5719,7 +5719,7 @@ dependencies = [ [[package]] name = "libra-genesis-tools" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "base64 0.13.1", @@ -5756,7 +5756,7 @@ dependencies = [ [[package]] name = "libra-query" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "clap 4.5.4", @@ -5796,11 +5796,12 @@ dependencies = [ [[package]] name = "libra-txs" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "bcs 0.1.4", "clap 4.5.4", + "dialoguer", "diem", "diem-crypto", "diem-forge", @@ -5828,7 +5829,7 @@ dependencies = [ [[package]] name = "libra-types" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "async-trait", @@ -5863,7 +5864,7 @@ dependencies = [ [[package]] name = "libra-wallet" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "blst", @@ -9185,7 +9186,7 @@ dependencies = [ [[package]] name = "storage" -version = "7.0.1" +version = "7.0.2" dependencies = [ "anyhow", "bcs 0.1.4", @@ -9964,7 +9965,7 @@ dependencies = [ [[package]] name = "transactional-tests" -version = "7.0.1" +version = "7.0.2" dependencies = [ "datatest-stable", "diem-transactional-test-harness", diff --git a/docs/hot_upgrades.md b/docs/hot_upgrades.md index 6e40f3e34..2a4968853 100644 --- a/docs/hot_upgrades.md +++ b/docs/hot_upgrades.md @@ -5,12 +5,16 @@ The "framework" which contains all the consensus, account, econ policies, etc. for the network is written in Move. This code is stored in the network database, and effectively executed on demand. This means that framework upgrades can occur without redeploying the Move VM itself, or the supporting system code (network node software). It also means the state machine can upgrade without a coordinated halt. -- To do this we require the `libra` cli tool. The subcommand `libra move framework` is used for building the artifacts, and `libra txs` for proposing, voting, and ultimately deploying the artifacts. +- To do this we require the `libra` and `libra-framework` cli tools. The command `libra-framework` is used for building the artifacts, and `libra txs` for proposing, voting, and ultimately deploying the artifacts. + +## Historical Upgrade Information and Proposing Upgrades +Historical upgrade information since release 7.0.0 is canonically stored in the [upgrade repository](https://github.com/0LNetworkCommunity/upgrades). To submit an upgrade proposal, you should draft a PR with the relevant information detailing the upgrade using the provided [template](https://github.com/0LNetworkCommunity/upgrades/tree/main/proposals/template) and include the upgrade script packages. + ## TLDR - **Fetch the latest release**: `cd libra-framework; git fetch --all; git checkout release-x.x.x` -- **Build framework**: `libra move framework upgrade --output-dir ~/framework_upgrade --framework-local-dir ~/libra-framework/framework/` -- **Propose**: `libra txs governance propose --proposal-script-dir ~/framework_upgrade/1-move-stdlib/ --metadata-url https://www.github.com/0LNetworkCommunity/UpdateProposalTemplate` +- **Build framework**: `libra-framework upgrade --output-dir ~/framework_upgrade --framework-local-dir ~/libra-framework/framework/` +- **Propose**: `libra txs governance propose --proposal-script-dir ~/framework_upgrade/1-move-stdlib/ --metadata-url https://github.com/0LNetworkCommunity/upgrades/tree/main/proposals/template` - **Validators vote**: `libra txs governance vote --proposal-id ` - **Resolve**: @@ -39,7 +43,7 @@ Multiple framework upgrades require a more nuanced approach, especially regardin - **Build Framework**: Similar to a single upgrade, start by generating Move transaction scripts for all relevant modules. - **Proposal for Initial Module**: Propose the upgrade by using the first module (`1-move-stdlib`). This initial proposal is critical as it kickstarts the governance process for the entire upgrade. - Importantly, the transaction script for upgrading this first module includes a significant addition: **the transaction hash for the subsequent modules** that needs upgrading. These hashes, produced during the artifact building phase, serve as secure identifiers for each module's upgrade script. +Importantly, the transaction script for upgrading this first module includes a significant addition: **the transaction hash for the subsequent modules** that needs upgrading. These hashes, produced during the artifact building phase, serve as secure identifiers for each module's upgrade script. - **Validator Voting**: As with single upgrades, validators vote for or against the proposed upgrade. - **Achieving Consensus and Sequential Resolution**: Once at least 66% of active validators support the proposal, the initial upgrade can be resolved. @@ -72,7 +76,7 @@ This will be a Move package which is machine-generated for a one-time execution. An upgrade script that is tampered with will yield a different execution hash, and will be prevented from running (it is likely to be blocked by the transaction size limits before entering the mempool). -The `libra move framework upgrade` command will produce a newly compiled Move upgrade transaction script, its binary, and the hash. +The `libra-framework upgrade` command will produce a newly compiled Move upgrade transaction script, its binary, and the hash. You need to provide: - `--output-dir`: this directory the upgrade transaction files should be saved to. A new folder called `framework_upgrade` will be created under the output-dir path. @@ -83,10 +87,10 @@ Optionally you could provide the flag `--danger-force-upgrade ``` # Note the paths -libra move framework upgrade --output-dir --framework-local-dir +libra-framework upgrade --output-dir --framework-local-dir # Example -libra move framework upgrade --output-dir ~/framework_upgrade --framework-local-dir ~/libra-framework/framework/ +libra-framework upgrade --output-dir ~/framework_upgrade --framework-local-dir ~/libra-framework/framework/ ``` :::note This creates 3 seperate library upgrade script directories @@ -128,7 +132,7 @@ You can query the next proposal using this command: ` libra query view --functio We assume the default is to vote in favor. To vote "approve" simply: ``` -libra txs governance vote --proposal-id +libra txs governance vote --proposal-id ``` If voter would like the proposal to be rejected: @@ -139,7 +143,7 @@ libra txs governance vote --proposal-id --should-fail You can query to see the for and against votes using this command: ` libra query view --function-id 0x1::diem_governance::get_votes --args ` ::: -After everyone has voted (to reach the consensus threshold of 66% as of `V7`), the proposal will be in a "Resolvable" state. Anyone can resolve it by submitting the upgrade transaction. This means the sender must have the source transaction script for the upgrade (step #1 above). +After everyone has voted (to reach the consensus threshold of 66% as of `V7`), the proposal will be in a "Resolvable" state. Anyone can resolve it by submitting the upgrade transaction. This means the sender must have the source transaction script for the upgrade (step #1 above). ##### 6. Use `txs` to resolve a successfully approved proposal ``` diff --git a/docs/key_rotation.md b/docs/key_rotation.md new file mode 100644 index 000000000..4529f8c0f --- /dev/null +++ b/docs/key_rotation.md @@ -0,0 +1,93 @@ +# Key Rotation +> CAUTION: Please read carefully and ensure you understand these instructions. Rotating the wrong key could lock you out of your account and make funds permanently inaccessible. + +There are two cases: + +1) You are in full control of an account and would like to rotate to a new private key (using a new mnemonic). + +This is a single step, and you can simply use the current mnemonic to sign a transaction and the new mnemonic to sign a rotation proof. + +2) You are claiming an account from someone else. + +This requires two steps where the current owner (Alice) will first authorize an existing account of the new owner (Bob) to rotate keys for the account being claimed. Bob will have two accounts at the end of the process, and the prior owner, Alice, will have none. + +## CASE 1: Rotate Keys on Your Wallet + +You will be prompted for a mnemonic twice. But these should be DIFFERENT mnemonics. + +The first mnemonic is for your current credentials which will be deprecated. It is used to sign and send the rotation transaction to the blockchain. + +In the process, you will be prompted for the NEW mnemonic you would like to be using going forward. + +Additionally, you can expect the CLI tool to ask you to confirm this operation twice in the process. + +```bash +libra txs user rotate-key +``` + +Note: If you have an advanced case and would like to submit the private key itself, see below. + +## CASE 2: Claim an account + +There are two steps involved in claiming another account. First, some definitions: +- There are two parties Original Owner (Alice, for example) and New Owner (Bob). + +- Alice is offering the Claimed Account (`0x123`) to Bob. + +- Bob must already have a separate Delegate Account on-chain (`0x456`). The only reason for this is that Bob needs to do some sensitive signing of keys and submit it to the chain, and there's no way for Alice or really anyone else to do this for him. + +- Bob will also require a New Mnemonic, which he will use to control the Claimed Account in the future. + +With all that in place: + +#### Original Owner Alice's Job + +Alice will send a transaction to "delegate" Bob's account `0x456` with the power to rotate the keys to `0x123`. + +Alice's job ends here. + +#### New Owner Bob's Job + +Next, Bob needs his usual credentials for `0x456`, and also the New Mnemonic he plans to use for `0x123`. + +He submits a transaction (after a bit of processing of the New Mnemonic private keys), which should successfully rotate the keys to `0x123`. + +The job of the Delegate account `0x456` is over (the account could even be disposed of). + +## Step 1: Original Owner Delegates Rotation Capability +Grant another user the capability to change the Authentication Key for a specified address. You will be prompted to enter the mnemonic for the address whose authentication key will be changed: + +```bash +libra txs user rotation-capability --delegate-address +``` + +The specified delegate address can now rotate authentication keys on the address for which the mnemonic was provided. + +## Step 2: New Owner Rotates Authentication Keys Using the Delegated Address +Enables a delegated user to rotate the Authentication Key for a specified wallet address: + +```bash +libra txs user rotate-key --claim-address +``` + +# Cheat Sheet + +### Create a new mnemonic +``` +libra wallet keygen +``` + +# Advanced: Optionally Input the Private Key +To recover a private key using a mnemonic, use: + +```bash +libra wallet keygen --mnemonic --output-dir +``` + +Your private key will be stored in a file called `private_keys.yaml` in the directory you specified above. Specifically, it's called `account_private_key`. The private key corresponds with the `account_address` above it. + +Once you have a private key, you can submit the transaction by explicitly setting the key. In this case, the new mnemonic will not be asked for. + +```bash +libra txs user rotate-key --new-private-key --claim-address +``` \ No newline at end of file diff --git a/private-keys.yaml b/private-keys.yaml deleted file mode 100644 index 3c88d4a10..000000000 --- a/private-keys.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -account_address: 058e4b7d6cf1b9cb2b865f76b17073d7da8c6a1b78ea51f33e451420232831d4 -account_private_key: "0xbf86f7c31ea8959a9969d8f6c29da1ac3253da2434d3aeb08bd1819ad3509b1d" -consensus_private_key: "0x4c80411f31b8cc4429a1a713e488e28a43667e19a25dbca5acf288e3fbfa31b4" -full_node_network_private_key: "0x90bc05b0f7155e4ee4994acc4edc415ea80ebf0389ec2cd0eaf956aa6560b176" -validator_network_private_key: "0x2885971d054a05d74947efe3716c7b36ee16b77988445358464e96d1b167394d" diff --git a/public-keys.yaml b/public-keys.yaml deleted file mode 100644 index 1980ca08a..000000000 --- a/public-keys.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -account_address: 058e4b7d6cf1b9cb2b865f76b17073d7da8c6a1b78ea51f33e451420232831d4 -account_public_key: "0x0e9ff45f96e133323e50cdf65a255cf5078e1332ef6a212e30d811083a5651d7" -consensus_public_key: "0xaba923e2d1646703b9d140c8d3e8623c97d525c2ad96d131195d07fbd7e4dc39788df032bf4129fd464762012d74b692" -consensus_proof_of_possession: "0xa8cc341c57033f806f831e1308c3b6d9711dc7f873ddf29f42b633f918ed0d4aef83967fca5e11b85c4dcf4552a92ec00a43b6a2259ff19a3f32be8de4946d8fd753db4706f2fbe2e41e4c2a363c0ee198b0044e71aaf10cd7189422cd338325" -full_node_network_public_key: "0xe8f084ba20264e3baea8578467f15bc3f534144709adff8adf02d9726eb5ae69" -validator_network_public_key: "0xc8fec65c13af8be06a4d468654f5e9b7635fe862f8c5f501d3b68df669217556" diff --git a/tools/config/src/make_yaml_public_fullnode.rs b/tools/config/src/make_yaml_public_fullnode.rs index 1f1bfc9e8..ef9f9adf0 100644 --- a/tools/config/src/make_yaml_public_fullnode.rs +++ b/tools/config/src/make_yaml_public_fullnode.rs @@ -55,7 +55,7 @@ pub fn add_peers_to_yaml( parsed.full_node_networks.iter_mut().for_each(move |e| { if e.network_id.is_public_network() { - e.seed_addrs = peers.clone(); + e.seed_addrs.clone_from(&peers); } }); diff --git a/tools/txs/Cargo.toml b/tools/txs/Cargo.toml index 537297c1e..a46abd20c 100644 --- a/tools/txs/Cargo.toml +++ b/tools/txs/Cargo.toml @@ -13,6 +13,7 @@ repository = { workspace = true } anyhow = { workspace = true } bcs = { workspace = true } clap = { workspace = true } +dialoguer = { workspace = true } diem = { workspace = true } diem-crypto = { workspace = true } diem-framework = { workspace = true } diff --git a/tools/txs/src/submit_transaction.rs b/tools/txs/src/submit_transaction.rs index bb549b3ee..1fb112f57 100644 --- a/tools/txs/src/submit_transaction.rs +++ b/tools/txs/src/submit_transaction.rs @@ -121,10 +121,10 @@ impl Sender { } pub fn set_tx_cost(&mut self, cost: &TxCost) { - self.tx_cost = cost.to_owned(); + cost.clone_into(&mut self.tx_cost); } - /// + /// load from local app configs pub async fn from_app_cfg(app_cfg: &AppCfg, profile: Option) -> anyhow::Result { let profile = app_cfg.get_profile(profile)?; diff --git a/tools/txs/src/txs_cli_community.rs b/tools/txs/src/txs_cli_community.rs index 1e643c6f8..33ce01aa6 100644 --- a/tools/txs/src/txs_cli_community.rs +++ b/tools/txs/src/txs_cli_community.rs @@ -213,7 +213,7 @@ impl BatchTx { if let Some((_, pp)) = pending_or_approved.get_key_value(&addr) { if pp.amount == gas_coin::cast_decimal_to_coin(inst.amount as f64) { inst.proposed = Some(true); - inst.voters = pp.voters.clone(); + inst.voters.clone_from(&pp.voters); inst.approved = pp.approved; println!("... found already pending, mark as proposed"); } diff --git a/tools/txs/src/txs_cli_user.rs b/tools/txs/src/txs_cli_user.rs index 3c689e3c2..bca8322fe 100644 --- a/tools/txs/src/txs_cli_user.rs +++ b/tools/txs/src/txs_cli_user.rs @@ -1,6 +1,7 @@ //! Validator subcommands use crate::submit_transaction::Sender; +use dialoguer::Confirm; use diem::common::types::RotationProofChallenge; use diem_sdk::crypto::ed25519::Ed25519PublicKey; use diem_sdk::crypto::{PrivateKey, SigningKey, ValidCryptoMaterialStringExt}; @@ -14,7 +15,7 @@ use libra_types::{ }; use libra_wallet::account_keys::get_keys_from_prompt; use serde::{Deserialize, Serialize}; -use std::str::FromStr; +// use std::str::FromStr; #[derive(clap::Subcommand)] pub enum UserTxs { @@ -26,7 +27,7 @@ pub enum UserTxs { impl UserTxs { pub async fn run(&self, sender: &mut Sender) -> anyhow::Result<()> { match &self { - UserTxs::RotateKey(rotate) => match rotate.run(sender).await { + UserTxs::RotateKey(rotate) => match rotate.run(sender, true).await { Ok(_) => println!("SUCCESS: private key rotated"), Err(e) => { println!("ERROR: could not rotate private key, message: {}", e); @@ -70,58 +71,87 @@ impl SetSlowTx { } } -/// Rotate an account's auth key, but entering a new private key. Note, this -/// depends on the rotation capability being set with subcommand -/// rotation-capability. +/// Rotate an account's keys. Either you are a) rotating your existing account's +/// keys, or b) claiming someone else's account. #[derive(clap::Args)] pub struct RotateKeyTx { #[clap(short, long)] - /// The new authkey to be used - pub new_private_key: Option, // Dev NOTE: account address has the same bytes as AuthKey + /// Private key to be used, optional. + pub new_private_key: Option, #[clap(short, long)] - /// Account address for which rotation is done. It - /// can be different from caller's address if rotation capability has been granted - /// to the caller. Do not specify this if you want to rotate your own key. - pub account_address: Option, + /// Account being claimed, if being transferred + pub claim_address: Option, } impl RotateKeyTx { - pub async fn run(&self, sender: &mut Sender) -> anyhow::Result<()> { - let user_account: AccountAddress = sender.local_account.address(); + pub async fn run(&self, sender: &mut Sender, confirm: bool) -> anyhow::Result<()> { + println!("\nWARN: you will be rotating the keys for an account, this could permanently lock you out!"); + + let sender_account = sender.local_account.address(); + + let rotating_account = if let Some(claim) = self.claim_address { + println!("You have set --claim-address, this means you are claiming someone else's account: {}", &claim); + println!("IMPORTANT: The account submitting the transaction {} must have previously been delegated responsibility for rotating the keys of the address being claimed", &sender_account.short_str_lossless()); + + claim + } else { + println!( + "\nWARN: you have not entered --claim-address. It seems you are planning to rotate keys on your the address signing this transaction: {}", + &sender_account + ); + sender_account + }; + + if confirm && !Confirm::new() + .with_prompt("Do you want to continue? (You will be asked to confirm your keys once again submitting the transaction)") + .interact() + .unwrap() { + anyhow::bail!("better safe than sorry, exiting."); + } let new_private_key = if let Some(pk) = &self.new_private_key { Ed25519PrivateKey::from_encoded_string(pk)? } else { + println!("\nWARN: no private key provided with --new-private-key."); + println!("You can now enter the NEW mnemonic to be used on the account."); let legacy = get_keys_from_prompt()?; legacy.child_0_owner.pri_key }; - let seq = sender.client().get_sequence_number(user_account).await?; - let payload = if let Some(account_address) = &self.account_address { - let target_account_address = AccountAddress::from_str(account_address)?; + let seq = sender.client().get_sequence_number(sender_account).await?; + let payload = if let Some(target_account_address) = self.claim_address { let target_account = sender .client() .get_account(target_account_address) .await? .into_inner(); + // rotate key for account_address rotate_key_delegated( seq, - &target_account_address, // account for which rotation is carried - &target_account.authentication_key, // auth key for an account for which rotation is carried - &new_private_key, + &target_account_address, // account which is being claimed + &target_account.authentication_key, // the on chain authkey of the account being claimed (old) + &new_private_key, // the private key with which new auth key will be generated ) } else { // rotate key for self rotate_key( - user_account, + sender_account, sender.local_account.private_key().to_owned(), sender.local_account.authentication_key(), seq, - new_private_key, + &new_private_key, ) }?; + if confirm { + let msg = format!("\nYou are claiming account: {}\nThe new private key will be: {}\nThis will permanent, you will get no other confirmation! Do you wish to continue? ", rotating_account, &new_private_key.to_encoded_string().unwrap()); + + if !Confirm::new().with_prompt(msg).interact().unwrap() { + anyhow::bail!("better safe than sorry, exiting."); + } + } + sender.sign_submit_wait(payload).await?; Ok(()) } @@ -133,7 +163,7 @@ pub fn rotate_key( current_private_key: Ed25519PrivateKey, auth_key: AuthenticationKey, sequence_number: u64, - new_private_key: Ed25519PrivateKey, + new_private_key: &Ed25519PrivateKey, ) -> anyhow::Result { // form a rotation proof challenge. See account.move let rotation_proof = RotationProofChallenge { diff --git a/tools/txs/tests/key_rotation.rs b/tools/txs/tests/key_rotation.rs index 8c47ee8dd..889418cc0 100644 --- a/tools/txs/tests/key_rotation.rs +++ b/tools/txs/tests/key_rotation.rs @@ -68,10 +68,10 @@ async fn rotate_key() -> anyhow::Result<()> { let cli = RotateKeyTx { new_private_key: Some(generated_private_key_encoded.unwrap()), - account_address: None, + claim_address: None, }; - let res = cli.run(&mut alice_sender).await; + let res = cli.run(&mut alice_sender, false).await; assert!(res.is_ok()); // check new auth key @@ -164,10 +164,10 @@ async fn offer_rotation_capability() -> anyhow::Result<()> { let cli = RotateKeyTx { new_private_key: Some(generated_private_key_encoded.unwrap()), - account_address: Some(alice_acct.to_string()), + claim_address: Some(alice_acct.to_owned()), }; - let res_rotation = cli.run(&mut bob_sender).await; + let res_rotation = cli.run(&mut bob_sender, false).await; match res_rotation.as_ref() { Ok(_) => {} Err(err) => { @@ -280,10 +280,10 @@ async fn revoke_rotation_capability() -> anyhow::Result<()> { let cli = RotateKeyTx { new_private_key: Some(generated_private_key_encoded.unwrap()), - account_address: Some(alice_acct.to_string()), + claim_address: Some(alice_acct.to_owned()), }; - let res_rotation = cli.run(&mut bob_sender).await; + let res_rotation = cli.run(&mut bob_sender, false).await; match res_rotation.as_ref() { Ok(_) => {} Err(err) => { diff --git a/types/src/legacy_types/app_cfg.rs b/types/src/legacy_types/app_cfg.rs index 5f81df48a..b16981523 100644 --- a/types/src/legacy_types/app_cfg.rs +++ b/types/src/legacy_types/app_cfg.rs @@ -79,7 +79,7 @@ impl AppCfg { default_config.workspace.node_home = config_path.unwrap_or_else(global_config_dir); if let Some(id) = chain_name { - default_config.workspace.default_chain_id = id.to_owned(); + id.clone_into(&mut default_config.workspace.default_chain_id); }; if let Some(np) = network_playlist { @@ -202,7 +202,7 @@ impl AppCfg { // try to use the default profile unless one was requested if nickname.is_none() { - nickname = self.workspace.default_profile.clone() + nickname.clone_from(&self.workspace.default_profile) }; if let Some(n) = nickname { @@ -328,7 +328,7 @@ impl AppCfg { self.network_playlist.iter_mut().for_each(|play| { if play.chain_name == new_playlist.chain_name { found = true; - *play = new_playlist.to_owned(); + new_playlist.clone_into(play); } }); if !found { diff --git a/validator-full-node-identity.yaml b/validator-full-node-identity.yaml deleted file mode 100644 index 1a6fa8ac2..000000000 --- a/validator-full-node-identity.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -account_address: e8f084ba20264e3baea8578467f15bc3f534144709adff8adf02d9726eb5ae69 -network_private_key: "0x90bc05b0f7155e4ee4994acc4edc415ea80ebf0389ec2cd0eaf956aa6560b176" diff --git a/validator-identity.yaml b/validator-identity.yaml deleted file mode 100644 index 22db3133c..000000000 --- a/validator-identity.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -account_address: 058e4b7d6cf1b9cb2b865f76b17073d7da8c6a1b78ea51f33e451420232831d4 -account_private_key: "0xbf86f7c31ea8959a9969d8f6c29da1ac3253da2434d3aeb08bd1819ad3509b1d" -consensus_private_key: "0x4c80411f31b8cc4429a1a713e488e28a43667e19a25dbca5acf288e3fbfa31b4" -network_private_key: "0x2885971d054a05d74947efe3716c7b36ee16b77988445358464e96d1b167394d"