-
Notifications
You must be signed in to change notification settings - Fork 2.2k
aleth-vm generates abnormal gas used #5759
Comments
Can you please share the bytecode that you're executing? Is it just a single MSTORE? |
I guess it throws an exception (e.g. invalid opcode) and this consumes all provided gas. By default gas given to execution is mainnet's max block gas limit, which is |
We should display the error in the summarical info json string described in #4613 For example geth's
|
@halfalicious my bytecode:
The running result it returned:
@gumb0 you are right. Bad things happened because there's invalid opcode. But this is not a particular case, it happened in all of my bytecode (compiled from around 3000 contract files). |
@ToolmanInside Could you then please post the example of the valid code, for which this happens? |
When I use
aleth-vm --code my_bytecode
, it returns:Gas used: 9223372036854775807 (+21000 for transaction, -0 refunded) Output: 0 logs. 11 operations in 0.000259 seconds. Maximum memory usage: 0 bytes Expensive operations: MSTORE x 1 (3 gas)
This is a abnormal number. It is impossible to have such a large gas used.
same with #5351
The text was updated successfully, but these errors were encountered: