-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
EIP-4490, reducing gas cost prior to the Merge #4490
Changes from all commits
f6cf9eb
72bd24d
64dd869
9dd0843
98298b4
e73684f
469ad8c
c82d54b
e1dda79
0899c8a
7ebc279
0938fa9
d695b95
b4d5904
a5b319e
dc579c0
9d7133f
8fc1d94
4ce5efd
88554c9
50de707
f5b2879
ca9d167
81042be
597a371
85b1193
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
--- | ||
eip: 2645 | ||
title: Hierarchical Deterministic Wallet for Layer-2 | ||
<<<<<<< HEAD | ||
author: Tom Brand ([email protected]), Louis Guthmann ([email protected]) | ||
discussions-to: https://ethereum-magicians.org/t/hierarchical-deterministic-wallet-for-computation-integrity-proof-cip-layer-2/4286 | ||
status: Draft | ||
======= | ||
author: Tom Brand <[email protected]>, Louis Guthmann <[email protected]> | ||
discussions-to: https://ethereum-magicians.org/t/hierarchical-deterministic-wallet-for-computation-integrity-proof-cip-layer-2/4286 | ||
status: Stagnant | ||
>>>>>>> upstream/master | ||
type: Standards Track | ||
category: ERC | ||
created: 2020-05-13 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
eip: 4490 | ||
title: Second transaction data gas cost reduction | ||
authors: Louis Guthmann <[email protected]>, Philippe Castonguay <[email protected]> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to use a GitHub username for at least one author. |
||
discussions-to: XXX | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mandatory field. |
||
status: Final | ||
type: Standards Track | ||
category: Core | ||
created: 2021-11-23 | ||
--- | ||
|
||
## Simple Summary | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has been superseded by the |
||
We propose to reduce the gas cost of Calldata (`GTXDATANONZERO`) from its current value of 16 gas per byte to 6 gas per byte. The mathematical model is the one used in the works of Sompolinsky and Zohar [1] and Pass, Seeman and Shelat [2], which relates network security to network delay. This model has already been used for EIP-2028. We shall (1) reuse the same model, and (2) base the proposed gas cost on our findings. | ||
|
||
## Motivation | ||
There are a couple of main benefits to accepting this proposal and lowering gas cost of Calldata | ||
On-Chain Scalability: Generally speaking, higher bandwidth of Calldata improves scalability, as more data can fit within a single block. | ||
* Layer two scalability: Layer two scaling solutions can improve scalability by moving storage and computation off-chain, but often introduce data transmission instead. | ||
- Proof systems such as STARKs and SNARKs use a single proof that attests to the computational integrity of a large computation, say, one that processes a large batch of transactions. | ||
- Some solutions use fraud proofs which requires a transmission of merkle proofs | ||
- Moreover, one major data availability solution to layer two is to place data on the main chain, via Calldata. | ||
|
||
## Specification | ||
The gas per non-zero byte is reduced from 16 to 6. Gas cost of zero bytes is unchanged. | ||
|
||
## Rationale | ||
Roughly speaking, reducing the gas cost of Calldata leads to potentially larger blocks, which increases the network delay associated with data transmission over the network. This is only part of the full network delay, other factors are block processing time (and storage access, as part of it). Increasing network delay affects security by lowering the cost of attacking the network, because at any given point in time fewer nodes are updated on the latest state of the blockchain. | ||
|
||
Yonatan Sompolinsky and Aviv Zohar suggested in [1] an elegant model to relate network delay to network security, and this model is also used in the work of Rafael Pass, Lior Seeman and Abhi Shelat [2]. We briefly explain this model below, because we shall study it theoretically and validate it by empirical measurements to reach the suggested lower gas cost for Calldata. This model has already be discussed as part of EIP-2028. As such, we suggest reusing the same analysis used for EIP-2028, which included measurement of blocksize related to uncle rate. | ||
|
||
The empirical data provided by Etherchain.org seems to show little to zero influence under the current load of calldata on the uncle rate, despite the block average size having quadruple in the space of 2 years. This lack of impact suggests that anything lower below an order of magnitude should remain safe for the network. The 6 gas value had already been discussed as part of the migration to Verkle Trees. | ||
|
||
Reducing from 16 to 6 gas would improve costs for Optimistic Rollups by 2.4x and improve ZkRollups onchain cost by the same factor. | ||
|
||
We suggested to move to the 6 value earlier under the assumption that both the extra load and the migration to Verkle Trees make the change manageable while providing extremely large value to the L2 ecosystem in the short term. | ||
|
||
## Test Cases | ||
Not relevant | ||
|
||
## Reference Implementation | ||
|
||
|
||
## References | ||
[1] Yonatan Sompolinsky, Aviv Zohar: [Secure High-Rate Transaction Processing in Bitcoin](https://eprint.iacr.org/2013/881.pdf). Financial Cryptography 2015: 507-527 | ||
|
||
[2] Rafael Pass, Lior Seeman, Abhi Shelat: [Analysis of the Blockchain Protocol in Asynchronous Networks](https://eprint.iacr.org/2016/454.pdf), ePrint report 2016/454 | ||
|
||
[3] Christian Decker, Roger Wattenhofer: [Information propagation in the Bitcoin network](https://www.gsd.inesc-id.pt/~ler/docencia/rcs1314/papers/P2P2013_041.pdf). P2P 2013: 1-10 | ||
|
||
[4] Vitalik Buterin: [Uncle Rate and Transaction Fee Analysis](https://blog.ethereum.org/2016/10/31/uncle-rate-transaction-fee-analysis/) | ||
|
||
## Copyright | ||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these changes.