From f25aac6adff95070431e520b5567c6a872939d2a Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:53:29 +0200 Subject: [PATCH] Add MetadataV3 with custody_subnet_count --- specs/electra/p2p-interface.md | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/specs/electra/p2p-interface.md b/specs/electra/p2p-interface.md index ebdcaaa83..33d3b6592 100644 --- a/specs/electra/p2p-interface.md +++ b/specs/electra/p2p-interface.md @@ -11,17 +11,39 @@ The specification of these changes continues in the same format as the network s - [Modifications in Electra](#modifications-in-electra) + - [MetaData](#metadata) - [The gossip domain: gossipsub](#the-gossip-domain-gossipsub) - [Topics and messages](#topics-and-messages) - [Global topics](#global-topics) - [`beacon_aggregate_and_proof`](#beacon_aggregate_and_proof) - [`beacon_attestation_{subnet_id}`](#beacon_attestation_subnet_id) + - [The Req/Resp domain](#the-reqresp-domain) + - [Messages](#messages) + - [GetMetaData v3](#getmetadata-v3) ## Modifications in Electra +### MetaData + +The `MetaData` stored locally by clients is updated with an additional field to communicate the custody subnet count. + +``` +( + seq_number: uint64 + attnets: Bitvector[ATTESTATION_SUBNET_COUNT] + syncnets: Bitvector[SYNC_COMMITTEE_SUBNET_COUNT] + custody_subnet_count: uint64 +) +``` + +Where + +- `seq_number`, `attnets`, and `syncnets` have the same meaning defined in the Altair document. +- `custody_subnet_count` represents the node's custody subnet count. Clients MAY reject ENRs with a value less than `CUSTODY_REQUIREMENT`. + ### The gossip domain: gossipsub Some gossip meshes are upgraded in the fork of Electra to support upgraded types. @@ -57,3 +79,23 @@ The following convenience variables are re-defined The following validations are added: * [REJECT] `len(committee_indices) == 1`, where `committee_indices = get_committee_indices(attestation)`. * [REJECT] `attestation.data.index == 0` + +### The Req/Resp domain + +#### Messages + +##### GetMetaData v3 + +**Protocol ID:** `/eth2/beacon_chain/req/metadata/3/` + +No Request Content. + +Response Content: + +``` +( + MetaData +) +``` + +Requests the MetaData of a peer, using the new `MetaData` definition given above that is extended from Altair. Other conditions for the `GetMetaData` protocol are unchanged from the Altair p2p networking document.