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

EIP-4490, reducing gas cost prior to the Merge #4490

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f6cf9eb
Adding Hierachical Wallet For Layer-2 EIP
louisguthmannStarkWare May 14, 2020
72bd24d
Update Hierarchical Deterministic Wallet for CIP Layer-2.md
louisguthmannStarkWare May 14, 2020
64dd869
Update and rename Hierarchical Deterministic Wallet for CIP Layer-2.m…
louisguthmannStarkWare May 14, 2020
9dd0843
Update EIP-2645 - Hierarchical Deterministic Wallet for CIP Layer-2.md
louisguthmannStarkWare May 17, 2020
98298b4
Update EIPS/EIP-2645 - Hierarchical Deterministic Wallet for CIP Laye…
louisguthmannStarkWare May 17, 2020
e73684f
Rename EIP-2645 - Hierarchical Deterministic Wallet for CIP Layer-2.m…
louisguthmannStarkWare May 17, 2020
469ad8c
Update EIPS/eip-2645.md
louisguthmannStarkWare May 19, 2020
c82d54b
Update eip-2645.md
louisguthmannStarkWare May 19, 2020
e1dda79
Update eip-2645.md
louisguthmannStarkWare May 20, 2020
0899c8a
Update eip-2645.md
louisguthmannStarkWare Jun 3, 2020
7ebc279
Update EIPS/eip-2645.md
louisguthmannStarkWare Jun 3, 2020
0938fa9
Update EIPS/eip-2645.md
louisguthmannStarkWare Jun 3, 2020
d695b95
Update EIPS/eip-2645.md
louisguthmannStarkWare Jun 3, 2020
b4d5904
Update eip-2645.md
louisguthmannStarkWare Jun 4, 2020
a5b319e
Update eip-2645.md
louisguthmannStarkWare Jun 23, 2020
dc579c0
Update eip-2645.md
louisguthmannStarkWare Jun 25, 2020
9d7133f
Update eip-2645.md
louisguthmannStarkWare Jun 30, 2020
8fc1d94
Update eip-2645.md
louisguthmannStarkWare Jun 30, 2020
4ce5efd
Update eip-2645.md
louisguthmannStarkWare Nov 4, 2020
88554c9
Update eip-2645.md
louisguthmannStarkWare Nov 4, 2020
50de707
Update EIPS/eip-2645.md
louisguthmannStarkWare Dec 2, 2020
f5b2879
Update eip-2645.md
louisguthmannStarkWare Dec 2, 2020
ca9d167
Update eip-2645.md
louisguthmannStarkWare Dec 2, 2020
81042be
new EIP for calldata
louisguthmannStarkWare Nov 24, 2021
597a371
Update and rename eip-4445.md to eip-4490.md
louisguthmannStarkWare Nov 24, 2021
85b1193
Update eip-4490.md
louisguthmannStarkWare Nov 24, 2021
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
6 changes: 6 additions & 0 deletions EIPS/eip-2645.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
eip: 2645
title: Hierarchical Deterministic Wallet for Layer-2
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these changes.

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
Expand Down
53 changes: 53 additions & 0 deletions EIPS/eip-4490.md
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]>
Copy link
Member

Choose a reason for hiding this comment

The 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
Copy link
Member

Choose a reason for hiding this comment

The 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been superseded by the description: preamble.

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/).