Skip to content

Commit

Permalink
SSZ and Merkleization wiki pages and wordlist conflicts (#261)
Browse files Browse the repository at this point in the history
* SSZ wiki page - first commit

* SSZ process for basic types is added

* Explained the integer serialization a bit more

* added python commands for SSZ of basic types

* added python commands for SSZ of basic types

* added python commands for deserialization of SSZ of basic types

* Vectors SS is added

* Lists SSZ is added

* Added mermaid flow diagrams for Lists SSZ

* fixed a typo in the mermaid diagram

* fixed a typo in the mermaid diagram

* Bitvector SSZ section is added

* Bitlist SSZ section is added

* Container SSZ section and tools section are added

* SSZ VS RLP Serialization section is added

* New Merkleization wiki page is added

* Process of Merkleization section is added

* benefits of merkleization section is added

* SSZ tools reordered, merkleization structure and multiproofs sections

* LaTex typo fixed

* packing and chunking section is added

* Mixing in the Length section is added

* Summaries and Expansions section is added

* A full example using code of merkleization for basic types

* merkleization of IndexedAttestation section is added

* typos fixed

* resolve conflicts - sidebar and wordlist

* Update _sidebar.md

* Updated for the suggestions after the review by Mario.

* Fixed the sugestions from Angaz

* wordlist conflicts resolved

* Fixed the sidebar links, removed /docs/

* wordlist conflicts and duplicates fixed

---------

Co-authored-by: Mário Havel <[email protected]>
  • Loading branch information
thogiti and taxmeifyoucan authored May 8, 2024
1 parent b9e25ef commit 16913e4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
9 changes: 6 additions & 3 deletions docs/wiki/CL/SSZ.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## Overview

Simple Serialize (SSZ) is a serialization and [Merkleization](/docs/wiki/CL/merkleization.md) scheme designed specifically for Ethereum's Beacon Chain. SSZ replaces the [RLP serialization](/docs/wiki/EL/RLP.md) used on the execution layer (EL) everywhere across the consensus layer (CL) except the [peer discovery protocol](https://github.com/ethereum/devp2p). Its development and adoption are aimed at enhancing the efficiency, security, and scalability of Ethereum's CL.

This document is about SSZ Serialization. You can learn more about SSZ merkleization at the [merkleization wiki page](/docs/wiki/CL/merkleization.md).
Simple Serialize (SSZ) is a serialization and [Merkleization](/wiki/CL/merkleization.md) scheme designed specifically for Ethereum's Beacon Chain. SSZ replaces the [RLP serialization](/wiki/EL/RLP.md) used on the execution layer (EL) everywhere across the consensus layer (CL) except the [peer discovery protocol](https://github.com/ethereum/devp2p). Its development and adoption are aimed at enhancing the efficiency, security, and scalability of Ethereum's CL.

This document is about SSZ Serialization. You can learn more about SSZ merkleization at the [merkleization wiki page](/wiki/CL/merkleization.md).


## SSZ Tools
Expand All @@ -13,7 +14,7 @@ There are many tools available for SSZ. Here is a [full list](https://github.com

- [py-ssz](https://github.com/ethereum/py-ssz)
- [dafny](https://github.com/ConsenSys/eth2.0-dafny)
- [Eth2.py](https://github.com/protolambda/remerkleable)
- [remerkleable](https://github.com/protolambda/remerkleable)
- [fastssz](https://github.com/ferranbt/fastssz/)
- [rust-ssz](https://github.com/ralexstokes/ssz-rs)

Expand Down Expand Up @@ -44,6 +45,8 @@ _Table: SSZ VS RLP Comparison by [Piper Merriam](https://twitter.com/pipermerria

**Deterministic Serialization**:
- **SSZ**: Provides deterministic serialization results, ensuring that the same data structure serializes to the exact same byte sequence every time, which is crucial for consensus reliability.
- **RLP**: RLP also provides deterministic serialization results.


For these reasons, there is a strong effort in Ethereum to completely migrate to SSZ serialization for everything and stop the usage of RLP serialization.

Expand Down
4 changes: 3 additions & 1 deletion docs/wiki/CL/merkleization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Merkleization and Hash Tree Roots

In Ethereum consensus mechanism, it's critical for all participating nodes to agree on the state of the system consistently and efficiently. The [Simple Serialize (SSZ)](/docs/wiki/CL/SSZ.md) framework facilitates this through Merkleization, a process that transforms serialized data into a Merkle tree structure. The goal of the Merkleization scheme is to ensure that constrained environments (light clients, execution environments, etc.) can have access to light-weight proofs which they can use to make important decisions. This wiki page discusses the intricacies of Merkleization and its importance in ensuring a shared state across nodes in a scalable and secure manner.

In Ethereum consensus mechanism, it's critical for all participating nodes to agree on the state of the system consistently and efficiently. The [Simple Serialize (SSZ)](/wiki/CL/SSZ.md) framework facilitates this through Merkleization, a process that transforms serialized data into a Merkle tree structure. The goal of the Merkleization scheme is to ensure that constrained environments (light clients, execution environments, etc.) can have access to light-weight proofs which they can use to make important decisions. This wiki page discusses the intricacies of Merkleization and its importance in ensuring a shared state across nodes in a scalable and secure manner.


## Terminology and Methods

Expand Down
4 changes: 2 additions & 2 deletions docs/wiki/research/eODS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

Principal–Agent problem of liquid staking, in which the interests of the Agent are not aligned with the interests of the Principal, is part of any capital delegation, and even more so present in today's staking ecosystem[^1].

Since the early days of Beacon Chain, market structures enabling to provide liquidty for staking pools without running an actual validator software have emerged in Ethereum.
Since the early days of Beacon Chain, market structures enabling to provide liquidity for staking pools without running an actual validator software have emerged in Ethereum.
Thus, staking has split naturally in two classes of participants, outside protocol level[^2]:

| Tier | Current natural separation | Slashing risk |
Expand Down Expand Up @@ -198,7 +198,7 @@ In order to improve delegate selection powers[^17], we can:

* improve voting tools within pools

Under the current paradigm, voting within staking pools is limited to governance token-holders (not ETH holders). There are attempts of Optimistic governance, where ETH holders can veto LSP governance votes, but (paraphrasing Vitalik) token voting is not strong enough, and ultimately any form of unincentivised delegate selection is just a type of token voting.
Under the current paradigm, voting within staking pools is limited to governance token-holders (not ETH holders). There are attempts of Optimistic governance, where ETH holders can veto LSP governance votes, but (paraphrasing Vitalik) token voting is not strong enough, and ultimately any form of unincentivized delegate selection is just a type of token voting.

* improve competition between pools

Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/research/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Upgrades relating to the switch from proof-of-work to proof-of-stake. The Merge
**IMPLEMENTED**
| Upgrade | Description | Effect | State of the art |
|:------------------------------------ |:---------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------- |
| Launch the Beacon Chain | A crucial step in Ethereum's shift to a proof-of-stake consensus mechanism | Beacon Chain was launched as an independent network connected to Ethereum, bootstraping validators in preparation for the Merge. | shipped </br> EIP-2982<span markdown='1'>[^1]</span> |
| Launch the Beacon Chain | A crucial step in Ethereum's shift to a proof-of-stake consensus mechanism | Beacon Chain was launched as an independent network connected to Ethereum, bootstrapping validators in preparation for the Merge. | shipped </br> EIP-2982<span markdown='1'>[^1]</span> |
| Merge Execution and Consensus Layers | Ethereum's execution layer merged with the Beacon chain (consensus layer) | Proof-of-work activities ceased and the network's consensus mechanism shifted to proof-of-stake. Validators have the role and responsibility for processing the validity of all transactions and proposing blocks | shipped |
| Enable Withdrawals | The last of the three-part process of Ethereum's transition to a proof-of-stake consensus mechanism | Validators can add their withdrawal credentials and Beacon Chain sweeps all inactive ETH | shipped </br>EIP-4895[^2] |

Expand Down
17 changes: 6 additions & 11 deletions wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ bilinear
bilinearity
BIP
bitlist
Bitlist
Bitlists
bitrate
bitvector
Expand All @@ -63,7 +62,6 @@ blockchain's
blockchains
blockquote
blockquotes
blockquote
blocksize
bloXroute
bloXroute's
Expand All @@ -72,7 +70,6 @@ Bogotá
Boneh
bool
booleans
Booleans
bootup
borderless
BPE
Expand Down Expand Up @@ -112,6 +109,7 @@ CODECOPY
codecs
coinbase
collateralised
collateralized
COMIS
commoditized
Composability
Expand Down Expand Up @@ -270,6 +268,7 @@ Francesco
Frege
Friedrich
frontend
frontrunning
fulfillments
fullscreen
Fullstack
Expand All @@ -287,7 +286,6 @@ getPayloadV
getters
ghost
Gilles
Goeril
Goerli
Golang
Goldwasser
Expand Down Expand Up @@ -316,6 +314,7 @@ homomorphic
Hopinheimer
Hotz
Hsiao
HSP
Hulsing
Hyperledger
Hyperplonk
Expand Down Expand Up @@ -362,6 +361,7 @@ Kira
Kleppmann
Koblitz
Kurtosis
Kyber
KZG
Lamport
Lamport's
Expand All @@ -380,7 +380,6 @@ lmd
LMD
Longrightarrow
lookahead
Lookahead
LSB
LSM
LSP
Expand All @@ -402,12 +401,10 @@ Mempool
Menezes
merkelizing
merkle
Merkle
Merkleization
Merkleize
Merkleized
Merkleizing
mev
MEV
mevboost
Michaël
Expand Down Expand Up @@ -478,7 +475,6 @@ PeerDAS
Peeters
pepc
pepc's
performace
performence
permissionless
permissionlessness
Expand All @@ -504,7 +500,6 @@ preconfed
preconfer
preconfer's
preconfers
Preconfers
preconfirm
preconfirmation
preconfirmations
Expand Down Expand Up @@ -544,6 +539,7 @@ Rareskills
RB
README
referrerpolicy
remerkleable
repo
responder
restaking
Expand Down Expand Up @@ -648,7 +644,6 @@ TLS
TODO
TPS
tracoor
Tracoor
tradeoff
tradeoffs
transactional
Expand Down Expand Up @@ -715,4 +710,4 @@ zk
zkEVMs
ZKSNARK
ZKSNARKs
Zksync
Zksync

0 comments on commit 16913e4

Please sign in to comment.