feat(daemon): improve stdout on startup #10472
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is based on today's colo discussion, aims to address two problems with
ipfs daemon
output during startup:host:port (TCP, UDP)
and hide libp2p behindipfs id
Rationale
It no longer makes sense to list all listener and announced multiaddrs when the node starts. Modern libp2p node will have 3-4 transports sharing the same UDP port, and also have a very long list of webtransport and webrtc direct certhashes inlined in the address.
This makes startup output hard to parse, and what is worse, there is no PeerID, making printing these addresses not very useful without calling 'ipfs id' anyway.
This change removes announced and discovered multiaddrs from the stdout and replaces them with prompt to run "ipfs id". This allows user to learn about public address obtained via relays or UPnP.
Second change is to replace list of listeners in multiaddr form with simpler one, that de-duplicates listeners and provides node operator with useful information about opened ports in 'host:port (tcp,udp)' format, which is way more useful during debugging connectivity issues related to port forwarding etc.
Before
After (this PR)
PeerID is printed, and swarm listeners are summarized as
host:port (TCP, UDP)
cc #10436