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-2028: calldata gas cost reduction #2030

Merged
merged 11 commits into from
Sep 27, 2023
Merged

EIP-2028: calldata gas cost reduction #2030

merged 11 commits into from
Sep 27, 2023

Conversation

patogallaiovlabs
Copy link
Contributor

@patogallaiovlabs patogallaiovlabs commented May 3, 2023

Description

Implementation of the EIP-2028 proposal. The proposal is about reducing the gas cost of Calldata (GTXDATANONZERO = TX_NO_ZERO_DATA) from its current value of 68 gas per non-zero byte to 16. This translates to an increase of the block size (measured in bytes).

Motivation and Context

The EIP-2028 is a scalability proposal for the Ethereum network, thinking in the L2 as a way to scale the network. The commitments from L2 networks are placed in the L1 by a transaction with the collected data as a calldata. That is why we need to reanalyze and reduce the gas cost of the bytes of the calldata field.
Readers who know nothing about rollups can figure out that this proposal can reduce some operating costs for L2 rollups. It will be harder for them to infer the other impact - for any given RSK block gas limit, this reduction allows us to convey more L2 transaction data (e.g. token transfers), which improves the transaction processing capacity (throughput) of the rollup.

How Has This Been Tested?

It has not been tested.
One of the possible issues is the network delay of transmitting the block between peers, while the other is the block processing time.
Tested should be oriented in those two aspects.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [ X ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [ X ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Tests for the changes have been added (for bug fixes / features)
  • [ X ] Requires Activation Code (Hard Fork)
  • Other information:

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

85.7% 85.7% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@rmoreliovlabs rmoreliovlabs left a comment

Choose a reason for hiding this comment

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

Also some tests are failing due to a bad mock for config.getActivationConfig() I think you should keep the feature disabled and only activate it for the new tests you will add so you can assert the new calculated values.

@rmoreliovlabs rmoreliovlabs marked this pull request as ready for review June 15, 2023 04:59
@rmoreliovlabs rmoreliovlabs force-pushed the EIP-2028 branch 4 times, most recently from 990e215 to 2e39a88 Compare June 15, 2023 14:35
rskj-core/src/main/java/org/ethereum/core/Transaction.java Outdated Show resolved Hide resolved
rskj-core/src/main/java/org/ethereum/core/Transaction.java Outdated Show resolved Hide resolved
rskj-core/src/main/java/org/ethereum/core/Transaction.java Outdated Show resolved Hide resolved
rskj-core/src/main/java/org/ethereum/core/Transaction.java Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/devnet.conf Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/devnet.conf Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/main.conf Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/regtest.conf Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/regtest.conf Outdated Show resolved Hide resolved
rskj-core/src/main/resources/config/testnet.conf Outdated Show resolved Hide resolved
@rmoreliovlabs rmoreliovlabs force-pushed the EIP-2028 branch 2 times, most recently from 15efd57 to 9216fae Compare June 15, 2023 15:26
Copy link
Contributor

@Vovchyk Vovchyk left a comment

Choose a reason for hiding this comment

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

lgtm!

@rmoreliovlabs rmoreliovlabs force-pushed the EIP-2028 branch 2 times, most recently from 08348f8 to 63554e0 Compare June 15, 2023 22:41
asoto-iov
asoto-iov previously approved these changes Jun 28, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@Vovchyk Vovchyk changed the title Draft EIP-2028: calldata gas cost reduction EIP-2028: calldata gas cost reduction Aug 25, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@rmoreliovlabs rmoreliovlabs left a comment

Choose a reason for hiding this comment

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

LGTM

@Vovchyk Vovchyk merged commit b05236e into master Sep 27, 2023
5 checks passed
@Vovchyk Vovchyk deleted the EIP-2028 branch September 27, 2023 07:08
@aeidelman aeidelman added this to the Arrowhead 6.0.0 milestone Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants