Skip to content

Conversation

@0xMushow
Copy link
Contributor

PR description

Fixed Issue(s)

Closes #9136

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

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 {}",
Copy link
Contributor

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>
Copy link
Contributor

@fab-10 fab-10 left a 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

…fyPrecompiledContract.java

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 enabled auto-merge (squash) August 29, 2025 16:15
@0xMushow
Copy link
Contributor Author

thanks, forgot about it!

@fab-10 fab-10 merged commit f1c6b1d into hyperledger:main Aug 29, 2025
46 checks passed
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
…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>
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
…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>
georgereuben pushed a commit to georgereuben/besu that referenced this pull request Sep 16, 2025
…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>
georgereuben pushed a commit to georgereuben/besu that referenced this pull request Sep 16, 2025
…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>
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.

Correct P256VERIFY input length in error message

2 participants