-
Notifications
You must be signed in to change notification settings - Fork 303
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 information byte to message share format #839
Comments
Thanks for the visual depictions of the current/proposed share format, they really help!
Clarifying question: is this because a a client cannot differentiate between Does the proposed format include the message start indicator in the info byte (as opposed to a separate byte) to save one byte per share? This seems like a sane tradeoff to make assuming we don't expect to exhaust 2^7 versions. |
Yes to both. Also, we could use the info byte for other types of signals in
the future, if we need to.
…On 18 August 2022 20:17:19 Rootul Patel ***@***.***> wrote:
Thanks for the visual depictions of the current/proposed share format, they
really help!
> The message start indicators allow clients to parse a whole message in the
> middle of a namespace, without needing to read the whole namespace.
Clarifying question: is this because a a client cannot differentiate
between `message length (varint)` and arbitrary `share data` in the current
format?
Does the proposed format include the message start indicator in the info
byte (as opposed to a separate byte) to save one byte per share? This seems
like a sane tradeoff to make assuming we don't expect to exhaust 2^7 versions.
--
Reply to this email directly or view it on GitHub:
#839 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
The info byte could always be extended, e.g. if the 7 bits are The proposal seems fine, I have no objections. Adding versions to things has proven to basically always be a |
Closing in favor of celestiaorg/celestia-app#659 |
The current share format is as follows:
nid (8 bytes) | message length (varint) | share data
for shares at the start of a message;nid (8 bytes) | share data
for other shares.I propose to change it to the following:
nid (8 bytes) | info byte | message length (varint) | share data
for shares at the start of a message;nid (8 bytes) | info byte | share data
for other shares.Where
info byte
is a byte with the following structure:Rationale:
The text was updated successfully, but these errors were encountered: