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

Persist networking keystore #90

Merged
merged 9 commits into from
Dec 10, 2019
Merged

Persist networking keystore #90

merged 9 commits into from
Dec 10, 2019

Conversation

GregTheGreek
Copy link
Member

Includes

  • Persists the networking keystore to disk
  • Generates a new keystore if one doesn't exists
  • Moves utils to its own package under node rather than a module within node
  • Refactors the utils functions to support Vec<u8> rather than String

Issues

Closes #5

node/utils/Cargo.toml Outdated Show resolved Hide resolved
node/utils/src/lib.rs Outdated Show resolved Hide resolved
node/ferret-libp2p/src/service.rs Show resolved Hide resolved
node/ferret-libp2p/src/service.rs Show resolved Hide resolved
node/ferret-libp2p/src/service.rs Outdated Show resolved Hide resolved
node/ferret-libp2p/src/service.rs Outdated Show resolved Hide resolved
node/utils/src/lib.rs Outdated Show resolved Hide resolved
@GregTheGreek GregTheGreek merged commit 6a2092b into master Dec 10, 2019
@GregTheGreek GregTheGreek deleted the greg/libp2p/peer-id branch December 10, 2019 21:26
@kavanmevada
Copy link

kavanmevada commented Jun 15, 2021

[root@archlinux Desktop]# docker run forest
 2021-06-15T04:18:59.893Z INFO  forest::daemon > Starting Forest daemon
 2021-06-15T04:18:59.893Z INFO  forest_libp2p::service > Networking keystore not found!
keystore passphrase:  2021-06-15T04:18:59.894Z INFO  utils                  > Permissions set to 0600 on File { fd: 6, path: "/root/.forest/libp2p/keypair", read: false, write: true }
thread 'main' panicked at 'Error reading passphrase: Os { code: 25, kind: Other, message: "Inappropriate ioctl for device" }', forest/src/daemon.rs:80:46
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'm trying to run forest in docker got this error.

let passphrase = read_password().expect("Error reading passphrase");
Seems like it trying to read password from tty, shouldn't it read using rust std in/out io ?

reading from TTY requires some libc functions like ioctl and it's only unix specific only.

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.

Store Libp2p ID
5 participants