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

Make key handling more ergonomic #203

Open
lrettig opened this issue Jul 27, 2023 · 1 comment · May be fixed by #211
Open

Make key handling more ergonomic #203

lrettig opened this issue Jul 27, 2023 · 1 comment · May be fixed by #211
Assignees

Comments

@lrettig
Copy link
Member

lrettig commented Jul 27, 2023

Here are some suggestions for how to improve the UX around key management:

  1. Don't require --id to be passed on the command line if a key.bin file already exists. Read the key from the file.
  2. Store key in the same format (probably hex, not base64) in key.bin and postdata_metadata.json (inconsistent representation of commitment ATX and node ID #163)
  3. Make it easy to read the pubkey from key.bin (e.g., postcli -printKeys)
@fasmat
Copy link
Member

fasmat commented Jul 28, 2023

I would go a different way about this by giving postcli a better CLI in general:

  1. split the functionality it offers into multiple sub commands: postcli id (show and generate), postcli init, postcli verify, postcli genproof, postcli benchmark, postcli resize, etc.
  2. Restructure the cmd package around those sub commands using cobra for a more structured and especially testable code: Introduce cobra for postcli #199
  3. Don't infer anything that wasn't explicitly stated: e.g. if -id is specified but a key.bin file is present print an error and exit. if -id is not specified and no key.bin exist print an error and exit.

Changing the contents of postdata_metadata.json should be a separate issue, for multiple reasons:

  • It's unrelated to CLI changes
  • It requires existing data to be migrated (nodes currently store their nodeId in base64 if we change that to hex that will break existing PoST datas)
  • postdata_metadata.json has no schema or similar (yet). So changing its contents in a non-backwards compatible way isn't trivial

@fasmat fasmat self-assigned this Jul 28, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Dev team kanban Jul 28, 2023
@fasmat fasmat moved this from 📋 Backlog to 🔖 Next in Dev team kanban Jul 28, 2023
@fasmat fasmat moved this from 🔖 Next to 🏗 Doing in Dev team kanban Sep 11, 2023
@fasmat fasmat moved this from 🏗 Doing to On Hold in Dev team kanban Sep 18, 2023
@dshulyak dshulyak moved this from On Hold to 📋 Backlog in Dev team kanban Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

2 participants