Skip to content

Commit 77704bc

Browse files
committed
cleanup
1 parent e65c6f1 commit 77704bc

File tree

1 file changed

+2
-4
lines changed
  • src/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie

1 file changed

+2
-4
lines changed

src/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,9 @@ From a block header there are 3 roots from 3 of these tries.
199199

200200
There is one global state trie, and it is updated every time a client processes a block. In it, a `path` is always: `keccak256(ethereumAddress)` and a `value` is always: `rlp(ethereumAccount)`. More specifically an ethereum `account` is a 4 item array of `[nonce,balance,storageRoot,codeHash]`. At this point, it's worth noting that this `storageRoot` is the root of another patricia trie:
201201

202-
203-
204202
### Storage Trie {#storage-trie}
205203

206-
Storage trie is where _all_ contract data lives. There is a separate storage trie for each account. To retrieve values at specific storage positions at a given address the storage address, the integer position of the stored data in the storage, and the block ID are required. These can then be passed as arguments to the `eth_getStorageAt` defined in the JSON-RPC API, e.g. to retrieve the data in storage slot 0 for address `0x295a70b2de5e3953354a6a8344e616ed314d7251`:
204+
Storage trie is where _all_ contract data lives. There is a separate storage trie for each account. To retrieve values at specific storage positions at a given address the storage address, integer position of the stored data in the storage, and the block ID are required. These can then be passed as arguments to the `eth_getStorageAt` defined in the JSON-RPC API, e.g. to retrieve the data in storage slot 0 for address `0x295a70b2de5e3953354a6a8344e616ed314d7251`:
207205

208206
```
209207
curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}' localhost:8545
@@ -235,7 +233,7 @@ curl -X POST --data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": [
235233
{"jsonrpc":"2.0","id":1,"result":"0x000000000000000000000000000000000000000000000000000000000000162e"}
236234
```
237235

238-
Note: The `storageRoot` for an Ethereum account is empty by default if it's not a contract account.
236+
Note: The `storageRoot` for an Ethereum account is empty by default if it's not a contract account.
239237

240238
### Transactions Trie {#transaction-trie}
241239

0 commit comments

Comments
 (0)