-
Notifications
You must be signed in to change notification settings - Fork 515
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
[WIP; depends on #232] Metropolis: EIP211 Returndata instructions #264
Conversation
@@ -851,7 +851,8 @@ \subsection{Execution Overview} | |||
\boldsymbol{\mu}_{pc} & \equiv & 0 \\ | |||
\boldsymbol{\mu}_\mathbf{m} & \equiv & (0, 0, ...) \\ | |||
\boldsymbol{\mu}_i & \equiv & 0 \\ | |||
\boldsymbol{\mu}_\mathbf{s} & \equiv & () | |||
\boldsymbol{\mu}_\mathbf{s} & \equiv & () \\ | |||
\boldsymbol{\mu}_\mathbf{o} & \equiv & () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarification, here is the initialization of μₒ.
@@ -1965,6 +1976,7 @@ \subsection{Instruction Set} | |||
&&&& $(\boldsymbol{\sigma}', g', A^+, \mathbf{o}) \equiv \begin{cases}\begin{array}{l}\Theta(\boldsymbol{\sigma}, I_a, I_o, t, t,\\ \quad C_{\text{\tiny CALLGAS}}(\boldsymbol{\mu}), I_p, \boldsymbol{\mu}_\mathbf{s}[2], \boldsymbol{\mu}_\mathbf{s}[2], \mathbf{i}, I_e + 1)\end{array} & \begin{array}{l}\text{if} \quad \boldsymbol{\mu}_\mathbf{s}[2] \leqslant \boldsymbol{\sigma}[I_a]_b \;\wedge \\ \quad\quad I_e < 1024\end{array}\\ (\boldsymbol{\sigma}, g, \varnothing, ()) & \text{otherwise} \end{cases}$ \\ | |||
&&&& $n \equiv \min(\{ \boldsymbol{\mu}_\mathbf{s}[6], |\mathbf{o}|\})$ \\ | |||
&&&& $\boldsymbol{\mu}'_\mathbf{m}[ \boldsymbol{\mu}_\mathbf{s}[5] \dots (\boldsymbol{\mu}_\mathbf{s}[5] + n - 1) ] = \mathbf{o}[0 \dots (n - 1)]$ \\ | |||
&&&& $\boldsymbol{\mu}'_\mathbf{o} = \mathbf{o}$ \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and here is the update of μₒ.
This change is according to ethereum/EIPs#211 (comment)
@@ -1958,13 +1969,15 @@ \subsection{Instruction Set} | |||
&&&& low to fulfil the value transfer); and otherwise $x=A(I_a, \boldsymbol{\sigma}[I_a]_n)$, the address of the newly \\ | |||
&&&& created account, otherwise. \\ | |||
&&&& $\boldsymbol{\mu}'_i \equiv M(\boldsymbol{\mu}_i, \boldsymbol{\mu}_\mathbf{s}[1], \boldsymbol{\mu}_\mathbf{s}[2])$ \\ | |||
&&&& $\boldsymbol{\mu}'_\mathbf{o} \equiv ()$ \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the execution ends in REVERT
, the output data might be non-empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The returning data of CREATE can be added after EIP140: REVERT #232 .
even when the accessed length is zero.
This target should be |
As part of the Metropolis changes, this PR adds RETURNDATACOPY and RETURNDATASIZE instructions.
Fixes #233