Refactor BLS12_381 conformance tests to remove literal curve points - #7837
Merged
Conversation
Contributor
Author
|
Fixed now. |
Unisay
approved these changes
Jul 10, 2026
Unisay
left a comment
Contributor
There was a problem hiding this comment.
Uniform, correct refactor. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We provide literal syntax for BLS12_381 constants in the textual format, but don't permit such constants in flat-encoded files because deserialisation is quite CPU-intensive. Instead, if you want to use a constant of this type you have to deserialise it from a bytestring during script execution using an appropriate
uncompressfunction so that the user pays for deserialisation cost from the script budget. Using the textual format made it easy to write conformance tests, but tests using that feature couldn't be converted toflat, making it difficult for external users to use the tests. This PR updates most of the conformance tests to perform explicit deserialisation (in preparation for addingflatfiles to the repository). I haven't altered the tests in theconstantdirectory because they're really tests of the parser, and in hindsight maybe shouldn't be included in the conformance tests; maybe we should move them elsewhere at some point.