celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

feat(cmd/cel-shed): support display private key discreetly

Open Halimao opened this issue 1 year ago • 4 comments

Closes #321

This pr added support for printing private key on an alternate screen when running cel-shed p2p new-key


Screenshots

image

image

Halimao avatar Jan 10 '24 15:01 Halimao

@Halimao this is cool, i think the original ticket requests to NOT output to stdout at all, vs an alternate screen, with that it may be we do not merge this. I'll let @Wondertan clarify the requirement and see if he wants to proceed with this solution, vs the original specified

ramin avatar Jan 15 '24 10:01 ramin

@Halimao this is cool, i think the original ticket requests to NOT output to stdout at all, vs an alternate screen, with that it may be we do not merge this. I'll let @Wondertan clarify the requirement and see if he wants to proceed with this solution, vs the original specified

OK. And if we still need to write it to file, I think it's fine that we merge this pr first? As it's more safe to write it to an alternate screen than current terminal directly. In that way, I will draft another PR to support writing to file😄

Halimao avatar Jan 15 '24 11:01 Halimao

@ramin @Wondertan Hi sir, any new progress here?

Halimao avatar Jan 18 '24 03:01 Halimao

Codecov Report

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

Project coverage is 52.96%. Comparing base (c1ab9c5) to head (cdceb56). Report is 11 commits behind head on main.

Files Patch % Lines
cmd/util.go 0.00% 9 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3087      +/-   ##
==========================================
+ Coverage   52.08%   52.96%   +0.87%     
==========================================
  Files         183      179       -4     
  Lines       11594     9410    -2184     
==========================================
- Hits         6039     4984    -1055     
+ Misses       5043     3924    -1119     
+ Partials      512      502      -10     

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

codecov-commenter avatar Jan 18 '24 03:01 codecov-commenter

#321 mentions that we should not print key to stdout but to a file. This PR still prints it to the terminal and not to a file.

I think writing to a file as it's stated in issues is better and doesn't require additional dependency for literally 1 use case. My 2c.

cristaloleg avatar May 27 '24 06:05 cristaloleg