You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the execution model, the remaining gas after executing an operation is defined as:
And then in appendix H we have:
and in the definition for CALL opcode, we have
However, there is also definition for the cost below:
Therefore, is it that ${\mu'}_g = {\mu}_g - C_{CALLGAS}({\sigma},{\mu}, A) + g' = {\mu}_g - C({\sigma},{\mu}, A,I)= {\mu}_g - C_{mem}({\mu_{i}'}) + C_{mem}({\mu_{i}}) - C_{CALL}({\sigma},{\mu}, A)$
I really doubt it is the case, can anyone help explain this?
For me, the more intuitive equation should be: ${\mu'}_g = {\mu}_g - C_{mem}({\mu_{i}'}) + C_{mem}({\mu_{i}}) - C_{CALL}({\sigma},{\mu}, A) + g' = {\mu}_g - C({\sigma},{\mu}, A,I) + g'$
and $C_{CALL}({\sigma, \mu, A }) = C_{CALLGAS}({\sigma, \mu, A }) + C_{EXTRA}({\sigma, \mu, A })$
Therefore, it seems that for the case of system operation (e.g. CALL), we should add g' to ${\mu'_g}$ (to take back the gas remaining after the execution of that operation)
The text was updated successfully, but these errors were encountered:
$\boldsymbol{\mu}'_g \equiv \boldsymbol{\mu}_g - C(\boldsymbol{\sigma}, \boldsymbol{\mu}, A, I)$
$C(\boldsymbol{\sigma}, \boldsymbol{\mu}, A, I)$ in this formula represents a general description for cases involving gas costs, depending on the world-state $\boldsymbol{\sigma}$, machine-state $\boldsymbol{\mu}$, the accrued substate $A$, and the instruction $I$.
$C(\boldsymbol{\sigma},\boldsymbol{\mu},A,I) \equiv C_{mem}(\boldsymbol{\mu}_ i')-C_{mem}(\boldsymbol{\mu}_ i)+C_{\text{CALL}}(\boldsymbol{\sigma},\boldsymbol{\mu},A)$ if $w \in W_{call}$
The above formula is specified in the case where the instruction $I$ belongs to the set of CALL instructions, again:
$C_{\text{CALL}}(\boldsymbol{\sigma}, \boldsymbol{\mu}, A) \equiv C_{\text{CALLGAS}}(\boldsymbol{\sigma},\boldsymbol{\mu}, A) - g'$
where $g'$ is the amount of gas refunded after the execution of the CALL instruction.
Thus, there is no contradiction in the yellow paper here.
In the execution model, the remaining gas after executing an operation is defined as:
${\mu'}_g = {\mu}_g - C_{CALLGAS}({\sigma},{\mu}, A) + g' = {\mu}_g - C({\sigma},{\mu}, A,I)= {\mu}_g - C_{mem}({\mu_{i}'}) + C_{mem}({\mu_{i}}) - C_{CALL}({\sigma},{\mu}, A)$
${\mu'}_g = {\mu}_g - C_{mem}({\mu_{i}'}) + C_{mem}({\mu_{i}}) - C_{CALL}({\sigma},{\mu}, A) + g' = {\mu}_g - C({\sigma},{\mu}, A,I) + g'$
$C_{CALL}({\sigma, \mu, A }) = C_{CALLGAS}({\sigma, \mu, A }) + C_{EXTRA}({\sigma, \mu, A })$ ${\mu'_g}$ (to take back the gas remaining after the execution of that operation)
And then in appendix H we have:
and in the definition for CALL opcode, we have
However, there is also definition for the cost below:
Therefore, is it that
I really doubt it is the case, can anyone help explain this?
For me, the more intuitive equation should be:
and
Therefore, it seems that for the case of system operation (e.g. CALL), we should add g' to
The text was updated successfully, but these errors were encountered: