Skip to content

Commit

Permalink
minor typos (#4801)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZumZoom authored Feb 14, 2022
1 parent 04afc7d commit 5550f98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EIPS/eip-3978.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ updated: 2022-02-14

## Abstract

Revering whole transaction or some sub-call of it means ignoring any state modifications happened inside. But now users are being charged for such non-modifications as for modifications.
Reverting whole transaction or some sub-call of it means ignoring any state modifications happened inside. But now users are being charged for such non-modifications as for modifications.

Since [EIP-3298](./eip-3298.md) gas refund mechanism works for storage restores only inside the same transaction. But on reverts gas refund is not being increased, it will even be completely erased - this should be changed.

Expand All @@ -29,13 +29,13 @@ Moreover it seems fair to charge CREATE and CREATE2 operations 32,000 fix price

## Motivation

Blockhain users pay for storage non-modification as for storage modification - this seems unfair. Sometimes it's even cheaper to transfer tokens back to the user at the end of the transaction instead of vererting it too keep existing gas refund.
Blockhain users pay for storage non-modification as for storage modification - this seems unfair. Sometimes it's even cheaper to transfer tokens back to the user at the end of the transaction instead of reverting it too keep existing gas refund.

## Specification

Let's accumulate `call.sstores_sloads_diff_counter += (SSTORE_price - SLOAD_price)` on every `SSTORE` for every call. And let's accumulate `current_call.log_gas_counter += newEvent.gas`

```
```javascript
if (call.reverted) {
// existing behavior
tx.gas_refund -= call.gas_refund_counter;
Expand Down

0 comments on commit 5550f98

Please sign in to comment.