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

Store key as <pubkey>.key #275

Closed
wants to merge 1 commit into from
Closed

Store key as <pubkey>.key #275

wants to merge 1 commit into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Mar 6, 2024

Related to spacemeshos/go-spacemesh#5643

Instead of <identity>.key store the key with the public key as the file name (abbreviated).

@fasmat fasmat requested review from pigmej and poszu March 6, 2024 19:23
@fasmat fasmat self-assigned this Mar 6, 2024
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.3%. Comparing base (6c818a7) to head (c5e376a).

Additional details and impacted files
@@           Coverage Diff           @@
##           develop    #275   +/-   ##
=======================================
  Coverage     74.3%   74.3%           
=======================================
  Files           29      29           
  Lines         1543    1543           
=======================================
  Hits          1147    1147           
  Misses         258     258           
  Partials       138     138           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@poszu poszu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update the readme:

post/cmd/postcli/README.md

Lines 101 to 107 in fdd5647

* If `-id` isn't provided a new identity will be auto-generated. Its private key will be stored in `identity.key` in
`-datadir` next to the PoST data. This file then **must** to be copied/moved to the `data/identities` directory of
the node managing this identity.
* **NOTE:** The generated PoST data is ONLY valid for this identity!
* If a public key is provided with the `-id` flag, the `identities.key` file will be NOT created. Make sure that the
key file that belongs to the identity provided to `postcli` is available in the `data/identities` directory for a
PoST service using the generated data to be able to connect to the node.

@fasmat
Copy link
Member Author

fasmat commented Mar 7, 2024

Closing as having "random" key names might be confusing and the change makes the code more convoluted than necessary.

@fasmat fasmat closed this Mar 7, 2024
@fasmat fasmat deleted the key-filename branch March 7, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants