Skip to content

eth_estimateGas responds with actor not found #12441

@Schwartz10

Description

@Schwartz10

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I did not make any code changes to lotus.

Lotus component

  • lotus Ethereum RPC
  • lotus FVM - Lotus FVM interactions
  • FEVM tooling
  • Other

Lotus Version

Running the public glif nodes

Repro Steps

Curl request to eth_estimateGas that fails with actor not found:

curl 'https://api.calibration.node.glif.io/rpc/v1' \
  -H 'Accept: application/json' \
  -H 'Accept-Language: en-US,en;q=0.9,es;q=0.8' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: __stripe_mid=778e36cb-7efb-46da-986b-8e8e1146f17e7602bc' \
  -H 'Origin: chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: none' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36' \
  --data-raw '{"id":588633187,"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0xb1040d3ce131b3204e5229c80a8d5ae271b2ef09","to":"0x7fa33ed9fce1e9c620cef778c5601286cd68e027","data":"0x5c19a95c000000000000000000000000b1040d3ce131b3204e5229c80a8d5ae271b2ef09"}]}'

returns:

{"jsonrpc":"2.0","error":{"code":1,"message":"failed to estimate gas: ApplyWithGasOnState failed: call raw get actor: resolution lookup failed (t410fweca2phbggzsatssfheavdk24jy3f3yjxzll22i): resolve address t410fweca2phbggzsatssfheavdk24jy3f3yjxzll22i: actor not found"},"id":588633187}

This is an incompatibility with the same call on infura ethereum mainnet, which returns:

{"jsonrpc":"2.0","id":3525842942,"result":"0xbea9"}

Describe the Bug

Integration partners call eth_estimateGas to estimate the gas of a given transaction. In some circumstances, a web app may estimate the gas of a transaction even if the account has no balance to pay for the transaction fee. Ethereum mainnet seems to ignore the from address' balance when calling eth_estimateGas . Subsequently, when the same user tries to submit the transaction with the same from address, the call fails with insufficient funds (or maybe in our case, actor not found).

In some cases, integrators have to patch filecoin specific functionality into their otherwise chain agnostic frontend

Tooling

Curl

Configuration Options

This is the public glif api, i'm not sure its exact config options

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🐱 Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions