forked from celestiaorg/celestia-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(nodebuilder): Allow setting keyring backend
file
with `--k…
…eyring.backend` flag (celestiaorg#1565) This PR introduces customisability for the keyring backend used by celestia-node. The default backend will still remain `test`, but support is added specifically for `file`. **NOTE** that no other backends have explicitly tested support, but are still able to be specified and used at a user's own discretion. ## celestia-node binary 1. Config for state now includes a field `KeyringBackend` which can direct the node to use a backend other than the default (`test`), so `file` for example. 2. This config field can be modified using a flag `--keyring.backend` but it must be passed both on `init` and `start` to direct the node to access the correct keyring for both operations. 3. `node.Init` now checks for existing keys, prompting the user for a password **if `file` keyring backend is specified** (an existing password if the keys already exist, and generates a new key with the given password if no keys already exist). 4. `node.Start` will now block until user enters their password for the keyring if keyring backend `file` is specified. Note that `KeyringAccname` still works as intended. # TODO - [x] ensure key actually works (balance / sendtx) # Using `--keyring.backend file` ``` celestia <node_type> init --keyring.backend file celestia <node_type> start --keyring.backend file ``` Also resolves celestiaorg#603 and celestiaorg#1704 --------- Co-authored-by: Viacheslav <[email protected]>
- Loading branch information
Showing
19 changed files
with
213 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.