Skip to content

Commit 042ca57

Browse files
authored
Merge pull request #2458 from ethereum/ralexstokes-patch-1
Clarify language on ssz Unions
2 parents 482b028 + fa09d89 commit 042ca57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssz/simple-serialize.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Deserialization can be implemented using a recursive algorithm. The deserializat
196196
* The size of each object in the vector/list can be inferred from the difference of two offsets. To get the size of the last object, the total number of bytes has to be known (it is not generally possible to deserialize an SSZ object of unknown length)
197197
* Containers follow the same principles as vectors, with the difference that there may be fixed-size objects in a container as well. This means the `fixed_parts` data will contain offsets as well as fixed-size objects.
198198
* In the case of bitlists, the length in bits cannot be uniquely inferred from the number of bytes in the object. Because of this, they have a bit at the end that is always set. This bit has to be used to infer the size of the bitlist in bits.
199-
* The first byte of the deserialization scope is deserialized as type selector, the remainder of the scope is deserialized as the selected type.
199+
* In the case of unions, the first byte of the deserialization scope is deserialized as type selector, the remainder of the scope is deserialized as the selected type.
200200

201201
Note that deserialization requires hardening against invalid inputs. A non-exhaustive list:
202202

0 commit comments

Comments
 (0)