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

Unable to decode saved libp2p keypair, PeerId constantly changing #3248

Closed
LesnyRumcajs opened this issue Jul 20, 2023 · 0 comments · Fixed by #3250
Closed

Unable to decode saved libp2p keypair, PeerId constantly changing #3248

LesnyRumcajs opened this issue Jul 20, 2023 · 0 comments · Fixed by #3250
Assignees
Labels

Comments

@LesnyRumcajs
Copy link
Member

Describe the bug

Unable to decode saved libp2p keypair

To Reproduce Steps to reproduce the behavior:

  1. Run Forest. The keypair will be saved to $HOME/.local/share/forest/libp2p/keypair.
  2. Run Forest. The keypair will be overwritten by a new one.
    Log output
❯ forest --chain calibnet --encrypt-keystore false --save-token token.jwt
2023-07-20T11:52:25.648668Z  INFO forest_filecoin::daemon::main: Using default calibnet config
2023-07-20T11:52:25.649774Z  INFO forest_filecoin::daemon: Starting Forest daemon, version 0.11.1+git.2825539e4
2023-07-20T11:52:25.649801Z  INFO forest_filecoin::libp2p::service: Could not decode networking keystore!
2023-07-20T11:52:25.649982Z  INFO forest_filecoin::daemon: PeerId: 12D3KooWQ7W8XQNAakP9uXqB4PTd7BGcP8EhDwnSYTVWVkCkYSiv
2023-07-20T11:52:25.649989Z  WARN forest_filecoin::daemon: Forest has encryption disabled

❯ forest --chain calibnet --encrypt-keystore false --save-token token.jwt
2023-07-20T11:52:34.903981Z  INFO forest_filecoin::daemon::main: Using default calibnet config
2023-07-20T11:52:34.905552Z  INFO forest_filecoin::daemon: Starting Forest daemon, version 0.11.1+git.2825539e4
2023-07-20T11:52:34.905572Z  INFO forest_filecoin::libp2p::service: Could not decode networking keystore!
2023-07-20T11:52:34.905633Z  INFO forest_filecoin::utils::io: Permissions set to 0600 on File { fd: 9, path: "/home/rumcajs/.local/share/forest/libp2p/keypair", read: false, write: true }
2023-07-20T11:52:34.905650Z  INFO forest_filecoin::daemon: PeerId: 12D3KooWJsFkxNScojVutnLfTTUzyp6BPjzsveYxUgWQ6LvKmYZs

Expected behaviour

Forest correctly decodes the saved keypair. The PeerId is stable.

Screenshots

Environment (please complete the following information):

  • OS:
  • Rust version(e.g. rustc --version)
  • Branch/commit

Other information and links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant