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] Spurious Dragon: Eip161 state cleaning #288

Closed
wants to merge 16 commits into from

Conversation

pirapira
Copy link
Member

This implements ethereum/EIPs#161 as part of the Spurious Dragon changes.

@pirapira pirapira force-pushed the eip161_state_clean branch 2 times, most recently from e501b3c to 120fd5d Compare April 12, 2017 09:57
Paper.tex Outdated
\wedge \boldsymbol{\sigma}[a]_n = 0
\wedge \boldsymbol{\sigma}[a]_b = 0
\end{equation}
Even callable precompiled contracts can have an empty account state. This is because their account states do not usually contain the code describing its behavior.
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to remove one of the double spaces.

Paper.tex Outdated

An account is \textit{dead} when its account state is non-existent or empty:
\begin{equation}
\mathtt{\tiny DEAD}(\boldsymbol{\sigma}, a)
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a spurious newline here.

Paper.tex Outdated
\boldsymbol{\sigma}^*[a] &\equiv& \big( 0, v + v', \mathtt{\tiny TRIE}(\varnothing), \mathtt{\tiny KEC}\big(()\big) \big) \\
\boldsymbol{\sigma}^*[s]_b &\equiv& \boldsymbol{\sigma}[s]_b - v
\boldsymbol{\sigma}^*[a] &\equiv& \big( 1, v + v', \mathtt{\tiny TRIE}(\varnothing), \mathtt{\tiny KEC}\big(()\big) \big) \\
\boldsymbol{\sigma}^*[s] &\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.

There is a spurious newline here.

Paper.tex Outdated
\boldsymbol{\sigma}^*[s] &\equiv&
\begin{cases}
\varnothing & \text{if}\ \boldsymbol{\sigma}[s] = \varnothing \ \wedge\ v = 0\\
\mathbf{a}^* & \text{otherwise}
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a spurious space here.

Paper.tex Outdated
I_a & \equiv & r \\
I_o & \equiv & o \\
I_p & \equiv & p \\
I_\mathbf{d} & \equiv & \mathbf{d} \\
I_s & \equiv & s \\
I_v & \equiv & \tilde{v} \\
I_e & \equiv & e \\
\mathbf{t} & \equiv & \{s, r\} \\
Copy link
Member Author

Choose a reason for hiding this comment

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

There are spurious spaces here.

Paper.tex Outdated
\Omega(B, \boldsymbol{\sigma}) & \equiv & \boldsymbol{\sigma}': \boldsymbol{\sigma}' = \boldsymbol{\sigma} \quad \text{except:} \\
\boldsymbol{\sigma}'[{B_H}_c]_b & = & \boldsymbol{\sigma}[{B_H}_c]_b + (1 + \frac{\lVert B_\mathbf{U}\rVert}{32})R_b \\
\forall_{U \in B_\mathbf{U}}: \\ \nonumber
\boldsymbol{\sigma}'[U_c]_b & = & \boldsymbol{\sigma}[U_c]_b + (1 + \frac{1}{8} (U_i - {B_H}_i)) R_b
\boldsymbol{\sigma}'[U_c] & = & \begin{cases}
\varnothing &\text{if}\ \boldsymbol{\sigma}[U_c] = \varnothing\ \wedge\ R = 0\\
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a spurious space here and on the next line.

Paper.tex Outdated
\varnothing &\text{if}\ \boldsymbol{\sigma}[U_c] = \varnothing\ \wedge\ R = 0\\
\mathbf{a}' &\text{otherwise}
\end{cases}\\
\mathbf{a}' &\equiv& (\boldsymbol{\sigma}[U_c]_n, \boldsymbol{\sigma}[U_c]_b + R,
Copy link
Member Author

Choose a reason for hiding this comment

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

Spurious newline and spaces.

Paper.tex Outdated
At block 2675119, in the transaction \texttt{0xcf416c536ec1a19ed1fb89e4ec7ffb3cf73aa413b3aa9b77d60e4fd81a4296ba},
an account at address 0x03 was called and an out-of-gas occurred during the call.
Against the equation (\ref{eq:pre}), this added 0x03 in the set of touched transactions, and
this transaction turned $\boldsymbol{\sigma}[0x03]$ into $\varnothing$.
Copy link
Member Author

Choose a reason for hiding this comment

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

The whole paragraph should occupy just one line.

Paper.tex Outdated

At block 2675119, in the transaction \texttt{0xcf416c536ec1a19ed1fb89e4ec7ffb3cf73aa413b3aa9b77d60e4fd81a4296ba},
an account at address 0x03 was called and an out-of-gas occurred during the call.
Against the equation (\ref{eq:pre}), this added 0x03 in the set of touched transactions, and
Copy link
Member Author

Choose a reason for hiding this comment

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

Not "touched transactions" but "touched addresses".

@pirapira pirapira force-pushed the eip161_state_clean branch from 120fd5d to 09aa9bf Compare April 28, 2017 13:39
@pirapira pirapira changed the title Eip161 state cleaning Spurious Dragon: Eip161 state cleaning Apr 28, 2017
@pirapira
Copy link
Member Author

The formulation here depends on ethereum/EIPs#716

@pirapira pirapira changed the title Spurious Dragon: Eip161 state cleaning [wip] Spurious Dragon: Eip161 state cleaning Sep 21, 2017
@pirapira
Copy link
Member Author

This one should target spurious-dragon branch.

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