Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does:
constantine/math/config
, in particularconstantine/math/config/curves
to a newconstantine/named
folder and correspondingconstantine/named/algebra
file.This does not break code that depends on public protocols like BLS signatures, KZG commitments or EVM precompiles.
It will break code that imports internals in
constantine/math/config
. A followup PR will rename internal methods to reflect expanding Constantine beyond elliptic curves so it is recommended to wait before upgrading.Rationale
Curve-specific or protocol-specific code should be separated from the generic
math
folder.Furthermore, we will likely support and accelerate field arithmetic for STARK proof systems which do not use elliptic curves. The current configuration assumes we use named curves. The file has been renamed to
algebra
instead of curves to encompass both fields and curves.A future PR will rename the configuration functions as named curves are used everywhere in the code so just changing path ended up modifying 429 files!
Regarding the switch to absolute path imports, those avoid needing to figure out relative paths when moving files.
They also allow copying of tests or internal files or user code to other locations without having to modify the imports.