hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.49k stars 815 forks source link

Check for infinity in eip-196 ecmul #7509

Closed garyschulte closed 1 month ago

garyschulte commented 1 month ago

PR description

Fixed Issue(s)

Highlighted by arewefastyet report, this PR addresses a recent regression in performance for eip-196 scalar multiplication when the point is at infinity

local testing shows significant improvement for these benchmarks:

  24.6.0 24.7.1 24.8.0 24.8-develop
EcMulInfinities2Scalar 1455.8 381.58 390.36 2526.56
EcMulInfinities32ByteScalar 1246.28 242.1 245.67 2478.99

related to #7542

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

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

garyschulte commented 1 month ago

waiting on fuzz testing results before merging