From 5550f9823414956db785a74aa4e5249cca7293da Mon Sep 17 00:00:00 2001 From: Mikhail Melnik Date: Mon, 14 Feb 2022 15:35:25 +0300 Subject: [PATCH] minor typos (#4801) --- EIPS/eip-3978.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-3978.md b/EIPS/eip-3978.md index f8dcda735c..4c447bf157 100644 --- a/EIPS/eip-3978.md +++ b/EIPS/eip-3978.md @@ -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. @@ -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;