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

eth_call fails with intrinsic gas too high #1898

Closed
Tracked by #1579
mattsse opened this issue Mar 21, 2023 · 6 comments
Closed
Tracked by #1579

eth_call fails with intrinsic gas too high #1898

mattsse opened this issue Mar 21, 2023 · 6 comments
Assignees
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior C-enhancement New feature or request C-test A change that impacts how or what we test

Comments

@mattsse
Copy link
Collaborator

mattsse commented Mar 21, 2023

Describe the feature

see #1785 for how to reproduce

error:

>>  {"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"from":"0xaa00000000000000000000000000000000000000","to":"0xaa00000000000000000000000000000000000000"},"latest"]}
<<  {"jsonrpc":"2.0","error":{"code":-32000,"message":"intrinsic gas too high"},"id":1}
response differs from expected:
 {
-  "error": {
-    "code": -32000,
-    "message": "intrinsic gas too high"
-  },
   "id": 1,
   "jsonrpc": "2.0"
+  "result": "0x"
 }

this is likely a misconfig of env.tx.gas_price and env.tx.gas_limit before the call is executed.

Additional context

No response

@mattsse mattsse added C-bug An unexpected or incorrect behavior C-enhancement New feature or request A-rpc Related to the RPC implementation C-test A change that impacts how or what we test labels Mar 21, 2023
@mattsse mattsse self-assigned this Mar 21, 2023
@mattsse
Copy link
Collaborator Author

mattsse commented Mar 22, 2023

likely an issue with tx env config or env config in general

if request_gas.is_none() && env.tx.gas_price > U256::ZERO {
// no gas limit was provided in the request, so we need to cap the request's gas limit
cap_tx_gas_limit_with_caller_allowance(&mut db, &mut env.tx)?;
}

@Rjected
Copy link
Member

Rjected commented Mar 23, 2023

hmm, after doing some tracing it looks like the env is being set correctly, but the account has zero balance

@Rjected
Copy link
Member

Rjected commented Mar 24, 2023

might also be related to why eth_getBalance is currently failing, since it reports the same account's balance as 0, instead of 1

@Rjected Rjected self-assigned this Mar 24, 2023
@Rjected
Copy link
Member

Rjected commented Mar 28, 2023

Fixed with #1997

@Rjected Rjected closed this as completed Mar 28, 2023
@chen4903
Copy link

I meet intrinsic gas too high in cli.
I start a private network: reth node -d --chain genesis.json --datadir /opt/reth_data/ --auto-mine --http.
But when I send some ether to the other account ,it fails:

levi@levi:/opt/reth_data$ cast balance 0xd143C405751162d0F96bEE2eB5eb9C61882a736E
89800000000000000000000000
levi@levi:/opt/reth_data$ cast send     --from 0xd143C405751162d0F96bEE2eB5eb9C61882a736E       --value 1 --legacy --private-key     0xcece4f25ac74deb1468965160c7185e07dff413f23fcadb611b05ca37ab0a52e       0x944fDcD1c868E3cC566C78023CcB38A32cDA836E
Error: 
(code: -32000, message: intrinsic gas too high, data: None)

my reth:

reth Version: 0.2.0-beta.5
Commit SHA: VERGEN_IDEMPOTENT_OUTPUT
Build Timestamp: 2024-04-14T10:50:23.293075558Z
Build Features: jemalloc
Build Profile: debug

@chen4903
Copy link

fixed by change the gaslimit in the genesis.json:

"gasLimit": "0x1388", // not work: (code: -32000, message: intrinsic gas too high, data: None)
"gasLimit": "0x2fefd8" // works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior C-enhancement New feature or request C-test A change that impacts how or what we test
Projects
Archived in project
Development

No branches or pull requests

3 participants