| Commit hash | ca816ca876dc78ab32abd96f4c525e2fde6eb47c |
|---|---|
| Commit time | 2025-10-28 |
| Committer | GitHub <noreply at github.com> |
| Author time | 2025-10-28 |
| Author | CPerezz <37264926+CPerezz at users.noreply.github.com> |
Add EIP: Contract Bytecode Deduplication Discount (#10585) * Add draft EIP: Contract Bytecode Deduplication Discount 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. * Address PR review comments and switch to implicit deduplication Major changes: 1. Remove checkCodeHash flag - make deduplication implicit via access lists 2. Add co-authors Wei-Han and Guillaume Ballet 3. Fix grammar: behaviour -> behavior, formalise -> formalize 4. Update snap-sync description for technical accuracy 5. Clarify edge cases for same-block deployments 6. Move Same-Block Deployments section from Rationale to Specification 7. Add rationale explaining why implicit design avoids chain splits Reviewer feedback addressed: - @weiihann: Remove explicit checkCodeHash flag, use implicit checking - @gballet: Chain split concerns resolved by implicit design - @gballet: Grammar and technical accuracy fixes - @weiihann: Simplify empty code handling - @weiihann: Clarify same-block deployment edge cases The implicit design provides several advantages: - No protocol changes to access list structure - Avoids chain split risks from unknown transaction fields - Simpler implementation - any address in access list contributes - Automatic optimization without explicit opt-in flags * Address additional review comments from Guillaume - 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 <gballet@gmail.com> * Fix section structure: move Example Transaction under Reference Implementation * Address review: change 'explicit' to 'implicit' and remove redundant sections * Fix markdown linting: add blank lines before lists * Address review: fix author name and change explicit to implicit --------- Co-authored-by: Guillaume Ballet <gballet@gmail.com>
| Document | Title |
|---|---|
| EIP-8058 | Contract Bytecode Deduplication Discount |