In the description of SSTORE the following code snippet it's displayed as the behavior for the computation of the base_dynamic_gas:
static_gas = 0
if value == current_value
if key is warm
base_dynamic_gas = 100
else
base_dynamic_gas = 100
else if current_value == original_value
if original_value == 0
base_dynamic_gas = 20000
else
base_dynamic_gas = 2900
else
base_dynamic_gas = 100
Specially in the first if-else condition, the assignment in else condition seems to be incorrect, given that it's given the same base as the if condition, assigning base_dynamic_gas = 100.
if value == current_value
if key is warm
base_dynamic_gas = 100
else
base_dynamic_gas = 100
If this it's correct, then there's no point on checking that it's warm, just assigning base_dynamic_gas = 100. I think that maybe this is a typo, and in the else condition, maybe should go base_dynamic_gas = 2100, as it's described later.
In the description of
SSTORE
the following code snippet it's displayed as the behavior for the computation of thebase_dynamic_gas
:Specially in the first if-else condition, the assignment in else condition seems to be incorrect, given that it's given the same base as the if condition, assigning
base_dynamic_gas = 100
.If this it's correct, then there's no point on checking that it's warm, just assigning
base_dynamic_gas = 100
. I think that maybe this is a typo, and in the else condition, maybe should gobase_dynamic_gas = 2100
, as it's described later.