Uh oh!
There was an error while loading. Please reload this page.
Separate signed header and data to different blobs - #858
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #858 +/- ##
==========================================
- Coverage 56.11% 55.29% -0.82%
==========================================
Files 66 66 Lines 10705 11727 +1022 ==========================================
+ Hits 6007 6485 +478 - Misses 3830 4279 +449 - Partials 868 963 +95 ☔ View full report in Codecov by Sentry. |
S1nus
commented
Apr 13, 2023
why separate namespaces? |
gupadhyaya
commented
Apr 14, 2023
we can have faster queries and efficient processing of headers if you only need headers and not data. @nashqueue have some ideas for future utility for the common header namespace. @S1nus any downside to this? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Follow-up Issues:
|
gupadhyaya
commented
May 1, 2023
@nashqueue@tzdybal re-review required. Removed the hash dependency: we directly compute the hash and insert to header dataHash field before signing. while doing this, came across a bug where we were signing the header with dataHash which is obtained before updating the ISRs to block data (meaning it was empty when we data.Hash() and insert to header and sign). To fix this, I had to refactor the ApplyBlock (@tuxcanfly), which mainly moves the also, came across a potential issue: Header and data blob separation assumes same da height (#913) note that, I am hesitant to merge the two APIs (SubmitBlockHeader and SubmitBlockData) as it will create many issues to design the mock correctly. if this is a must, we can address it in the separate issue. |
nashqueue
left a comment
There was a problem hiding this comment.
New commits make sense. Only 1 small comment. As this is breaking so much, we should test it out thoroughly. Run a Gm / Ethermint tutorial as a sanity check.
Also, protobuf linter complains.
| if headerNamespaceID == dataNamespaceID { | ||
| return errors.New("header and data namespaces must be different") | ||
| } |
There was a problem hiding this comment.
This should not be enforced right?
There was a problem hiding this comment.
i think this should be enforced. if you write both header and data to same namespace and try to retrieve and unmarshal to certain type, it will lead to panic.
gupadhyaya
commented
May 4, 2023
|
while testing the actual celestia DA, the block data submission fails with hopefully the new tx, isr format (#885) fix the problem, where even when the txs empty, isr will wrap the block.Data to make it non-empty, hence we always have non-zero bytes to submit to DA. is this assumption correct @Manav-Aggarwal ? |
nashqueue
commented
May 12, 2023
@gupadhyaya This does not unblock the separation of block/header, as we would need to enable fraud proofs. But for pessimistic chains, we don't need the ISR overhead. We wouldn't need the header referencing the block, as there are no light nodes. You need full nodes to get full security for pessimistic mode. |
nashqueue
commented
May 12, 2023
Can we post an empty share instead? Like just a 0? Would this deserialize correctly? |
Manav-Aggarwal
commented
May 14, 2023
agreed, we should make sure things are consistent with pessimistic mode as well |
fixes#829
major changes are related to da/ package and dalc.proto:
proto/dalc/dalc.proto
da/da.go
next important change is in the manager.go which handles this changed logic
onlyHeaderto fire either SubmitBlockHeader or SubmitBlockData. the idea here is that, we first submit the data, get the data committment (right now it is just Data.Hash(), but later it will be changed to DA committment), insert that into the header before signing and then submit the signed header to DA in the second call to submitBlockToDAnode/full.go (node/full_client_test.go, node/full_node_integration_test.go)
types/hashing.go
types/serialization.go
state/executor.go (state/executor_test.go)