mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-24 04:38:29 +00:00
* intial draft of eip to reduce intrinsic gas cost of transactions * assign eip number * add discussion thread for 2780
64 lines
2.2 KiB
Markdown
64 lines
2.2 KiB
Markdown
---
|
|
eip: 2780
|
|
title: Reduce intrinsic transaction gas
|
|
author: Matt Garnett (@lightclient)>
|
|
discussions-to: https://ethereum-magicians.org/t/eip-2780-reduce-intrinsic-cost-of-transactions/4413
|
|
status: Draft
|
|
type: Standards Track
|
|
category: Core
|
|
created: 2020-07-11
|
|
---
|
|
|
|
## Abstract
|
|
Reduce the intrinsic cost of a transaction to `16,360` gas.
|
|
|
|
## Motivation
|
|
The current `21,000` gas intrinsic cost of a transaction does not accurately
|
|
represent the true cost of the transaction.
|
|
|
|
## Specification
|
|
After `block.number >= FORK_BLOCK`, enforce an intrinsic gas cost of `16,360`.
|
|
|
|
## Rationale
|
|
|
|
The EVM-equivalent of transaction validation would consist mostly of ~110 bytes
|
|
of data and 2 x `SLOAD (0x54)`, 2 x `SSTORE (0x55)`, and an `ECRECOVER`. This
|
|
translates to `(16 * 110) + 2 * 800 + 2 * 5,000 (assuming account is
|
|
initialized) + 3000 = 16,360`. This implies that the current intrinsic cost of
|
|
a transaction is overpriced by `4,640` gas. Since validation is implemented
|
|
natively, it's possible that this is a conservative estimate.
|
|
|
|
## Backwards Compatibility
|
|
TBD
|
|
|
|
## Test Cases
|
|
TBD
|
|
|
|
## Implementation
|
|
TBD
|
|
|
|
## Security Considerations
|
|
|
|
#### Increased transactions-per-block
|
|
Reducing the intrinsic gas of transaction will lead to an increase of
|
|
transactions per block. This has several consequences:
|
|
|
|
* Historically, periods of high transaction counts has correlated with
|
|
higher-than-average uncle blocks being mined. It must be determined that the
|
|
new intrinsic cost `16,360` will not adversely affect.
|
|
|
|
* The state size of Ethereum continues to grow at an unsustainable pace.
|
|
Increased the transaction throughput will exasperate this problem.
|
|
|
|
#### Storage may be accessed more than once
|
|
It is difficult to arrive at a fixed-cost for the intrinsic transaction fee,
|
|
because it's possible for clients to need to revalidate a transaction in its
|
|
mempool. This can be caused artificially by submitting a chain of transactions
|
|
and bumping the gas price of the first transaction by minimal step sizes. Since
|
|
the first transaction is now a "new" transaction, the transactions that follow
|
|
sequentially will need to ensure the account's balance can still afford to
|
|
transact.
|
|
|
|
## Copyright
|
|
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|