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

Add a reentrancy protection to EIP 1283 #1701

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion EIPS/eip-1283.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Definitions of terms are as below:
Replace SSTORE opcode gas cost calculation (including refunds) with
the following logic:

* If *gasleft* is less then or equal 2300, fail the current call frame
forshtat marked this conversation as resolved.
Show resolved Hide resolved
with 'out of gas' exception.
* If *current value* equals *new value* (this is a no-op), 200 gas is
deducted.
* If *current value* does not equal *new value*
Expand Down Expand Up @@ -123,7 +125,10 @@ already issued the refund but it no longer applies (*current value* is
issue the refund but it applies now (*new value* is 0), then adds this
refund to the refund counter. It is not possible where a refund is not
issued but we remove the refund in the above case, because all storage
slot starts with **Fresh** state.
slot starts with **Fresh** state. In order to keep in place the implicit
reentrancy protection of existing contracts, transactions should not be
allowed to modify state if the remaining gas is lower then the 2300
stipend given to 'transfer'/'send' in Solidity.

### State Transition

Expand Down