Skip to content

Commit

Permalink
EXTCODESIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Nov 29, 2017
1 parent 1b34eb5 commit 017cd72
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gas.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,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 @@ -872,10 +879,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

0 comments on commit 017cd72

Please sign in to comment.