eth2.0-specs/specs/electra/p2p-interface.md

60 lines
2.2 KiB
Markdown
Raw Normal View History

2024-04-05 17:02:03 +00:00
# Electra -- Networking
2024-03-05 12:46:45 +00:00
2024-04-05 17:02:03 +00:00
This document contains the consensus-layer networking specification for Electra.
2024-03-05 12:46:45 +00:00
The specification of these changes continues in the same format as the network specifications of previous upgrades, and assumes them as pre-requisite.
## Table of contents
<!-- TOC -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
2024-04-05 17:02:03 +00:00
- [Modifications in Electra](#modifications-in-electra)
2024-03-05 12:46:45 +00:00
- [The gossip domain: gossipsub](#the-gossip-domain-gossipsub)
- [Topics and messages](#topics-and-messages)
2024-04-05 17:02:03 +00:00
- [Global topics](#global-topics)
- [`beacon_aggregate_and_proof`](#beacon_aggregate_and_proof)
- [`beacon_attestation_{subnet_id}`](#beacon_attestation_subnet_id)
2024-03-05 12:46:45 +00:00
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->
2024-04-05 17:02:03 +00:00
## Modifications in Electra
2024-03-05 12:46:45 +00:00
### The gossip domain: gossipsub
2024-04-05 17:02:03 +00:00
Some gossip meshes are upgraded in the fork of Electra to support upgraded types.
2024-03-05 12:46:45 +00:00
#### Topics and messages
2024-04-05 17:02:03 +00:00
Topics follow the same specification as in prior upgrades.
The `beacon_block` topic is modified to also support Electra blocks.
The `beacon_aggregate_and_proof` and `beacon_attestation_{subnet_id}` topics are modified to support the gossip of the new attestation type.
2024-03-05 12:46:45 +00:00
2024-04-05 17:02:03 +00:00
The specification around the creation, validation, and dissemination of messages has not changed from the Capella document unless explicitly noted here.
2024-03-05 12:46:45 +00:00
2024-04-05 17:02:03 +00:00
The derivation of the `message-id` remains stable.
2024-03-05 12:46:45 +00:00
2024-04-05 17:02:03 +00:00
#### Global topics
##### `beacon_aggregate_and_proof`
2024-03-05 12:46:45 +00:00
The following convenience variables are re-defined
- `index = get_committee_indices(aggregate.committee_bits)[0]`
The following validations are added:
2024-03-25 10:19:11 +00:00
* [REJECT] `len(committee_indices) == 1`, where `committee_indices = get_committee_indices(aggregate)`.
2024-03-05 12:46:45 +00:00
* [REJECT] `aggregate.data.index == 0`
2024-04-05 17:02:03 +00:00
##### `beacon_attestation_{subnet_id}`
2024-03-05 12:46:45 +00:00
The following convenience variables are re-defined
- `index = get_committee_indices(attestation.committee_bits)[0]`
The following validations are added:
2024-03-25 10:19:11 +00:00
* [REJECT] `len(committee_indices) == 1`, where `committee_indices = get_committee_indices(attestation)`.
2024-03-05 12:46:45 +00:00
* [REJECT] `attestation.data.index == 0`