feat(daemon): improve stdout on startup#10472
Merged
Merged
Conversation
It no longer makes sense to list all listener and announced multiaddrs when the node starts. Modern libp2p node will have 3-4 transports sharign 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 annouced 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 deduplicates listeners and provides node operatior with useful information about opened ports in 'host:port (tcp,udp)' format, which is way more useful during debuging connectivity issues related to port forwarding etc.
subjective, but looks better than ,
lidel
commented
Aug 14, 2024
lidel
left a comment
Member
Author
There was a problem hiding this comment.
No concerns raised so far, landing to master, and 0.30.0-rc1 next week for wider feedback.
Member
|
@lidel with these changes, how do users get listening multiaddrs for the kubo node? should we print out a "get listening multiaddrs with" line? |
Member
Author
|
Good question. I'd say user can inspect config? Daemon should print useful information, and not all defined listeners will work. This PR prints Felt like a good compromise, but if it is not enough, free to improve this line in a new PR: Line 826 in 7b2d58e |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 daemonoutput during startup:host:port (TCP, UDP)and hide libp2p behindipfs idRationale
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