Copy your ~/.secretd/config/priv_validator_key.json from the old machine (secret-1) to the new SGX machine (secret-2) at the same location.
4. Migrate Your Validator's Wallet
Export the self-delegator wallet from the old machine (secret-1) and import to the new SGX machine (secret-2).
On the old machine (secret-1) use secretcli keys export "$YOUR_KEY_NAME".
On the new SGX machine (secret-2) use secretcli keys import "$YOUR_KEY_NAME" "$FROM_FILE_NAME"
Notes:
If you're recovering the wallet using secretcli keys add "$YOUR_KEY_NAME" --recover you should also use --hd-path "44'/118'/0'/0/0".
If the wallet is stored on a Ledger device, use --legacy-hd-path when importing it with secretcli keys add.
5. Set Up Your SGX Machine And Become A secret-2 Validator
On the new SGX machine (secret-2):
cd~secretdinit $MONIKER --chain-idsecret-2wget-O~/.secretd/config/genesis.json"https://github.com/scrtlabs/SecretNetwork/releases/download/v1.0.0/genesis.json"echo"4ca53e34afed034d16464d025291fe16a847c9aca0a259f9237413171b19b4cf .secretd/config/genesis.json"|sha256sum--checksecretdvalidate-genesissecretdinit-enclavePUBLIC_KEY=$(secretdparseattestation_cert.der2>/dev/null|cut-c3-)echo $PUBLIC_KEYsecretcliconfigchain-idsecret-2secretcliconfignodetcp://secret-2.node.enigma.co:26657secretcliconfigtrust-nodetruesecretcliconfigoutputjsonsecretcliconfigindenttruesecretclitxregisterauth./attestation_cert.der--from"$YOUR_KEY_NAME"--gas-prices0.0125uscrtSEED=$(secretcliqueryregisterseed"$PUBLIC_KEY"|cut-c3-)echo $SEEDsecretcliqueryregistersecret-network-paramsmkdir-p~/.secretd/.nodesecretdconfigure-secretnode-master-cert.der"$SEED"perl-i-pe's/persistent_peers =.*/persistent_peers = "bee0edb320d50c839349224b9be1575ca4e67948\@secret-2.node.enigma.co:26656"/'~/.secretd/config/config.tomlsudosystemctlenablesecret-nodesudosystemctlstartsecret-node# (Now your new node is live and catching up)secretcliconfignodetcp://localhost:26657
Now wait until you're done catching up. This is fast.
Once the following command outputs true you can continue:
watch'secretcli status | jq ".sync_info.catching_up == false"'
Once your node is done catching up, you can unjail your validator: