ethereum / ethereum/execution-specs

Test vector metadata consideration

Open
#1,938 8 comments 2 reactions 1 assignee Claimed by @marioevz View on GitHub
A-test-fixtures C-refactor C-tracker S-needs-discussion stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

In our test vectors right now we define `blocks` objects with both actual block body fields and some "metadata" / extra fields:

- block body fields: `{"blockHeader", "transactions", "uncleHashes", "withdrawals"}`
- extra fields: `{"rlp", "blockNumber"}`

For Amsterdam, we had `blockAccessList` as part of the block body, but recent changes to the spec have removed it from the block body. It is still useful to reference when debugging errors against clients, otherwise we would only have the BAL hash in the block header, which doesn't give us a whole lot of information. Also this `blockNumber` seems to be redundant since it exists in the `blockHeader`.

---

This issue is meant as a tracker to try to reconcile how these vectors are organized into an agreeable format. I would propose that we move the extra fields into some `_metadata` field (underscored so that it is clearly not a part of the block body) and to remove the `blockNumber` field entirely- the net change being:

- Move `rlp` and `blockAccessList` into a new `blocks[i]["_metadata"]` field
- Remove `blockNumber` entirely since it exists at `blocks[i]["blockHeader"]["number"]`

I believe that moving `rlp`, specifically, into `_metadata` may break something on the client side due to expectations of where this lives, so this may require some coordination with clients or sanity checking via hive, etc.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.