-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add support for Named Records #6
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -292,6 +292,12 @@ Specified protocols are expected to be ordered in increasing order. | |
* http | ||
* the proposed `uvarint` protocol is `0x3D0000`. | ||
* the following bytes are not yet defined. | ||
* Named Record | ||
* Protocol `uvarint` is <TBD> in the multicodec table | ||
* the following bytes should be: | ||
* `uvarint` of the number of bytes in the name followed by the Name in bytes. | ||
* Name should be a UTF-8 string | ||
* `uvarint` of the number of bytes in the record followed by the Record bytes | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Side thread: What's the reason for "Specified protocols are expected to be ordered in increasing order." and will there be problems if the same protocol is specified in the same metadata multiple times? Trying to understand if this restriction will interact with this PR in a meaningful way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea with the order is that you do not have to parse the entire metadata to find if the protocol ID you are looking for is supported or not as long as a protocol with larger ID is encountered. |
||
#### ExtendedProvider | ||
|
||
|
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.
Was originally going to go for something like
0x0920
but given these are strings we can certainly add another byte and go further up the table. Once we're reasonably happy here I'll open a PR on the code table and get the number.