-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate and use private key from environment variable and add …
…support for dnsaddr seed peers (#27) Description --- In order to generate a private key earlier that can be used at any start from env vars, we needed a solution. Now there is a new cli option called `--generate-identity`. With this option, you can generate a new identity (an encoded libp2p private key) that can be used to set value later for `SHA_P2POOL_IDENTITY` environment variable (the command outputs a json where `private_key` field is the one need to use). If that var is set, when starting p2pool with `--stable-peer` flag, it will look for first for this env var and tries to decode and use it. Also `/dnsaddr/*` seed peer addresses were not supported, now it is supported, so p2pool will parse all the TXT DNS records and add them to kademlia to bootstrap. Motivation and Context --- How Has This Been Tested? --- ```sh cargo build --release export SHA_P2POOL_IDENTITY=$(./target/release/sha_p2pool --generate-identity | jq -r '.private_key') ./target/release/sha_p2pool --stable-peer ``` After starting/stopping many times p2pool, the peer ID remains the same. What process can a PR reviewer use to test or verify this change? --- See testing. Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify
- Loading branch information
Showing
9 changed files
with
201 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ mod error; | |
pub mod messages; | ||
mod network; | ||
pub mod peer_store; | ||
pub mod util; |
Oops, something went wrong.