diff --git a/specs/test_formats/ssz_static/core.md b/specs/test_formats/ssz_static/core.md index a7301a3c8..d0cfd25f6 100644 --- a/specs/test_formats/ssz_static/core.md +++ b/specs/test_formats/ssz_static/core.md @@ -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