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

DO NOT REVIEW - EXTCODESIZE #7

Open
wants to merge 1 commit into
base: gas.mload-mstore
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions gas.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,16 @@ of the logged registers.

* `BALANCE`
```hs
computationCost(BALANCE) = balanceCost
computationCost(existing-account, BALANCE) = balanceCost
computationCost(non-existing-account, BALANCE) = newAccountCost + balanceCost
estimatedResultSize(BALANCE) = balanceSize
```
* `EXTCODESIZE`
```hs
computationCost(existing-account, EXTCODESIZE) = extCodeSizeCost
computationCost(non-existing-account, EXTCODESIZE) = newAccountCost + extCodeSizeCost
estimatedResultSize(EXTCODESIZE) = extCodeSizeSize
```
* `SLOAD` In order to load the data from the storage, we first need to inspect
the metadata to make sure we have enough gas to load it. Hence, we will
compute some `preComputationCost`, after which we assume to have access to
Expand Down Expand Up @@ -877,10 +884,10 @@ Definitions
* Check that all background costs are accounted for (e.g. updating a register's)
metadata after an assignment.
* Check that memory deltas are used properly everywhere (e.g. MLOAD).
* Bill each use of #newAccount as using account storage space.

### TODOS: Instructions to add

* EXTCODESIZE
* CREATE
* SELFDESTRUCT
* COPYCREATE
Expand Down