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

Use square sizes that are always a power of two #257

Closed
evan-forbes opened this issue Mar 29, 2021 · 1 comment · Fixed by #331
Closed

Use square sizes that are always a power of two #257

evan-forbes opened this issue Mar 29, 2021 · 1 comment · Fixed by #331

Comments

@evan-forbes
Copy link
Member

evan-forbes commented Mar 29, 2021

This issue is encapsulating this TODO https://github.com/lazyledger/lazyledger-core/blob/a77b6791c1eb19506d03cdb79b234076b6b444bf/types/block.go#L1354

as a bonus side quest, we should only use one piece of code to find the next power of two. Currently, there are two different functions that define the similar functionality.
https://github.com/lazyledger/lazyledger-core/blob/a77b6791c1eb19506d03cdb79b234076b6b444bf/p2p/ipld/read.go#L73
and
https://github.com/lazyledger/lazyledger-core/blob/a77b6791c1eb19506d03cdb79b234076b6b444bf/crypto/merkle/tree.go#L95

@evan-forbes evan-forbes mentioned this issue Mar 29, 2021
2 tasks
@evan-forbes
Copy link
Member Author

This PR should also add robust testing for computing shares from block data, as discussed in this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant