Closed jorgesjv closed 1 year ago
Hi @jorgesjv I've set up an environment to replicate your issue and it still happens on the latest version of besu. What I've noticed is that when you enable the trace logs from besu you can see the contract call gets this logs raised in besu: "MessageFrame evaluation halted because of INSUFFICIENT_GAS" So if you're working with a wallet like metamask you can probably edit the the gas limit you're giving to the transaction. It's likely that you've seen issues after going through Berlin because some opcodes had gas prices increased in Berlin. You can find some of the informations of why this transaction might require more gas after berlin here: https://eips.ethereum.org/EIPS/eip-2929 And the difficulty of calculating a estimated gas limit (which is hard to get accurate) here: https://github.com/trufflesuite/ganache-cli-archive/releases/tag/v6.4.2
That said, there might be improvements that we could do on our side to provide a better gas limit estimation but it will require further investigation.
Also I just noticed that you've called the Constantinople version of the contract passing 0 as value, if you do the same for Berlin it the call will be successful. The same applies for the contrary if you call the contract compiled to Constantinople passing 5 ethers (5000000000000000000 wei) as value it will fail.
Closing due to inactivity. Please feel free to re-open if necessary.
Hi @gfukushima, sorry for the delay. Thanks for the info, i will check it out and test it again these days.
Hi @gfukushima, i've already test it, and you were right. It was a gas problem, i`ve increaded the gas limit up to 300000 and both versions were successful. My Metamask, by default, set gas limit under the necesary for the transactions and have to edited for the purpose.
Thanks a lot!
Hi again @gfukushima. I've check again the results and i've notice something that i don't really understand. Like i've said before, when i send the transaction, i have to increase gas limit in Metamask, if not, the transaction fails; but after increase it and the transaction is succesfull, the transaction cost is below the previously estimated. For example: Estimated Gas by Metamask: Later i have to increase the gas limit to 320520 (for example,just a zero at the end, just to be sure). And the transaction response:
The transaction cost is below the estimated, but if i don't increase it, transaction fails.
Any sense of that?
Thanks in advance.
The link I shared in one of my comments above explains why that happens. Re-sharing: https://github.com/trufflesuite/ganache-cli-archive/releases/tag/v6.4.2
Description
In a private Besu network that transitioned to Berlin in the past we get fails with contracts compiled for Berlin EVM with Remix. The same contracts work OK when compiled for Constantinople.
Steps to Reproduce (Bug)
genesis.json
test.sol
Logs from node
This log proves the Berlin milestone passed long ago.
And the moment it was updated to Berlín.
In order to test it in Remix IDE, i compiled the SC for Berlin EVM version and call sendViaTransfer, sendViaCall and sendViaSend functions, and all failed.
And when i compiled the same SC for Constantinople EVM version, and call the same send functions, it worked.
Versions