This EIP introduces a new Simple Serialize (SSZ) type to make List[T, N] with large capacities N more efficient in cases where the list is much shorter than the capacity.
1 Like
- Added
ProgressiveBitlist - Tree now grows to left instead of right
- Fixed incorrect
Bitvectornotion in graphic: Unused chunks are padded with 0 chunks instead of default(T) chunks. - Simplified Merkleization code
Started an implementation tracker: https://pureth.guide/implementations-ssz/
Received EIP-7916 feedback where some people slightly prefer changing to the Merkle tree layout in the right picture (while others slightly prefer staying on the left).
Arguments for left:
- Easier implementation, as standard left-to-right DFS iteration visits deeper branches first. O(1) memory instead of O(log(N)), or simpler algo. Also easier formulas for handling gindices.
Arguments for right:
- Later list indices are assigned a gindex further right in the tree than earlier list indices. Maybe makes incremental building (e.g., deposit contract snapshot style) a bit easier.
Same for both:
- Hash count is the same. Proof size is the same.
Personally fine with either, but will lock it down by end of week so that implementation effort doesn’t get derailed.
Draft for Merkleizing to right:
- Update EIP-7916: Merkleize to right by etan-status · Pull Request #11032 · ethereum/EIPs · GitHub
- Merkleize progressive shape to right by etan-status · Pull Request #16 · ethereum/remerkleable · GitHub
- Merkleize progressive SSZ shape to right by etan-status · Pull Request #4813 · ethereum/consensus-specs · GitHub
