When testing the migration of validators from beta -> gamma, we came across some confusing scenarios in which the node_priv.key, .bootstrap.json and other metadata files became out of sync with the backups. When a node initially joins a network, it is initialized and a private key is generated - if a client's backup is then restored on top of that generated file, we need to make sure that the metadata files are in sync with the newly restored private key.
The proposed solution is to remove node_pub.key and node_addr.b64 completely (replace them with a hydra client cat-key command for accessibility) and properly restore node_priv.key. Unfortunately we can't get rid of node_priv.key completely, as it is necessary for many validator management commands. Also - do not rely on the contents of .bootstrap.json - this file should just be used for the initial bootstrapping of a network.
Add a hydra client cat-key command that dynamically determines the node's address/keys from its actual private key
Remove the generation of and all references to node_pub.key, node_addr.b64
hydra client set-info should not depend on .bootstrap.json
hydra client restore should backup existing node_priv.key, and generate new one based on restored priv_validator.json
When testing the migration of validators from beta -> gamma, we came across some confusing scenarios in which the
node_priv.key
,.bootstrap.json
and other metadata files became out of sync with the backups. When a node initially joins a network, it is initialized and a private key is generated - if a client's backup is then restored on top of that generated file, we need to make sure that the metadata files are in sync with the newly restored private key.The proposed solution is to remove
node_pub.key
andnode_addr.b64
completely (replace them with ahydra client cat-key
command for accessibility) and properly restorenode_priv.key
. Unfortunately we can't get rid ofnode_priv.key
completely, as it is necessary for many validator management commands. Also - do not rely on the contents of.bootstrap.json
- this file should just be used for the initial bootstrapping of a network.hydra client cat-key
command that dynamically determines the node's address/keys from its actual private keynode_pub.key
,node_addr.b64
hydra client set-info
should not depend on.bootstrap.json
hydra client restore
should backup existing node_priv.key, and generate new one based on restoredpriv_validator.json