eth2.0-specs/tests/formats/finality/README.md

42 lines
1.1 KiB
Markdown
Raw Normal View History

2020-07-23 20:15:48 +00:00
# Finality tests
The aim of the tests for the finality rules.
- `finality`: transitions triggered by one or more blocks.
2020-07-23 20:15:48 +00:00
## Test case format
### `meta.yaml`
```yaml
description: string -- Optional. Description of test case, purely for debugging purposes.
bls_setting: int -- see general test-format spec.
blocks_count: int -- the number of blocks processed in this test.
```
2020-10-08 19:02:18 +00:00
### `pre.ssz_snappy`
2020-07-23 20:15:48 +00:00
2020-10-08 19:02:18 +00:00
A SSZ-snappy encoded `BeaconState`, the state before running the block transitions.
2020-07-23 20:15:48 +00:00
2020-10-08 19:02:18 +00:00
Also available as `pre.ssz_snappy`.
2020-07-23 20:15:48 +00:00
### `blocks_<index>.yaml`
A series of files, with `<index>` in range `[0, blocks_count)`. Blocks need to be processed in order,
following the main transition function (i.e. process slot and epoch transitions in between blocks as normal)
Each file is a YAML-encoded `SignedBeaconBlock`.
2020-10-08 19:02:18 +00:00
Each block is also available as `blocks_<index>.ssz_snappy`
2020-07-23 20:15:48 +00:00
2020-10-08 19:02:18 +00:00
### `post.ssz_snappy`
2020-07-23 20:15:48 +00:00
2020-10-08 19:02:18 +00:00
A SSZ-snappy encoded `BeaconState`, the state after applying the block transitions.
2020-07-23 20:15:48 +00:00
## Condition
The resulting state should match the expected `post` state, or if the `post` state is left blank,
the handler should reject the series of blocks as invalid.