gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
839 stars 342 forks source link

feat: add support for displaying the P2P Address for node secrets info #2361

Closed zivkovicmilos closed 1 week ago

zivkovicmilos commented 1 week ago

Description

Closes #1922

This PR introduces a new section to the Node P2P Info secrets output, that displays the P2P connection address. The secrets fetch command remains unchanged, and this info can be displayed by calling gnoland secrets get NodeKey

It displays the following values:

Screenshot 2024-06-19 at 10 59 48

These values will be easily fetch-able when we introduce json output support for these outputs in #2301

cc @mazzy89

Contributors' checklist... - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 54.64%. Comparing base (e7e47d2) to head (3286abe).

Files Patch % Lines
gno.land/cmd/gnoland/secrets_get.go 80.00% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2361 +/- ## ======================================= Coverage 54.63% 54.64% ======================================= Files 581 581 Lines 77967 77987 +20 ======================================= + Hits 42598 42614 +16 - Misses 32190 32192 +2 - Partials 3179 3181 +2 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2361/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [gno.land](https://app.codecov.io/gh/gnolang/gno/pull/2361/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.95% <80.00%> (+0.08%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

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

mazzy89 commented 1 week ago

Thank you @zivkovicmilos to bring this in. It certainly improves the bootstrap experience.

One small feedback. WOuld it make sense to call the command NodeId rather than NodeKey. What is the rationale behind the choice of word NodeKey?

zivkovicmilos commented 1 week ago

@r3v4s Thank you for the heads up about the protocol part of the P2P address 🙏

I've resolved it in: dc9a07e

zivkovicmilos commented 1 week ago

@mazzy89

I've updated it to NodeID, since we display more information now 👍

Thank you for the suggestion 🙏

846f8dc