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

bug: worst case share indexes uses max square size #47

Closed
rootulp opened this issue Mar 5, 2024 · 2 comments · Fixed by #49
Closed

bug: worst case share indexes uses max square size #47

rootulp opened this issue Mar 5, 2024 · 2 comments · Fixed by #49
Assignees
Labels
bug Something isn't working

Comments

@rootulp
Copy link
Collaborator

rootulp commented Mar 5, 2024

Context

func worstCaseShareIndexes(blobs, maxSquareSize int) []uint32 {

Problem

We want worstCaseShareIndexes to always use the upper bound for max square size (128) so that celestia-node doesn't have to be stateful when extending the ODS.

If worstCaseShareIndexes uses the max effective square size (64) then celestia-node would have to poll celestia-app for the gov max square size every block.

Also note that celestia-app v1.x used a worstCaseShareIndexes of 128 so it was a consensus breaking change to drop down to 64.

Proposal

Modify the second argument to this function to use the upper bound of 128

@rootulp rootulp added the bug Something isn't working label Mar 5, 2024
@rootulp rootulp self-assigned this Mar 5, 2024
@rootulp
Copy link
Collaborator Author

rootulp commented Mar 5, 2024

FWIW I think this issue has existed since go-square was extracted from celestia-app. See 68863fc#diff-f37b1db98350d69502a30f6f3dd88ae2f6844b2bb6e0c46f89d3b6a237788b3cR414

@rootulp
Copy link
Collaborator Author

rootulp commented Mar 8, 2024

I just thought of a way to fix this bug without introducing an API breaking change, will publish an alternative PR soon.

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
1 participant