-
Notifications
You must be signed in to change notification settings - Fork 267
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
Include namespaces in erasured data #230
Comments
the plan was for lazyledger-core to use the nmt wrapper (#238) to generate roots for lazyledger-core, but now it's clear that the wrapper won't actually work for an extended data square. This is due to the fact that the wrapper has to know which row or column is being pushed in order to perform logic as to which namespace should be used. semi related comment Without this functionality, we cannot repair the data square, and therefore #235 and #232 are blocked. 👀 Extra details as to why the wrapper won't workUsing the wrapper's current construction, it only works for rows and cols that start in Q0 of the extended data square. As soon as a row or col that starts in one of the other quadrants is pushed, the wrapper has no way of knowing that it should use the parity namespace for all leaves pushed. Without this information, the wrapper ends up using incorrect namespaces, and the underlying nmt tree panics. Options
(1) will likely require the smallest number of changes |
Just noting that we kinda already went down the route of (3) when computing the row and column roots. I'm inclined to favor (3) simply because it feels like we are tried to work around the shortcomings of rsmt2d for quite a while already. Rsmt2d is simply not written in a way that has lazyledger as the main use-case in mind. My gut feeling is that we might run into yet another trap with (1) and (2): Either way, I'll try to gather all pros and cons and edit this comment here to list all those later. |
modify the rsmt2d.Tree interface to indicate to the underlying tree which row or col is being pushed (1)Pros
Cons
NeutralUse a different interface, possibly something similar to this, and pass that to rsmt2d.RepairExtendedDataSquare (2)Pros
Cons
NeutralCreate an external version of rsmt2d.RepairExtendedDataSquare that doesn't require rsmt2d.Tree (3)Pros
Cons
Neutral
There might be other options that we are missing here. |
We've decided to go with option (1) as it hopefully is a very simple change that only requires a few lines of code. If that still poses new issues (e.g. when trying to repair the eds), we will reconsider (2) and (3). |
Namespaces are currently left out when computing the extended datasquare. This becomes problematic when retrieving block data and we need to repair the underlying data square, as the namespaces are not preserved. To fix this, we should include the namespaces in the erasure data, along with adding some logic to use the appropriate namespace depending on which quadrant is being used.
spec ref: #145
The text was updated successfully, but these errors were encountered: