Skip to content

Commit

Permalink
update SSZ static doc to reflect options in test conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Aug 2, 2019
1 parent 12900b2 commit 63e2915
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions specs/test_formats/ssz_static/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ The same value as `serialized.ssz`, represented as YAML.
## Condition

A test-runner can implement the following assertions:
- Serialization: After parsing the `value`, SSZ-serialize it: the output should match `serialized`
- If YAML decoding of SSZ objects is supported by the implementation:
- Serialization: After parsing the `value`, SSZ-serialize it: the output should match `serialized`
- Deserialization: SSZ-deserialize the `serialized` value, and see if it matches the parsed `value`
- If YAML decoding of SSZ objects is not supported by the implementation:
- Serialization in 2 steps: deserialize `serialized`, then serialize the result,
and verify if the bytes match the original `serialized`.
- Hash-tree-root: After parsing the `value` (or deserializing `serialized`), Hash-tree-root it: the output should match `root`
- Optionally also check `signing_root`, if present.
- Deserialization: SSZ-deserialize the `serialized` value, and see if it matches the parsed `value`


## References
Expand Down

0 comments on commit 63e2915

Please sign in to comment.