-
Notifications
You must be signed in to change notification settings - Fork 387
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!: adapt tx inclusion proofs to use share inclusion proofs #1276
feat!: adapt tx inclusion proofs to use share inclusion proofs #1276
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1276 +/- ##
==========================================
- Coverage 49.79% 49.20% -0.59%
==========================================
Files 76 76
Lines 4374 4292 -82
==========================================
- Hits 2178 2112 -66
+ Misses 2014 2004 -10
+ Partials 182 176 -6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Question: should OptionsA. If we want celestia-app to continue supporting them: update this PR to retrofit a SharesProof into a TxProof. Update: I went with option A in this PR |
golangci-lint is not happy 😞 |
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.
Looks good to me! also made some nonblocking suggestions.
Exactly @cmwaters. I updated the PR description |
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.
nice! thanks for finally getting rid of the old code, it feels so much better w/o it
[only kinda related comment]
I'm still thinking about if we want to support proving multiple blobs at once. presumably just wrapping many ShareProofs, but perhaps we just shouldn't support that, and people can do that themselves if they need it.
assert.Equal(t, tc.want, got) | ||
}) | ||
} | ||
} | ||
|
||
func TestExport(t *testing.T) { |
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 this!!
Given we support multiple blobs in a single transaction, I think celestia-app should also consider supporting a single proof for the multiple blobs associated with a single tx. I think this would involve some form of multiple ShareProofs (one per share range that a blob occupies). |
Closes celestiaorg/celestia-core#920 Closes #1226 b/c deletes that code Closes #1049 b/c deletes that code ## Description Previously the logic to generate tx proofs was flawed because it did not accurately identify which shares a transaction belongs to. Additionally the struct `TxProof` (originally defined by Tendermint but later modified in celestia-core) was incomplete because it did not contain proofs for the inclusion of a set of rows to the data square root. This PR modifies the TxInclusion logic to return a share inclusion proof instead of a transaction inclusion proof. The share inclusion proof does contain proofs for the rows to the data square root. In order for txs to use share inclusion proofs, `SplitTxs` was updated to keep track of the range of shares that a tx occupies. --------- Co-authored-by: CHAMI Rachid <[email protected]> Co-authored-by: Sanaz Taheri <[email protected]>
Closes celestiaorg/celestia-core#920
Closes #1226 b/c deletes that code
Closes #1049 b/c deletes that code
Description
Previously the logic to generate tx proofs was flawed because it did not accurately identify which shares a transaction belongs to. Additionally the struct
TxProof
(originally defined by Tendermint but later modified in celestia-core) was incomplete because it did not contain proofs for the inclusion of a set of rows to the data square root. This PR modifies the TxInclusion logic to return a share inclusion proof instead of a transaction inclusion proof. The share inclusion proof does contain proofs for the rows to the data square root. In order for txs to use share inclusion proofs,SplitTxs
was updated to keep track of the range of shares that a tx occupies.