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

Update EIP-1052: fix eip-1052.md #9176

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion EIPS/eip-1052.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check failure on line 1 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble is missing header(s): `description`

error[preamble-req]: preamble is missing header(s): `description` --> EIPS/eip-1052.md | | = help: see https://ethereum.github.io/eipw/preamble-req/

Check failure on line 1 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble is missing header(s): `description`

error[preamble-req]: preamble is missing header(s): `description` --> EIPS/eip-1052.md | | = help: see https://ethereum.github.io/eipw/preamble-req/
eip: 1052
title: EXTCODEHASH opcode
author: Nick Johnson <[email protected]>, Paweł Bylica <[email protected]>

Check failure on line 4 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `author` must contain at least one GitHub username

error[preamble-author]: preamble header `author` must contain at least one GitHub username --> EIPS/eip-1052.md | 4 | author: Nick Johnson <[email protected]>, Paweł Bylica <[email protected]> | = help: see https://ethereum.github.io/eipw/preamble-author/

Check failure on line 4 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

preamble header `author` must contain at least one GitHub username

error[preamble-author]: preamble header `author` must contain at least one GitHub username --> EIPS/eip-1052.md | 4 | author: Nick Johnson <[email protected]>, Paweł Bylica <[email protected]> | = help: see https://ethereum.github.io/eipw/preamble-author/
Expand All @@ -9,11 +9,11 @@
created: 2018-05-02
requires: 161
---

Check failure on line 12 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body is missing section(s): `Security Considerations`

error[markdown-req-section]: body is missing section(s): `Security Considerations` --> EIPS/eip-1052.md | | = help: must be at the second level (`## Heading`) = help: see https://ethereum.github.io/eipw/markdown-req-section/

Check failure on line 12 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body is missing section(s): `Security Considerations`

error[markdown-req-section]: body is missing section(s): `Security Considerations` --> EIPS/eip-1052.md | | = help: must be at the second level (`## Heading`) = help: see https://ethereum.github.io/eipw/markdown-req-section/
## Abstract

Check failure on line 13 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:13 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Abstract"]

Check failure on line 13 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:13 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Abstract"]
This EIP specifies a new opcode, which returns the keccak256 hash of a contract's code.

## Motivation

Check failure on line 16 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:16 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Motivation"]

Check failure on line 16 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:16 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Motivation"]
Many contracts need to perform checks on a contract's bytecode, but do not necessarily need the bytecode itself. For instance, a contract may want to check if another contract's bytecode is one of a set of permitted implementations, or it may perform analyses on code and whitelist any contract with matching bytecode if the analysis passes.

Contracts can presently do this using the `EXTCODECOPY` (`0x3c`) opcode, but this is expensive, especially for large contracts, in cases where only the hash is required. As a result, we propose a new opcode, `EXTCODEHASH`, which returns the keccak256 hash of a contract's bytecode.
Expand Down Expand Up @@ -59,7 +59,7 @@
## Test Cases

1. The `EXTCODEHASH` of the account without code is `c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`
what is the keccack256 hash of empty data.
what is the keccak256 hash of empty data.
2. The `EXTCODEHASH` of non-existent account is `0`.
3. The `EXTCODEHASH` of a precompiled contract is either `c5d246...` or `0`.
4. If `EXTCODEHASH` of `A` is `X`, then `EXTCODEHASH` of `A + 2**160` is `X`.
Expand All @@ -71,8 +71,8 @@
10. The `EXTCODEHASH` of an empty account that is going to be cleared by the state clearing rule.


## Implementation

Check failure on line 74 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

error[markdown-order-section]: body has extra section(s) --> EIPS/eip-1052.md | 74 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/

Check failure on line 74 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:74 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Implementation"]

Check failure on line 74 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

body has extra section(s)

error[markdown-order-section]: body has extra section(s) --> EIPS/eip-1052.md | 74 | ## Implementation | = help: see https://ethereum.github.io/eipw/markdown-order-section/

Check failure on line 74 in EIPS/eip-1052.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

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

EIPS/eip-1052.md:74 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Implementation"]
TBD

## Copyright

Check failure on line 77 in EIPS/eip-1052.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-1052.md:77 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Copyright"]

Check failure on line 77 in EIPS/eip-1052.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-1052.md:77 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