From 9998f5f51fae415ec3096520c261fb83aae418c3 Mon Sep 17 00:00:00 2001 From: Virgil Serbanuta Date: Wed, 29 Nov 2017 10:46:13 +0200 Subject: [PATCH] EXTCODESIZE --- gas.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gas.md b/gas.md index fe8e2d6a9..26526b5e4 100644 --- a/gas.md +++ b/gas.md @@ -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 @@ -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