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.
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
add
/webrtc
and/certhash
#59add
/webrtc
and/certhash
#59Changes from 3 commits
ecb05e6
9692716
c09d140
d9e68fa
dd16c4d
c8dcc39
7cb2408
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that a
/certhash
is a multibase encoded multihash, this could have any base, not justBase58Btc
. Am I missing something?For reference, see Golang implementation: https://github.com/multiformats/go-multiaddr/pull/176/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to allow multiple different bases? It means that multiple multiaddresses with different string representations might actually be equal, and it means that decoding then re-encoding a multiaddress might produce a different result than the original, both of which are rather surprising to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I suppose that my concern regarding the fact that we're using a multihash has simply been ignored, as usual for my concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't see any immediate neither long term benefits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @marten-seemann maybe you have some arguments in favor of
certhash
having various bases?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we're having this discussion on the Rust repo. multiformats/multiaddr#130 is the PR that added the multiaddr component, and it seems like this discussion would logically belong there.
The reason for using a multibase is the same as for any multi-thing: "We're probably wrong today, but at least we keep our way open to be right tomorrow."
If there's no need to decide for one blessed way of doing things, why would we pick one?
More specifically, different environments (e.g. browser URLs) have different encoding requirements. Multibase makes it easy to adapt to these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiformats/multiaddr#130 doesn't even define the format of the payload behind
/certhash
. There's been no discussion about this payload.There is some need, as otherwise multiple multiaddresses with different string representation might be equal, as mentioned above.
Choosing which encoding to use is an arbitrary decision, but "leave the choice to the user" is a decision as well, and in my opinion worse in strictly all ways compared to arbitrarily picking one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, Marten raced me to it here. Slightly adjusted reply below.
Sorry in case you feel like your points are being ignored. This is definitely not deliberate.
Good point. In favor of moving the discussion there.
multiformats/multiaddr#130 (comment)