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

docs: Add storage change status analysis #418

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
docs: Name the storage change statuses
  • Loading branch information
chfast committed Aug 11, 2022
commit 8c8608cd9cb63987a781e8cdee633daf237200c8
13 changes: 11 additions & 2 deletions docs/storage_change_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<th>original</th>
<th>current</th>
<th>new</th>
<th>name</th>
<th>dirty?</th>
<th>cost</th>
<th>refund</th>
Expand All @@ -37,6 +38,7 @@
<td>...</td>
<td>0</td>
<td>0</td>
<td rowspan="2">UNCHANGED</td>
<td rowspan="2">N/A</td>
<td rowspan="2">200 = SLOAD</td>
<td rowspan="2">0</td>
Expand All @@ -50,6 +52,7 @@
<td>0</td>
<td>0</td>
<td>X</td>
<td>SET / ADDED</td>
<td>no</td>
<td>20000 = SET</td>
<td>0</td>
Expand All @@ -58,6 +61,7 @@
<td>X</td>
<td>X</td>
<td>Y</td>
<td>RESET / MODIFIED</td>
<td>no</td>
<td>5000 = RESET</td>
<td>0</td>
Expand All @@ -66,6 +70,7 @@
<td>X</td>
<td>X</td>
<td>0</td>
<td>CLEARED / DELETED</td>
<td>no</td>
<td>5000 = RESET</td>
<td>15000 = CLEARS</td>
Expand All @@ -74,6 +79,7 @@
<td>0</td>
<td>X</td>
<td>0</td>
<td>DIRTY_SET_TO_CLEARED</td>
<td>yes</td>
<td>200 = SLOAD</td>
<td>19800 = SET - SLOAD</td>
Expand All @@ -82,6 +88,7 @@
<td>X</td>
<td>0</td>
<td>X</td>
<td rowspan="2">DIRTY_CLEARED_TO_SET</td>
<td rowspan="2">yes</td>
<td rowspan="2">200 = SLOAD</td>
<td rowspan="2">-15000 = -CLEARS</td>
Expand All @@ -95,6 +102,7 @@
<td>0</td>
<td>X</td>
<td>Y</td>
<td rowspan="2">DIRTY_RESET_AGAIN</td>
<td rowspan="2">yes</td>
<td rowspan="2">200 = SLOAD</td>
<td rowspan="2">0</td>
Expand All @@ -108,6 +116,7 @@
<td>X</td>
<td>Y</td>
<td>0</td>
<td>DIRTY_RESET_TO_CLEARED</td>
<td>yes</td>
<td>200 = SLOAD</td>
<td>15000 = CLEARS</td>
Expand All @@ -116,13 +125,13 @@
<td>X</td>
<td>Y</td>
<td>X</td>
<td>DIRTY_RESET_REVERTED</td>
<td>yes</td>
<td>200 = SLOAD</td>
<td>4800 = RESET - SLOAD</td>
</tr>
</tbody>
</table>


[EIP-1283]: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1283.md
[EIP-2200]: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2200.md
[EIP-2200]: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2200.md