When calling eth_estimateGas with the gas field set to the maximum value 0xffffffffffffffff or anything greater than 0x7fffffffffffffff, the endpoint returns and error says parameters are invalid, due to the fact that we use a long to fix the value, and it cannot fit these values.
This is not the correct behavior, so the fix is to cap the value to Long.MAX_VALUE, in case the input field has a greater value, since in practice gas limit will not reach such value.
The deserializer has been rename to GasDeserializer since it is now specific to gas and not generic long values.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
PR description
When calling
eth_estimateGas
with thegas
field set to the maximum value0xffffffffffffffff
or anything greater than0x7fffffffffffffff
, the endpoint returns and error says parameters are invalid, due to the fact that we use along
to fix the value, and it cannot fit these values. This is not the correct behavior, so the fix is to cap the value to Long.MAX_VALUE, in case the input field has a greater value, since in practice gas limit will not reach such value. The deserializer has been rename toGasDeserializer
since it is now specific to gas and not generic long values.Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests