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. |
cmwaters
left a comment
There was a problem hiding this comment.
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
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
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 |
rach-id
left a comment
There was a problem hiding this comment.
LGTM, left a question to understand more. Would defer approval to other reviewers.
Implements the proposal in #783 (comment). Closes #1136 Closes #783 Opens #1344 --------- Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Implements the proposal in #783 (comment).
Closes #1136
Closes #783
Opens #1344