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

Regenerate helper files during Configure #30

Closed mlclay closed 5 years ago

mlclay commented 5 years ago

When a network is joined, the user may want to utilize their own keys from a backup instead of the ones generated by ./shipchain init.

Hydra needs to support generating the helper files during the hydra client configure step as well as in the current hydra client join-network step. These files are referenced in the Validator walkthrough and if they are not kept in sync with the node's key, the validator may not be doing what they expect.

node_addr.b64
node_key.json
node_priv.key
node_pub.key
.bootstrap.json

One possible flow for this new functionality is:

hydra client join-network --name shipchain-testnet-beta --no-configure
cp backups/{node_key.json,priv_validator.json} shipchain-testnet-beta/chaindata/config/
hydra client configure --name shipchain-testnet-beta --install
hydra client status --name shipchain-testnet-beta

Note the lack of the --install flag on the join-network and the addition of the hydra client configure step. These will allow the backup keys to be in place prior to the node ever starting.