Skip to content
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] Integrate Keybase w/ CLI #484

Closed
3 tasks
jessicadaugherty opened this issue Feb 2, 2023 · 0 comments · Fixed by #501
Closed
3 tasks

[Tooling] Integrate Keybase w/ CLI #484

jessicadaugherty opened this issue Feb 2, 2023 · 0 comments · Fixed by #501
Assignees
Labels
community Open to or owned by a non-core team member core Core infrastructure - protocol related tooling tooling to support development, testing et al

Comments

@jessicadaugherty
Copy link
Contributor

jessicadaugherty commented Feb 2, 2023

Objective

Integrate the Keybase with the CLI to use keys from the keybase.

Origin Document

In #459, the first version of the keybase was introduced as a separate package in the V1 codebase.

In #169, the first version of the CLI was introduced to the V1 codebase.

Goals

  • When sending commands via the CLI (stake, send, unstake, etc...), it should use keys from from the Keybase

Deliverables

  • Identify all entrypoints in app/client/cli where the keybase should be integrated
  • Do a global search for #150 and integrate all these entrypoint with the keybase (a subset of the above)
  • Documentation on what the default keys in the keybase are (until the CLI is added to support this)

Non-goals / Non-deliverables

  • Adding new commands to the CLI to manage (create/import/export) keys

Creator: @jessicadaugherty
Co-owner: @Olshansk

@jessicadaugherty jessicadaugherty converted this from a draft issue Feb 2, 2023
@jessicadaugherty jessicadaugherty changed the title [WIP][Tooling] Integrate Keybase w/ CLI [Tooling] Integrate Keybase w/ CLI Feb 2, 2023
@Olshansk Olshansk added core Core infrastructure - protocol related community Open to or owned by a non-core team member tooling tooling to support development, testing et al labels Feb 2, 2023
@Olshansk Olshansk moved this to Backlog in V1 Dashboard Feb 2, 2023
@jessicadaugherty jessicadaugherty moved this from Backlog to Up Next in V1 Dashboard Feb 8, 2023
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)
@github-project-automation github-project-automation bot moved this from Up Next to Done in V1 Dashboard Feb 14, 2023
bryanchriswhite added a commit that referenced this issue Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
bryanchriswhite added a commit that referenced this issue Feb 20, 2023
* pokt/main:
  [Infra] KISS 3 - Cluster Manager [Merge me after #521] - (Issues: #490) (#522)
  Refactor/fix state sync logs (#515)
  [P2P] KISS 2 - Peer discovery [Merge me after #520] - (Issues: #416, #429) (#521)
  [Core] KISS 1 - Finite State Machine [Merge me first] - (Issue: #499) (#520)
  [CLI] Stake command bugfix (#518)
  [CLI] Cannot run make localnet_client_debug: Cannot initialise the keybase with the validator keys: Unable to find YAML file (#517)
  Fix the link shown by `make go_doc`
  Fixed duplicate GITHUB_WIKI tag
  [Documentation] Update Devlog Formatting (#512)
  [Docs & Bugs] Minor fixes post keybase changes (#513)
  [Utility] Foundational bugs, tests, code cleanup and improvements (1 / 2) (#503)
  [Tooling] Integrate Keybase w/ CLI (Issue #484 ) (#501)
  update devlog2.md
  update devlog2.md
  Update devlog1.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Open to or owned by a non-core team member core Core infrastructure - protocol related tooling tooling to support development, testing et al
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants