-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tooling] Update CLI to support key management #489
Labels
Milestone
Comments
16 tasks
h5law
added a commit
that referenced
this issue
Feb 14, 2023
## Description This PR addresses the `#150` comments throughout the `app/client/cli` directory and integrates the keybase to be used in place of reading keys from files locally. The new method has been added to the `debug/keystore.go` file `InitialiseDebugKeybase()` which reads the 999 validator private keys from the `build/localnet/manifests/private-keys.yaml` file and stores them in the keybase. This is only run when there are less than 999 keys in the keybase. To speed this up `BadgerDB`'s `WriteBatch()` function is being used - however due to the encryption/JSON encoding and then Gob encoding steps of adding private keys to the keybase this takes a few seconds when ran for the first time. This PR does not add any endpoints to interact with the keybase from the CLI this is instead tracked in the issue #489 ## Issue Fixes #484 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Add logic to initialise keybase with 999 validator keys - Update `app/client/cli` to use the keybase ## Testing - [x] `make develop_test` - [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` [localnet_with_integration.webm](https://user-images.githubusercontent.com/53987565/217543043-21c35c3e-8389-44a5-968a-d3afb6cb8dd9.webm) ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
16 tasks
h5law
added a commit
that referenced
this issue
Feb 23, 2023
## Description This PR adds the `Keys` endpoint to the CLI and adds the relevant subcommands to interact with the keybase from the users' perspective. The new `Keys` namespace allows for CRUD operations on keys and gives users access to creating, importing and exporting keys (as a raw string or JSON encoded string), deleting keys, listing all keys and getting specific keys as well as signing and verifying hex-encoded byte messages. ![image](https://user-images.githubusercontent.com/53987565/219619590-1a802307-2653-4b07-984a-9f1b277f6824.png) ![image](https://user-images.githubusercontent.com/53987565/219866188-efb62b0d-aaa1-47cb-b2cc-ccb918eb8a0d.png) ## Issue Fixes #489 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Add Keys CLI namespace - Add keybase-related subcommands - Return keypair when importing or creating a new key - Reformat tests - Remove `Exists()` function from keybase interface ## Testing - [x] `make develop_test` - [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objective
Allow the user to manage keys via the CLI.
Origin Document
This is a follow-up ticket #484. Specifically, the following deliverable:
Goals
Keybase
interface inapp/client/keybase/keybase.go
via the CLIDeliverable
p1 Keys
namespacep1 Keys
namespace should have options to create, import, export, delete, etc commandsNon-goals / Non-deliverables
General issue deliverables
Testing Methodology
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @Olshansk
Co-Owners: @jessicadaugherty
The text was updated successfully, but these errors were encountered: