Skip to content
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions EIPS/eip-2677.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble is missing header(s): `description`

warning[preamble-req]: preamble is missing header(s): `description` --> EIPS/eip-2677.md | | = help: see https://ethereum.github.io/eipw/preamble-req/
eip: 2677
title: Limit size of `initcode`
author: Martin Holst Swende (@holiman), Paweł Bylica (@chfast), Alex Beregszaszi (@axic)
Expand All @@ -10,7 +10,7 @@
withdrawal-reason: Replaced by EIP-3860.
---

## Simple Summary

Check warning on line 13 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

warning[markdown-order-section]: body has extra section(s) --> EIPS/eip-2677.md | 13 | ## Simple Summary | ::: EIPS/eip-2677.md | 72 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/

Enforce a maximum size limit (`max_initcode_size`) of `49152` (`0xc000`) for `initcode`.

Expand All @@ -29,12 +29,12 @@

When a client executes `initcode`, the client has to perform a jumpdest analysis. In some cases, the client also performs a `hash` of the code:

* To use as a key in a mapping containing result of a jumpdest analysis
* To use as a key in a mapping containing the result of a jumpdest analysis

Check failure on line 32 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Unordered list style [Expected: dash; Actual: asterisk]

EIPS/eip-2677.md:32:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]
* To use for address calculation within `CREATE2`.

Check failure on line 33 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Unordered list style [Expected: dash; Actual: asterisk]

EIPS/eip-2677.md:33:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]

The work performed during a jumpdest analysis scales linearly with the size of the code. Currently, a transaction can expand the memory once, and reuse the same memory segment (with minor modifications) to force the client to perform a lot of analysis/hashing, leading to slow block processing.

Historically, this was exploited in June 2017, precipitating the 1.6.5-patch release of [geth](https://github.com/ethereum/go-ethereum/releases/tag/v1.6.5)

Check warning on line 37 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

non-relative link or image

warning[markdown-rel-links]: non-relative link or image --> EIPS/eip-2677.md | 37 | Historically, this was exploited in June 2017, precipitating the 1.6.5-patch release of [geth](https://github.com/ethereum/go-ethere... | = help: see https://ethereum.github.io/eipw/markdown-rel-links/

The work performed during address calculation within `CREATE2` is charged in proportion with size of the code.

Expand All @@ -42,9 +42,9 @@

There are three situations where this is applicable:

* `CREATE`,

Check failure on line 45 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Unordered list style [Expected: dash; Actual: asterisk]

EIPS/eip-2677.md:45:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]
* `CREATE2`,

Check failure on line 46 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Unordered list style [Expected: dash; Actual: asterisk]

EIPS/eip-2677.md:46:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]
* creation using a transaction with empty receiver.

Check failure on line 47 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Unordered list style [Expected: dash; Actual: asterisk]

EIPS/eip-2677.md:47:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]

In all these (and future) cases, the EVM should fail with Out Of Gas error if the code has a length more than `max_initcode_size`.

Expand All @@ -54,9 +54,9 @@

## Backwards Compatibility

This EIP requires a "network upgrade", since it modifies consenus-rules.
This EIP requires a "network upgrade", since it modifies consensus-rules.

## Security Considerations

Check warning on line 59 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

section `Security Considerations` is out of order

warning[markdown-order-section]: section `Security Considerations` is out of order --> EIPS/eip-2677.md | 59 | ## Security Considerations | = help: `Security Considerations` should come after `Test Cases`

For client implementations, this EIP makes attacks based on jumpdest-analysis or hashing of code less problematic, so should increase the robustness of clients.

Expand All @@ -73,5 +73,5 @@

TBA

## Copyright

Check failure on line 76 in EIPS/eip-2677.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Copyright"]

EIPS/eip-2677.md:76 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Copyright"]
Copyright and related rights waived via [CC0](../LICENSE.md).
Loading