-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specification for the gas fee of System operations #889
Comments
First: The above formula is specified in the case where the instruction where 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: