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-1186: fix typo #8986

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion EIPS/eip-1186.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
eip: 1186
title: RPC-Method to get Merkle Proofs - eth_getProof
author: Simon Jentzsch <simon.jentzsch@slock.it>, Christoph Jentzsch <christoph.jentzsch@slock.it>

Check warning on line 4 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

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

warning[preamble-author]: preamble header `author` must contain at least one GitHub username --> EIPS/eip-1186.md | 4 | author: Simon Jentzsch <simon.jentzsch@slock.it>, Christoph Jentzsch <christoph.jentzsch@slock.it> | = help: see https://ethereum.github.io/eipw/preamble-author/

Check warning on line 4 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

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

warning[preamble-author]: preamble header `author` must contain at least one GitHub username --> EIPS/eip-1186.md | 4 | author: Simon Jentzsch <simon.jentzsch@slock.it>, Christoph Jentzsch <christoph.jentzsch@slock.it> | = help: see https://ethereum.github.io/eipw/preamble-author/
discussions-to: https://github.com/ethereum/EIPs/issues/1186
status: Stagnant
type: Standards Track
Expand All @@ -9,22 +9,22 @@
created: 2018-06-24
requires: 1474
---

Check warning on line 12 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

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

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

Check warning on line 12 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

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

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

Check warning on line 13 in EIPS/eip-1186.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-1186.md | 13 | ## Simple Summary | = help: see https://ethereum.github.io/eipw/markdown-order-section/

Check warning on line 13 in EIPS/eip-1186.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-1186.md | 13 | ## Simple Summary | = help: see https://ethereum.github.io/eipw/markdown-order-section/

One of the great features of Ethereum is the fact, that you can verify all data of the state. But in order to allow verification of accounts outside the client, we need an additional function delivering us the required proof. These proofs are important to secure Layer2-Technologies.

## Abstract

Ethereum uses a [Merkle Tree](https://github.com/ethereum/wiki/wiki/Patricia-Tree) to store the state of accounts and their storage. This allows verification of each value by simply creating a Merkle Proof. But currently, the standard RPC-Interface does not give you access to these proofs. This EIP suggests an additional RPC-Method, which creates Merkle Proofs for Accounts and Storage Values.

Check warning on line 19 in EIPS/eip-1186.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-1186.md | 19 | Ethereum uses a [Merkle Tree](https://github.com/ethereum/wiki/wiki/Patricia-Tree) to store the state of accounts and their storage.... | = help: see https://ethereum.github.io/eipw/markdown-rel-links/

Check warning on line 19 in EIPS/eip-1186.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-1186.md | 19 | Ethereum uses a [Merkle Tree](https://github.com/ethereum/wiki/wiki/Patricia-Tree) to store the state of accounts and their storage.... | = help: see https://ethereum.github.io/eipw/markdown-rel-links/

Combined with a stateRoot (from the blockheader) it enables offline verification of any account or storage-value. This allows especially IOT-Devices or even mobile apps which are not able to run a light client to verify responses from an untrusted source only given a trusted blockhash.

## Motivation

In order to create a MerkleProof access to the full state db is required. The current RPC-Methods allow an application to access single values (`eth_getBalance`,`eth_getTransactionCount`,`eth_getStorageAt`,`eth_getCode`), but it is impossible to read the data needed for a MerkleProof through the standard RPC-Interface. (There are implementations using leveldb and accessing the data via filesystems, but this can not be used for production systems since it requires the client to be stopped first - See https://github.com/zmitton/eth-proof)

Check warning on line 25 in EIPS/eip-1186.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-1186.md | 25 | In order to create a MerkleProof access to the full state db is required. The current RPC-Methods allow an application to access sin... |

Check warning on line 25 in EIPS/eip-1186.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-1186.md | 25 | In order to create a MerkleProof access to the full state db is required. The current RPC-Methods allow an application to access sin... |

Today MerkleProofs are already used internally. For example, the [Light Client Protocol](https://github.com/zsfelfoldi/go-ethereum/wiki/Light-Ethereum-Subprotocol-%28LES%29#on-demand-data-retrieval) supports a function creating MerkleProof, which is used in order to verify the requested account or storage-data.

Check warning on line 27 in EIPS/eip-1186.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-1186.md | 27 | Today MerkleProofs are already used internally. For example, the [Light Client Protocol](https://github.com/zsfelfoldi/go-ethereum/w... |

Check warning on line 27 in EIPS/eip-1186.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-1186.md | 27 | Today MerkleProofs are already used internally. For example, the [Light Client Protocol](https://github.com/zsfelfoldi/go-ethereum/w... |

Offering these already existing function through the RPC-Interface as well would enable Applications to store and send these proofs to devices which are not directly connected to the p2p-network and still are able to verify the data. This could be used to verify data in mobile applications or IOT-devices, which are currently only using a remote client.

Expand All @@ -33,26 +33,26 @@

As Part of the eth-Module, an additional Method called `eth_getProof` should be defined as follows:

#### eth_getProof

Check failure on line 36 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

EIPS/eip-1186.md:36 MD001/heading-increment/header-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

Check failure on line 36 in EIPS/eip-1186.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

EIPS/eip-1186.md:36 MD001/heading-increment/header-increment Heading levels should only increment by one level at a time [Expected: h3; Actual: h4]

Returns the account- and storage-values of the specified account including the Merkle-proof.

##### Parameters

1. `DATA`, 20 Bytes - address of the account.
2. `ARRAY`, 32 Bytes - array of storage-keys which should be proofed and included. See [`eth_getStorageAt`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getstorageat)

Check warning on line 43 in EIPS/eip-1186.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-1186.md | 43 | 2. `ARRAY`, 32 Bytes - array of storage-keys which should be proofed and included. See [`eth_getStorageAt`](https://github.com/ether... |

Check warning on line 43 in EIPS/eip-1186.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-1186.md | 43 | 2. `ARRAY`, 32 Bytes - array of storage-keys which should be proofed and included. See [`eth_getStorageAt`](https://github.com/ether... |
3. `QUANTITY|TAG` - integer block number, or the string `"latest"` or `"earliest"`, see the [default block parameter](https://github.com/ethereum/wiki/wiki/JSON-RPC#the-default-block-parameter)

Check warning on line 44 in EIPS/eip-1186.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-1186.md | 44 | 3. `QUANTITY|TAG` - integer block number, or the string `"latest"` or `"earliest"`, see the [default block parameter](https://github... |

Check warning on line 44 in EIPS/eip-1186.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-1186.md | 44 | 3. `QUANTITY|TAG` - integer block number, or the string `"latest"` or `"earliest"`, see the [default block parameter](https://github... |

##### Returns

`Object` - A account object:

- `balance`: `QUANTITY` - the balance of the account. See [`eth_getBalance`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getbalance)

Check warning on line 50 in EIPS/eip-1186.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-1186.md | 50 | - `balance`: `QUANTITY` - the balance of the account. See [`eth_getBalance`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_ge... |

Check warning on line 50 in EIPS/eip-1186.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-1186.md | 50 | - `balance`: `QUANTITY` - the balance of the account. See [`eth_getBalance`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_ge... |
- `codeHash`: `DATA`, 32 Bytes - hash of the code of the account. For a simple Account without code it will return `"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"`
- `nonce`: `QUANTITY`, - nonce of the account. See [`eth_getTransactionCount`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount)

Check warning on line 52 in EIPS/eip-1186.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-1186.md | 52 | - `nonce`: `QUANTITY`, - nonce of the account. See [`eth_getTransactionCount`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_... |

Check warning on line 52 in EIPS/eip-1186.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-1186.md | 52 | - `nonce`: `QUANTITY`, - nonce of the account. See [`eth_getTransactionCount`](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_... |
- `storageHash`: `DATA`, 32 Bytes - SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.
- `accountProof`: `ARRAY` - Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
- `storageProof`: `ARRAY` - Array of storage-entries as requested. Each entry is a object with these properties:
- `storageProof`: `ARRAY` - Array of storage-entries as requested. Each entry is an object with these properties:

- `key`: `QUANTITY` - the requested storage key
- `value`: `QUANTITY` - the storage value
Expand Down Expand Up @@ -134,5 +134,5 @@

TODO: Tests still need to be implemented, but the core function creating the proof already exists inside the clients and are well tested.

## Copyright

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