ShipChain / hydra

Centralized network management for decentralized networks -- helping organize and publish sidechain connection details
https://docs.shipchain.io/docs/validatorGuide.html
Apache License 2.0
8 stars 2 forks source link

Remove key helper files #35

Closed ajhodges closed 4 years ago

ajhodges commented 4 years ago

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.

leewardbound commented 4 years ago

Good ideas, glad to remove some extra junk lying around, carry on