An educational implementation of the Simple Serialize (SSZ) specification, focusing on the core principles used in the Ethereum Lean Consensus.
- Little-Endian Serialization: Byte-perfect encoding for basic types.
- Offset Management: Proper handling of variable-length lists within containers.
- Merkleization Engine:
- Pre-computed Zero-Hash Ladder for performance.
- Recursive
HashLayersfor calculating the Merkle Root. Mix-In-Lengthlogic for list integrity.
- Packing: Efficient 32-byte chunking of serialized data.
- Basic Types (uint32, uint64)
- Fixed-size Containers
- Variable-size Lists
- Merkle Tree reduction
- Root generation for nested structs