2019-05-23 23:03:21 +00:00
|
|
|
# Sanity slots testing
|
|
|
|
|
|
|
|
Sanity tests to cover a series of one or more empty-slot transitions being processed, aiming to cover common changes.
|
|
|
|
|
|
|
|
## Test case format
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
description: string -- description of test case, purely for debugging purposes
|
2019-05-28 13:35:00 +00:00
|
|
|
bls_setting: int -- see general test-format spec.
|
2019-05-23 23:03:21 +00:00
|
|
|
pre: BeaconState -- state before running through the transitions.
|
2019-06-17 21:19:17 +00:00
|
|
|
slots: N -- amount of slots to process, N being a positive number.
|
2019-05-23 23:03:21 +00:00
|
|
|
post: BeaconState -- state after applying all the transitions.
|
|
|
|
```
|
|
|
|
|
2019-06-30 13:03:50 +00:00
|
|
|
The transition with pure time, no blocks, is known as `process_slots(state, slot)` in the spec.
|
2019-05-23 23:03:21 +00:00
|
|
|
This runs state-caching (pure slot transition) and epoch processing (every E slots).
|
|
|
|
|
2019-06-30 13:03:50 +00:00
|
|
|
To process the data, call `process_slots(pre, pre.slot + N)`.
|
2019-05-23 23:03:21 +00:00
|
|
|
|
|
|
|
## Condition
|
|
|
|
|
|
|
|
The resulting state should match the expected `post` state.
|