Skip to content

Conversation

@CPerezz
Copy link
Contributor

@CPerezz CPerezz commented Oct 22, 2025

This proposal introduces a gas discount for contract deployments when the bytecode being deployed already exists in the state. The mechanism extends EIP-2930 access lists with an optional checkCodeHash flag to enable deterministic deduplication checks without breaking consensus.

Key features:

  • Access-list based deduplication via checkCodeHash flag
  • Avoids GAS_CODE_DEPOSIT * L costs for duplicate deployments
  • Solves database divergence issues across different sync modes
  • Becomes particularly relevant with EIP-8037's increased gas costs

This EIP is extracted from the original EIP-8037 proposal to allow independent review and adoption.

This EIP doesn't modify any interaction between users and the chain if not used. Meaning, users will get discounts if they use the EIP. They'll pay the same exact price as they do now if they don't use this EIP.

@CPerezz CPerezz requested a review from eth-bot as a code owner October 22, 2025 15:54
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Oct 22, 2025
@eth-bot
Copy link
Collaborator

eth-bot commented Oct 22, 2025

🛑 Auto merge failed. Please see logs for more details, and report this issue at the eip-review-bot repository.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Oct 22, 2025
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Oct 22, 2025
@CPerezz CPerezz force-pushed the add/bytecode_deduplication_discount branch from 978dbdd to a44319b Compare October 22, 2025 16:45
This proposal introduces a gas discount for contract deployments when the
bytecode being deployed already exists in the state. The mechanism extends
EIP-2930 access lists with an optional checkCodeHash flag to enable
deterministic deduplication checks without breaking consensus.

Key features:
- Access-list based deduplication via checkCodeHash flag
- Avoids GAS_CODE_DEPOSIT * L costs for duplicate deployments
- Solves database divergence issues across different sync modes
- Becomes particularly relevant with EIP-8037's increased gas costs

This EIP is extracted from the original EIP-8037 proposal to allow
independent review and adoption.
@CPerezz CPerezz force-pushed the add/bytecode_deduplication_discount branch from a44319b to 6b6923e Compare October 22, 2025 16:47
lightclient
lightclient previously approved these changes Oct 22, 2025
Copy link
Member

@lightclient lightclient left a comment

Choose a reason for hiding this comment

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

Please update filename, otherwise LGTM

@eth-bot eth-bot enabled auto-merge (squash) October 22, 2025 18:44
Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

Copy link
Collaborator

@eth-bot eth-bot left a comment

Choose a reason for hiding this comment

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

All Reviewers Have Approved; Performing Automatic Merge...

auto-merge was automatically disabled October 23, 2025 10:50

Head branch was pushed to by a user without write access

@CPerezz CPerezz dismissed stale reviews from eth-bot and lightclient via 36d6507 October 23, 2025 10:50
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Oct 23, 2025
Any address included in the access list automatically contributes to deduplication. This provides automatic gas optimization without requiring explicit flags or special handling.

5. Avoids chain split risks:
Since no new transaction structure is introduced, pre-fork and post-fork nodes handle the same transactions identically (just with different gas accounting post-fork). This eliminates the risk of chain splits from nodes rejecting transactions with unknown fields.
Copy link
Member

Choose a reason for hiding this comment

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

this is no longer true I think, the pre-fork part.

CPerezz and others added 2 commits October 23, 2025 14:00
- Simplify deduplication logic to more concise form
- Remove pre-fork/post-fork language from chain split rationale
- Clarify that only gas accounting changes at fork activation

Co-authored-by: Guillaume Ballet <[email protected]>
@github-actions
Copy link

The commit f0e9b17 (as a parent of 1d5c3ec) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Oct 23, 2025
@CPerezz
Copy link
Contributor Author

CPerezz commented Oct 23, 2025

@lightclient seems auto-merge was disabled. Can you manually merge?

@lightclient lightclient enabled auto-merge (squash) October 28, 2025 13:50
@lightclient lightclient disabled auto-merge October 28, 2025 13:51
@lightclient lightclient merged commit ca816ca into ethereum:master Oct 28, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants