From 3b5b911af8e6adbb65a021d2f366c3d23a87e7c6 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 2 May 2024 07:31:19 +0200 Subject: [PATCH] Update EIP-7495: Add `Variant[S]` to abstract Merged by EIP-Bot. --- EIPS/eip-7495.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EIPS/eip-7495.md b/EIPS/eip-7495.md index 69b192f7e6831..38343dec00b39 100644 --- a/EIPS/eip-7495.md +++ b/EIPS/eip-7495.md @@ -2,7 +2,7 @@ eip: 7495 title: SSZ StableContainer description: New SSZ type to represent a flexible container with stable serialization and merkleization -author: Etan Kissling (@etan-status) +author: Etan Kissling (@etan-status), Cayman (@wemeetagain) discussions-to: https://ethereum-magicians.org/t/eip-7495-ssz-stablecontainer/15476 status: Review type: Standards Track @@ -16,6 +16,8 @@ This EIP introduces a new [Simple Serialize (SSZ) type](https://github.com/ether A `StableContainer[N]` is an SSZ `Container` with stable serialization and merkleization even when individual fields become optional or new fields are introduced in the future. +Furthermore, to continue supporting versioned containers, e.g., fork-specific consensus data structures, `Variant[S]` is introduced, selecting only a subset of fields of the underlying `StableContainer` `S`. `Variant[S]` shares the merkleization of `S`, but has a more compact serialization and provides better type safety. + ## Motivation Stable containers are currently not representable in SSZ. Adding support provides these benefits: