Skip to content
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

bug: public transaction manager does not handle insufficient gas error from Besu #503

Open
annamcallister opened this issue Jan 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@annamcallister
Copy link
Contributor

annamcallister commented Jan 7, 2025

What happened?

I submitted a public transaction where the gas limit was too low so the transaction failed. The only error message I get in Paladin is

"PD012214: Unable to decode revert data (no revert data available)"

The Besu logs have this error

2025-01-07 12:44:02.098+00:00 | BftProcessorExecutor-QBFT-0 | DEBUG | MainnetTransactionProcessor | Transaction 0xbf07ab16ce103f41dab55328f4770a153e63799e5a421d48ff4a2cd6823aecd7 processing halted: INSUFFICIENT_GAS

But there is nothing in the eth transaction receipt that comes back to paladin to explain the error

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xa99314e845f101ffaf195f41d64c642933e0b148b62c6714086d9412cb520e51",
        "blockNumber": "0x7e9",
        "contractAddress": null,
        "cumulativeGasUsed": "0x5500",
        "from": "0x862c91b5123a4666737afacbd75e7d99c7d0d792",
        "gasUsed": "0x5500",
        "effectiveGasPrice": "0x0",
        "logs": [],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x0",
        "to": "0x6fcd88836a8fddb89837357ae6f4e4cfd5ef78b8",
        "transactionHash": "0xeb085bf12b5c443d831ad847cf66aa0ad350b2d3def5de44da2505f765fd96aa",
        "transactionIndex": "0x0",
        "type": "0x2"
    }
}

What did you expect to happen?

An error message in paladin saying that the transaction had failed because my provided gas limit was too low. It is also possible to hit this error if the estimated gas from eth_estimateGas is too low (which seems to happen very frequently when under load but this needs investigating from the besu side as well), in which case I'd expect a similar message but one which is explicit that it was paladin's estimate that was too low.

How can we reproduce it (as minimally and precisely as possible)?

Deploy simple storage and call set function with a gas limit of 0x5500

Anything else we need to know?

Ideally the error message would be propagated back from Besu, but failing this we could probably safely assume that if a transaction has failed without a reason and the gas used is equal to the gas limit that it is an insufficient funds problem.

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
@annamcallister annamcallister added the bug Something isn't working label Jan 7, 2025
@annamcallister annamcallister changed the title bug: public transaction manager does not handle insufficient funds error from Besu bug: public transaction manager does not handle insufficient gas error from Besu Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant