Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p2p: report-peer-id option for listen #5771

Merged
merged 2 commits into from
Nov 30, 2018
Merged

p2p: report-peer-id option for listen #5771

merged 2 commits into from
Nov 30, 2018

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Nov 13, 2018

Was suggested on IRC, when set it basically passes QmPeerid\n of connecting peer into listener stream.

(works but needs tests)

@magik6k magik6k requested a review from Kubuxu as a code owner November 13, 2018 02:10
@ghost ghost assigned magik6k Nov 13, 2018
@ghost ghost added the status/in-progress In progress label Nov 13, 2018
@magik6k magik6k force-pushed the p2p/report-remote branch 2 times, most recently from 59721f7 to fa2e6c5 Compare November 13, 2018 19:43
@Stebalien
Copy link
Member

Stebalien commented Nov 14, 2018

We should also consider sending a binary peer ID (maybe length-prefixed?, although peer IDs are already prefix-free codes). This may be easier to parse than having to read to a newline and then potentially base58 decode. It also means we can change encoding without breaking things.

However, I haven't thought though this thoroughly.

@magik6k
Copy link
Member Author

magik6k commented Nov 14, 2018

Technically they carry the multihash prefix which has length. I can see binary form being useful, but I can't think of any nice way to do this other than 2 separate flags

@Stebalien
Copy link
Member

Meh. The current version is quite user friendly.

Any objections @ipfs/go-team?

@Stebalien Stebalien added the need/review Needs a review label Nov 15, 2018
@whyrusleeping
Copy link
Member

Eh, I think that practically, the base58 encoded version will be the most useful. If we make it binary, writing a parser becomes just that much more difficult.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A week has gone by, @whyrusleeping has given his blessing, 🚂.

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
@Stebalien Stebalien merged commit d34e3c8 into master Nov 30, 2018
@ghost ghost removed the status/in-progress In progress label Nov 30, 2018
@gammazero gammazero deleted the p2p/report-remote branch April 14, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants