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

ADR-007: Universal Share Prefix #660

Merged
merged 24 commits into from
Oct 6, 2022

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Aug 24, 2022

Description

ADR version of #659

rendered

@rootulp rootulp self-assigned this Aug 24, 2022
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

Nice!! I like combining the two features into a single ADR, I might mention in the detailed design part that these are distinct features and can be implemented as such.

As we flesh this out, I look forward to your thoughts over what the new API will look like, and what our approach should be to handle that API change 🙂

docs/architecture/ADR-002-universal-share-encoding.md Outdated Show resolved Hide resolved
docs/architecture/ADR-002-universal-share-encoding.md Outdated Show resolved Hide resolved
@rootulp

This comment was marked as resolved.

@rootulp rootulp requested a review from adlerjohn August 26, 2022 22:07
@rootulp rootulp marked this pull request as ready for review August 26, 2022 22:07
@rootulp rootulp requested a review from musalbas August 26, 2022 22:17
@rootulp rootulp changed the title ADR-002: Universal Share Encoding ADR-002: Universal Share Prefix Sep 23, 2022
@musalbas
Copy link
Member

musalbas commented Sep 26, 2022

I don't have any strong opinions on naming as long as it's clear. That being said, I would consider compact shares to have one "message", which further reinforces the idea that data in reserved namespace follow the same share-level format as any other namespace.

@rootulp
Copy link
Collaborator Author

rootulp commented Sep 26, 2022

What is the definition of "message"? I interpreted it as the previous name for data that a user submits to be included in a block (i.e. the second message in MsgPayForMsg which was renamed MsgPayForData). Maybe in this context, "message" means something else because we're now using it to describe evidence, intermediate state roots, and transactions.

the idea that data in reserved namespace follow the same share-level format as any other namespace.

Agreed and I like the share-level format terminology. I think we can split the format into:

  1. Share-level
    1. namespace
    2. info reserved byte
    3. [if info reserved byte has message start indicator=1] message length varint
  2. Application-level
    1. For sparse shares: no additional format imposed
    2. For compact shares: 1 reserved byte for location of first unit in the share and every unit is prefixed with a varint of the unit's length

if this separation adds clarity

@rootulp rootulp changed the title ADR-002: Universal Share Prefix ADR-007: Universal Share Prefix Oct 3, 2022
@MSevey MSevey removed their request for review October 5, 2022 19:44
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

Well written and accessible ADR. Left some nits. The proposed scheme is clear and it looks good to me.

rootulp and others added 5 commits October 6, 2022 10:54
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
@rootulp rootulp requested a review from liamsi October 6, 2022 14:58
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

I think this is good to go :)

@rootulp rootulp merged commit 5ae1846 into celestiaorg:main Oct 6, 2022
@rootulp rootulp deleted the rp/adr-universal-share-encoding branch October 6, 2022 16:27
rach-id pushed a commit to rach-id/celestia-app that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants