Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

pirapira
Copy link
Member

As part of the Metropolis changes, this PR adds RETURNDATACOPY and RETURNDATASIZE instructions.

Fixes #233

@@ -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 & ()
Copy link
Member Author

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}$ \\
Copy link
Member Author

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 μₒ.

@pirapira pirapira changed the title EIP211 Returndata instructions Metropolis: EIP211 Returndata instructions Apr 28, 2017
@@ -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 ()$ \\
Copy link
Member Author

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.

Copy link
Member Author

@pirapira pirapira May 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pirapira pirapira changed the title Metropolis: EIP211 Returndata instructions [WIP] Metropolis: EIP211 Returndata instructions May 10, 2017
@pirapira pirapira changed the title [WIP] Metropolis: EIP211 Returndata instructions [WIP; depends on #232] Metropolis: EIP211 Returndata instructions May 10, 2017
@pirapira
Copy link
Member Author

This target should be master not metropolis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant