-
Notifications
You must be signed in to change notification settings - Fork 995
fix(evm): correct P256VERIFY input length in error message #9137
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
Conversation
Signed-off-by: Antoine James <antoine@ethereum.org>
| if (input.size() != 160) { | ||
| LOG.warn( | ||
| "Invalid input length for P256VERIFY precompile: expected 128 bytes but got {}", | ||
| "Invalid input length for P256VERIFY precompile: expected 160 bytes but got {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, but what if you create a constant for the value, even if the value is not meant to change it would have avoid the error in the first place, so it is a good practice.
Signed-off-by: Antoine James <antoine@ethereum.org>
fab-10
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make it static
evm/src/main/java/org/hyperledger/besu/evm/precompile/P256VerifyPrecompiledContract.java
Outdated
Show resolved
Hide resolved
…fyPrecompiledContract.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
|
thanks, forgot about it! |
…er#9137) * fix(evm): correct P256VERIFY input length in error message Signed-off-by: Antoine James <antoine@ethereum.org> * chore(evm): replaced hardcoded value with constant Signed-off-by: Antoine James <antoine@ethereum.org> * Update evm/src/main/java/org/hyperledger/besu/evm/precompile/P256VerifyPrecompiledContract.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> --------- Signed-off-by: Antoine James <antoine@ethereum.org> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…er#9137) * fix(evm): correct P256VERIFY input length in error message Signed-off-by: Antoine James <antoine@ethereum.org> * chore(evm): replaced hardcoded value with constant Signed-off-by: Antoine James <antoine@ethereum.org> * Update evm/src/main/java/org/hyperledger/besu/evm/precompile/P256VerifyPrecompiledContract.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> --------- Signed-off-by: Antoine James <antoine@ethereum.org> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: jflo <justin+github@florentine.us>
…er#9137) * fix(evm): correct P256VERIFY input length in error message Signed-off-by: Antoine James <antoine@ethereum.org> * chore(evm): replaced hardcoded value with constant Signed-off-by: Antoine James <antoine@ethereum.org> * Update evm/src/main/java/org/hyperledger/besu/evm/precompile/P256VerifyPrecompiledContract.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> --------- Signed-off-by: Antoine James <antoine@ethereum.org> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: georgereuben <reubengeorge101@gmail.com>
…er#9137) * fix(evm): correct P256VERIFY input length in error message Signed-off-by: Antoine James <antoine@ethereum.org> * chore(evm): replaced hardcoded value with constant Signed-off-by: Antoine James <antoine@ethereum.org> * Update evm/src/main/java/org/hyperledger/besu/evm/precompile/P256VerifyPrecompiledContract.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> --------- Signed-off-by: Antoine James <antoine@ethereum.org> Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: georgereuben <reubengeorge101@gmail.com>
PR description
Fixed Issue(s)
Closes #9136
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests