Skip to content

Commit

Permalink
Update EIP-7495: Add Variant[S] to abstract
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
etan-status authored May 2, 2024
1 parent 9e08acd commit 3b5b911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion EIPS/eip-7495.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 3b5b911

Please sign in to comment.