mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-03 04:04:56 -05:00
Update simple-serialize.md
This commit is contained in:
@@ -32,7 +32,7 @@ This is a **work in progress** describing typing, serialization and Merkleizatio
|
||||
* `"bool"`: `True` or `False`
|
||||
* `"null"`: `None`
|
||||
|
||||
The type `"null"` is only legal as one of several type in a `union` type.
|
||||
The `"null"` type is only legal as a union sub-type.
|
||||
|
||||
### Composite types
|
||||
|
||||
@@ -108,7 +108,6 @@ serialized_type_index = value.type_index.to_bytes(BYTES_PER_LENGTH_PREFIX, "litt
|
||||
return serialized_type_index + serialized_bytes
|
||||
```
|
||||
|
||||
|
||||
## Deserialization
|
||||
|
||||
Because serialization is an injective function (i.e. two distinct objects of the same type will serialize to different values) any bytestring has at most one object it could deserialize to. Efficient algorithms for computing this object can be found in [the implementations](#implementations).
|
||||
|
||||
Reference in New Issue
Block a user