Merge branch 'bls-setting' into v06x-to-dev
This commit is contained in:
commit
401dba3230
|
@ -186,6 +186,18 @@ To prevent parsing of hundreds of different YAML files to test a specific test t
|
||||||
... <--- more test types
|
... <--- more test types
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Common test-case properties
|
||||||
|
|
||||||
|
Some test-case formats share some common key-value pair patterns, and these are documented here:
|
||||||
|
|
||||||
|
```
|
||||||
|
bls_setting: int -- optional, can have 3 different values:
|
||||||
|
0: (default, applies if key-value pair is absent). Free to choose either BLS ON or OFF.
|
||||||
|
Tests are generated with valid BLS data in this case,
|
||||||
|
but there is no change of outcome when running the test if BLS is ON or OFF.
|
||||||
|
1: known as "BLS required" - if the test validity is strictly dependent on BLS being ON
|
||||||
|
2: known as "BLS ignored" - if the test validity is strictly dependent on BLS being OFF
|
||||||
|
```
|
||||||
|
|
||||||
## Note for implementers
|
## Note for implementers
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ Hence, the format is shared between each test-handler. (See test condition docum
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
description: string -- description of test case, purely for debugging purposes
|
description: string -- description of test case, purely for debugging purposes
|
||||||
bls_required: bool -- optional, true if the test validity is strictly dependent on BLS being ON. False otherwise.
|
bls_setting: int -- see general test-format spec.
|
||||||
bls_ignored: bool -- optional, true if the test validity is strictly dependent on BLS being OFF. False otherwise.
|
|
||||||
pre: BeaconState -- state before running the sub-transition
|
pre: BeaconState -- state before running the sub-transition
|
||||||
post: BeaconState -- state after applying the epoch sub-transition.
|
post: BeaconState -- state after applying the epoch sub-transition.
|
||||||
```
|
```
|
||||||
|
|
|
@ -6,8 +6,7 @@ The different kinds of operations ("transactions") are tested individually with
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
description: string -- description of test case, purely for debugging purposes
|
description: string -- description of test case, purely for debugging purposes
|
||||||
bls_required: bool -- optional, true if the test validity is strictly dependent on BLS being ON. False otherwise.
|
bls_setting: int -- see general test-format spec.
|
||||||
bls_ignored: bool -- optional, true if the test validity is strictly dependent on BLS being OFF. False otherwise.
|
|
||||||
pre: BeaconState -- state before applying the operation
|
pre: BeaconState -- state before applying the operation
|
||||||
<operation-name>: <operation-object> -- the YAML encoded operation, e.g. a "ProposerSlashing", or "Deposit".
|
<operation-name>: <operation-object> -- the YAML encoded operation, e.g. a "ProposerSlashing", or "Deposit".
|
||||||
post: BeaconState -- state after applying the operation. No value if operation processing is aborted.
|
post: BeaconState -- state after applying the operation. No value if operation processing is aborted.
|
||||||
|
|
|
@ -6,8 +6,7 @@ Sanity tests to cover a series of one or more blocks being processed, aiming to
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
description: string -- description of test case, purely for debugging purposes
|
description: string -- description of test case, purely for debugging purposes
|
||||||
bls_required: bool -- optional, true if the test validity is strictly dependent on BLS being ON. False otherwise.
|
bls_setting: int -- see general test-format spec.
|
||||||
bls_ignored: bool -- optional, true if the test validity is strictly dependent on BLS being OFF. False otherwise.
|
|
||||||
pre: BeaconState -- state before running through the transitions triggered by the blocks.
|
pre: BeaconState -- state before running through the transitions triggered by the blocks.
|
||||||
blocks: [BeaconBlock] -- blocks to process, in given order, following the main transition function (i.e. process slot and epoch transitions in between blocks as normal)
|
blocks: [BeaconBlock] -- blocks to process, in given order, following the main transition function (i.e. process slot and epoch transitions in between blocks as normal)
|
||||||
post: BeaconState -- state after applying all the transitions triggered by the blocks.
|
post: BeaconState -- state after applying all the transitions triggered by the blocks.
|
||||||
|
|
|
@ -6,8 +6,7 @@ Sanity tests to cover a series of one or more empty-slot transitions being proce
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
description: string -- description of test case, purely for debugging purposes
|
description: string -- description of test case, purely for debugging purposes
|
||||||
bls_required: bool -- optional, true if the test validity is strictly dependent on BLS being ON. False otherwise.
|
bls_setting: int -- see general test-format spec.
|
||||||
bls_ignored: bool -- optional, true if the test validity is strictly dependent on BLS being OFF. False otherwise.
|
|
||||||
pre: BeaconState -- state before running through the transitions.
|
pre: BeaconState -- state before running through the transitions.
|
||||||
slots: N -- amount of slots to process, N being a positive numer.
|
slots: N -- amount of slots to process, N being a positive numer.
|
||||||
post: BeaconState -- state after applying all the transitions.
|
post: BeaconState -- state after applying all the transitions.
|
||||||
|
|
|
@ -39,7 +39,7 @@ def expect_assertion_error(fn):
|
||||||
|
|
||||||
|
|
||||||
# Tags a test to be ignoring BLS for it to pass.
|
# Tags a test to be ignoring BLS for it to pass.
|
||||||
bls_ignored = with_tags({'bls_ignored': True})
|
bls_ignored = with_tags({'bls_setting': 2})
|
||||||
|
|
||||||
|
|
||||||
def never_bls(fn):
|
def never_bls(fn):
|
||||||
|
@ -54,7 +54,7 @@ def never_bls(fn):
|
||||||
|
|
||||||
|
|
||||||
# Tags a test to be requiring BLS for it to pass.
|
# Tags a test to be requiring BLS for it to pass.
|
||||||
bls_required = with_tags({'bls_required': True})
|
bls_required = with_tags({'bls_setting': 1})
|
||||||
|
|
||||||
|
|
||||||
def always_bls(fn):
|
def always_bls(fn):
|
||||||
|
|
Loading…
Reference in New Issue