-
Notifications
You must be signed in to change notification settings - Fork 299
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!: differentiate namespaced padded shares #1341
Conversation
Codecov Report
@@ Coverage Diff @@
## main celestiaorg/celestia-app#1341 +/- ##
==========================================
+ Coverage 48.21% 48.24% +0.03%
==========================================
Files 79 79
Lines 4405 4425 +20
==========================================
+ Hits 2124 2135 +11
- Misses 2103 2109 +6
- Partials 178 181 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM mostly a few nits.
I wonder why both sparse shares and compact shares are the same version. To me, the versioning indicates a different way of interpreting an array of 512 bytes
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.
thanks for doing this so fast!!
doesn't have to be in this PR, but we should keep a reminder somewhere to update the spec if we don't have one already.
edit: shoot, sorry should have read the intro comment 🤦
Co-authored-by: Callum Waters <[email protected]>
They don't strictly need to be the same version but at the moment, it's possible to differentiate compact shares and sparse shares via the share's namespace ID so they don't need to be separate versions. I think it's a little clearer to not version them separately because consider the following scenario: Time
|
This is true but you're also viewing it from an angle where there are only ever two main types of share encoding/decoding (compact and sparse). These terms themselves are only named relative to themselves. Say we introduce an Using the namespace to dictate which protocol we use to interpret the bytes puts us in a bind. If we wanted to change so that certain transactions use You could also set constants like Btw, I'm not implying that we have to do all this, I'm just exploring out loud the design space. |
Agreed and thanks for articulating the use case with |
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.
LGTM, left a question to understand more. Would defer approval to other reviewers.
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.
LGTM
Implements the proposal in #783 (comment). Closes #1136 Closes #783 Opens #1344 --------- Co-authored-by: Callum Waters <[email protected]>
Implements the proposal in #783 (comment).
Closes #1136
Closes #783
Opens #1344