Skip to content
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

add back LastGoodSquare to errors #25

Closed
liamsi opened this issue Apr 3, 2021 · 0 comments · Fixed by #44
Closed

add back LastGoodSquare to errors #25

liamsi opened this issue Apr 3, 2021 · 0 comments · Fixed by #44
Assignees
Labels
bug Something isn't working

Comments

@liamsi
Copy link
Member

liamsi commented Apr 3, 2021

Revert removing the LastGoodSquare from the byzantine row/col errors (in #24).

copy-pasting @musalbas' clarification here:

It's so that fraud proofs can be generated for invalid codes, using the eds as much as it can be reconstructed.
It's not OK to remove LastGoodSquare

@adlerjohn had some ideas on how to add it without doing a deep-copy:

Basically, instead of corrupting the EDS here https://github.com/lazyledger/rsmt2d/blob/6610ba486a29d90dd0faa51f539da1415777a8f2/extendeddatacrossword.go?ts=4#L152-L158 then doing the check https://github.com/lazyledger/rsmt2d/blob/6610ba486a29d90dd0faa51f539da1415777a8f2/extendeddatacrossword.go?ts=4#L161-L170, do the check first then set the EDS in a way that's guaranteed correct. The check would have to compute a root based on existing leaves and a new set of repaired leaves, but that's just copy-pasting this logic https://github.com/lazyledger/rsmt2d/blob/6610ba486a29d90dd0faa51f539da1415777a8f2/extendeddatacrossword.go?ts=4#L152-L158.

But we can also just add it back as before and do the optimization later.

More important than above mentioned optimzations are test-cases (additional to go-doc comments) that document the purpose of the LastGoodSquare fields, for example by generating above mentioned fraud proofs (also related to #12).

@liamsi liamsi added the bug Something isn't working label Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants