duneanalytics / duneanalytics/evm.codes

Incorrect gas calculations for `CALL*` gas stipend

Open
#362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
827
Forks
199
Avg merge
15m
Merged PRs (30d)
1

Description

The gas calculator on the site for CALL* family opcodes is not correct; it subtracts the "gas stipend" cost from the total externally-observable cost of making the call. This means that the results of gas calculations for CALL* opcodes are 2300 lower than they should be (confirmed by testing against evmone).

I believe the fix should just be to delete this line from the call gas calculator; the stipend amount is only relevant when constructing the message to be sent to the callee account, not to the external gas calculations for the whole call.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in util/gas.ts at the call gas calculator around line 195. Compare the site's CALL* gas results with evmone, then verify that the externally observable call cost no longer includes the 2300 gas stipend and that the calculator reports the corrected values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.