diff --git a/gas.md b/gas.md index c8c43cfeb..5879a21bd 100644 --- a/gas.md +++ b/gas.md @@ -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 @@ -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