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 LOG_EXPANSION_FACTOR constant #515

Merged
merged 7 commits into from
Oct 15, 2024

Conversation

b-wagn
Copy link
Contributor

@b-wagn b-wagn commented Oct 9, 2024

This PR fixes #512.

Note that in contrast to what is stated in the issue, the code will not work for other constants as it is.
This is because it contains precomputed constants such as ROOT_OF_UNITY that are tailored to the expansion factor being two (LOG_EXPANSION_FACTOR = 1). We could have added code to compute the constants on the fly based on the expansion factor, but this would add significant overhead. Therefore, introducing the constant is more a way to improve readability instead of a way to make the code more general.

Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for this, this is better 😄

@jtraglia jtraglia requested a review from asn-d6 October 10, 2024 16:03
src/eip7594/cell.h Outdated Show resolved Hide resolved
b-wagn and others added 2 commits October 15, 2024 11:16
Co-authored-by: George Kadianakis <desnacked@riseup.net>
@jtraglia jtraglia merged commit 80d3e0d into ethereum:main Oct 15, 2024
41 checks passed
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 this pull request may close these issues.

Constant for Expansion Factor
3 participants