forest icon indicating copy to clipboard operation
forest copied to clipboard

RPC Gas Limit Estimation Under Estimating

Open ec2 opened this issue 5 years ago • 3 comments

** Acceptance Criteria **

  • [ ] Gas API should accurately estimate the gas without hardcoding extra gas

Describe the bug

  • Gas estimation is done when sending a transaction
  • Gas estimation simulates the call into the VM and uses that as a gas limit
  • Originally, ran into this when spamming our node with send calls (just hardcoded a workaround at the time)
  • The Gas API's gas limit estimation keeps under reporting. Right now, we just add some extra gas to the gas limit, but this is a temporary fix for the sake of unblocking us in other areas. There is a TODO to fix this and should be looked into https://github.com/ChainSafe/forest/blob/main/node/rpc/src/gas_api.rs#L253

ec2 avatar Dec 21 '20 20:12 ec2

most likely because it's missing the gas fee cap calculation

austinabell avatar Jan 18 '21 14:01 austinabell

Not sure if this is still relevant since we haven't been running local devnets

amerameen avatar Mar 04 '21 15:03 amerameen

Relevant code: https://github.com/ChainSafe/forest/blob/e27085d0c5808062a91cdb4a9f685ff714ade050/node/rpc/src/gas_api.rs#L235

We should investigate if this still happens. Moving to the FVM might have fixed the underlying problem.

lemmih avatar Jul 21 '22 09:07 lemmih

It should be fixed by #4187.

lemmih avatar Apr 12 '24 15:04 lemmih