- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.9k
Add EIP: Contract Bytecode Deduplication Discount #10585
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
Add EIP: Contract Bytecode Deduplication Discount #10585
Conversation
| 🛑 Auto merge failed. Please see logs for more details, and report this issue at the  | 
978dbdd    to
    a44319b      
    Compare
  
    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.
a44319b    to
    6b6923e      
    Compare
  
    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 update filename, otherwise LGTM
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
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.
All Reviewers Have Approved; Performing Automatic Merge...
Head branch was pushed to by a user without write access
        
          
                EIPS/eip-draft.md
              
                Outdated
          
        
      | 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. | 
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.
this is no longer true I think, the pre-fork part.
- 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]>
| The commit f0e9b17 (as a parent of 1d5c3ec) contains errors. | 
| @lightclient seems auto-merge was disabled. Can you manually merge? | 
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:
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.