NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
387 stars 167 forks source link

File path support for p2p private key #1904

Closed weiihann closed 1 month ago

weiihann commented 3 months ago

Description

This PR adds filepath support to two existing P2P-related tools and flags, namely genp2pkeypair and --p2p-private-key.

Example

Command: juno genp2pkeypair --file nodekey

Command: juno --p2p-private-key nodekey

Example 2: With prefix

P2P Private Key:



### Rationale
It's more of a UX nicety to allow users to generate key pairs in a file and parse the file to use as a private key, rather than having to copy pasting manually.
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 70.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 75.44%. Comparing base (a30d388) to head (2abdcd9). Report is 41 commits behind head on main.

Files Patch % Lines
cmd/juno/juno.go 53.33% 4 Missing and 3 partials :warning:
cmd/juno/genp2pkeypair.go 86.66% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1904 +/- ## ========================================== - Coverage 75.51% 75.44% -0.08% ========================================== Files 100 100 Lines 8982 9003 +21 ========================================== + Hits 6783 6792 +9 - Misses 1599 1605 +6 - Partials 600 606 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

weiihann commented 1 month ago

On a second thought, I find this feature irrelevant as users can just use environment variables.