Skip to content

Commit

Permalink
feat(test): add tests for eth_getRequiredBlockState
Browse files Browse the repository at this point in the history
  • Loading branch information
perama-v committed Aug 8, 2023
1 parent bb9b5c8 commit 72869ce
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions specs/required_block_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The `RequiredBlockState` consists of account state values as Merkle proofs, cont
and recent block hashes.

### Notation
Code snippets appearing in `this style` are to be interpreted as Python 3 psuedocode. The
Code snippets appearing in `this style` are to be interpreted as Python 3 pseudocode. The
style of the document is intended to be readable by those familiar with the
Ethereum consensus [https://github.com/ethereum/consensus-specs](https://github.com/ethereum/consensus-specs)
and Simple Serialize (SSZ) ([https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md](https://github.com/ethereum/consensus-specs/blob/dev/ssz/simple-serialize.md))
Expand Down Expand Up @@ -190,7 +190,7 @@ Contract = List[uint8, MAX_BYTES_PER_CONTRACT]

An alias for a node in a merkle patricia proof.

Merkle Patricia Trie (MPT) proofs consist of a list of witness nodes that correspond to each trie node that consists of various data elements depending on the type of node (e.g. blank, branch, extension, leaf). When serialized, each witness node is represented as an RLP serialized list of the component elements.
Merkle Patricia Trie proofs consist of a list of witness nodes that correspond to each trie node that consists of various data elements depending on the type of node (e.g. blank, branch, extension, leaf). When serialized, each witness node is represented as an RLP serialized list of the component elements.

```python
TrieNode = List[uint8, MAX_BYTES_PER_NODE]
Expand Down Expand Up @@ -293,7 +293,7 @@ of stack in the subsequent step).
### `verify_required_block_state`

Check block hashes are canonical such as a node or against an accumulator of canonical
block hashes. Check merkle proofs in the requied block state.
block hashes. Check merkle proofs in the required block state.

### `trace_block_locally`

Expand Down
5 changes: 0 additions & 5 deletions src/eth/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
required: true
schema:
$ref: '#/components/schemas/BlockNumberOrTag'
- name: Hydrated transactions
required: true
schema:
title: hydrated
type: boolean
result:
name: Required block state
description: The RequiredBlockState (SSZ- and snappy-encoded) which contains block prestate and proof data.
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
>> {"jsonrpc":"2.0","id":1,"method":"eth_getRequiredBlockState","params":["0x5f5e100"]}
<< {"jsonrpc":"2.0","id":1,"result":null}
3 changes: 3 additions & 0 deletions wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ bodiesbyhashv
bytecode
configurationv
crypto
dev
eip
endian
enum
eth
ethereum
EVM
interop
json
mempool
Expand All @@ -33,6 +35,7 @@ uint
updatedv
url
validator
verkle
wei
yaml
yParity
Expand Down

0 comments on commit 72869ce

Please sign in to comment.