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
[Feature] UUIDs, protocol versioning, v2 protocol w/ dag-cbor messaging #332
[Feature] UUIDs, protocol versioning, v2 protocol w/ dag-cbor messaging #332
Changes from 17 commits
f330fe8
480fcf5
cf6009a
af9dd52
a2a87fe
d25c6ef
901b2c0
caa4b58
8ef2008
ea4a06a
45b87ff
c3649f3
cb45833
9c08dd0
989cf66
fc58e23
161a577
e997ff3
4e57d92
6b86c3c
eb16b27
83c3860
21a4546
ff4d7ad
586931b
259905a
e66b39d
e27c827
8106555
db297c1
f6a08b5
c938c6b
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.
Just noticed this -- there a reason for a request ID to be a
struct { string }
as opposed to just astring
? I noticed we aren't particularly uniform with this actually. CID is struct{string} while filecoin's Address and libp2p's peer.ID. I'm wonder about the tradeoffs... anyway, just food for thought.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 experimented with a few things here but landed on this after copying
cid.CID
's pattern with the main reasoning being that this is really a byte string, I don't want users to consider it reasonable to cast this to a user-readablestring
(knowing it's a UUID and seeing it's a typedstring
, that would be a reasonable API assumption I reckon), they really should.String()
it to get the string form of a UUID. The same thing holds forCID
(and probably should for other types that are not utf8 strings IMO).And, I didn't use
[]byte
because it needs to be used for map keys (I learnt my Go lesson about that while trying it!).Happy to change it if you think it should be a simple
string
though.