-
Notifications
You must be signed in to change notification settings - Fork 157
tests(benchmark): expand worst case modexp benchmarks #1780
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
base: main
Are you sure you want to change the base?
Conversation
9848e75
to
e57474f
Compare
07d28a4
to
0af4f81
Compare
@kevaundray I’ve checked with the Nethermind team regarding the ported test. Could you help confirm whether we can change the ending from "00" to "02" for the even case? Based on our previous discussion, using "00" as the ending might get stripped by Example:
|
#1804 got merged! Please rebase the branch and move the tests to the appropriate folder. |
I don't think this is a problem because modexp is supposed to right-pad the input with zeros if the sum of the lengths provided is greater than the calldata input. It might be better to rollback this change IMO. |
I could not make the conversion script work or rather I don't know what the inputs should be, could you share more info on the input data? |
0af4f81
to
46c1178
Compare
Thanks @marioevz, I've updated my script and the description, you could find the details in the PR description now. |
🗒️ Description
The test cases are divided into two parts: the first tests the upper bound of modexp based on EIP-7823, and the second ports cases from Nethermind. For the latter one, I’ve added a reference to each individual case.
Script for converting the test case: https://gist.github.com/648207a8651d3319ea6dd06e9c977422.git
This PR ports the modexp test cases from Nethermind, you can find the corresponding code here.
I wrote a script to generate test cases, this is my process:
python script.py
output.txt
and this is the result.🔗 Related Issues
Issue #1453
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.