From 975a35eaf06f135e8d448faaa239f8031e36a040 Mon Sep 17 00:00:00 2001 From: Kolby Moroz Liebl <31669092+KolbyML@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:42:10 -0700 Subject: [PATCH] Clean up rest of ping extensions to conform with simplified ping/pong message (#359) --- SPECIFICATION_TEMPLATE.md | 2 +- beacon-chain/beacon-network.md | 4 ++-- .../canonical-transaction-index-network.md | 4 ++-- history/history-network.md | 4 ++-- ping-payload-extensions/extensions/template.md | 10 ++++++---- ping-payload-extensions/extensions/type-0.md | 3 ++- ping-payload-extensions/extensions/type-1.md | 3 ++- ping-payload-extensions/extensions/type-2.md | 3 ++- ping-payload-extensions/extensions/type-65535.md | 3 ++- portal-wire-protocol.md | 4 ++-- state/state-network.md | 4 ++-- transaction-gossip/transaction-gossip.md | 2 +- 12 files changed, 26 insertions(+), 20 deletions(-) diff --git a/SPECIFICATION_TEMPLATE.md b/SPECIFICATION_TEMPLATE.md index bf7c1333..4072af7b 100644 --- a/SPECIFICATION_TEMPLATE.md +++ b/SPECIFICATION_TEMPLATE.md @@ -54,7 +54,7 @@ as "Retrieval of block headers by their hash" -#### `Ping.custom_data` & `Pong.custom_data` +#### `Ping.payload` & `Pong.payload` diff --git a/beacon-chain/beacon-network.md b/beacon-chain/beacon-network.md index 8386c6e0..334a951d 100644 --- a/beacon-chain/beacon-network.md +++ b/beacon-chain/beacon-network.md @@ -74,9 +74,9 @@ The beacon chain network supports the following protocol messages: - `Find Content` - `Found Content` - `Offer` - `Accept` -#### `Ping.custom_data` & `Pong.custom_data` +#### `Ping.payload` & `Pong.payload` -In the beacon chain network the `custom_payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. +In the beacon chain network the `payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. List of currently supported payloads, by latest to oldest. - [Type 1 Basic Radius Payload](../ping-payload-extensions/extensions/type-1.md) diff --git a/canonical-transaction-index/canonical-transaction-index-network.md b/canonical-transaction-index/canonical-transaction-index-network.md index be31c5be..53225db8 100644 --- a/canonical-transaction-index/canonical-transaction-index-network.md +++ b/canonical-transaction-index/canonical-transaction-index-network.md @@ -54,9 +54,9 @@ The canonical transaction index network supports the following protocol messages - `Offer` - `Accept` -#### `Ping.custom_data` & `Pong.custom_data` +#### `Ping.payload` & `Pong.payload` -In the canonical transaction index network the `custom_payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. +In the canonical transaction index network the `payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. List of currently supported payloads, by latest to oldest. - [Type 1 Basic Radius Payload](../ping-payload-extensions/extensions/type-1.md) diff --git a/history/history-network.md b/history/history-network.md index 6faaffdd..fdee02c6 100644 --- a/history/history-network.md +++ b/history/history-network.md @@ -59,9 +59,9 @@ The history network supports the following protocol messages: - `Find Content` - `Found Content` - `Offer` - `Accept` -#### `Ping.custom_data` & `Pong.custom_data` +#### `Ping.payload` & `Pong.payload` -In the history network the `custom_payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. +In the history network the `payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. List of currently supported payloads, by latest to oldest. - [Type 2 History Radius Payload](../ping-payload-extensions/extensions/type-2.md) diff --git a/ping-payload-extensions/extensions/template.md b/ping-payload-extensions/extensions/template.md index 04b0320d..8d95084b 100644 --- a/ping-payload-extensions/extensions/template.md +++ b/ping-payload-extensions/extensions/template.md @@ -8,8 +8,9 @@ Ping payload [Payload] = SSZ.serialize(Container([Key Value Pairs])) -[Container Name] = Container( - type: [Type Number], +Ping Message = Container( + enr_seq: uint64, + payload_type: [Type Number], payload: [Payload] ) ``` @@ -19,8 +20,9 @@ Pong payload [Payload] = SSZ.serialize(Container([Key Value Pairs])) -[Container Name] = Container( - type: [Type Number], +Pong Message = Container( + enr_seq: uint64, + payload_type: [Type Number], payload: [Payload] ) ``` diff --git a/ping-payload-extensions/extensions/type-0.md b/ping-payload-extensions/extensions/type-0.md index 484d6c39..923c243f 100644 --- a/ping-payload-extensions/extensions/type-0.md +++ b/ping-payload-extensions/extensions/type-0.md @@ -35,7 +35,8 @@ client_info_and_capabilities = SSZ.serialize(Container( capabilities: List[u16, MAX_CAPABILITIES_LENGTH] )) -CapabilitiesPayload = Container( +Ping/Pong Message = Container( + enr_seq: uint64, type: 0, payload: client_info_and_capabilities ) diff --git a/ping-payload-extensions/extensions/type-1.md b/ping-payload-extensions/extensions/type-1.md index 3bb206fc..b317fdf9 100644 --- a/ping-payload-extensions/extensions/type-1.md +++ b/ping-payload-extensions/extensions/type-1.md @@ -7,7 +7,8 @@ Ping and Pong Payload basic_radius = SSZ.serialize(Container(data_radius: U256)) -BasicRadiusPayload = Container( +Ping/Pong Message = Container( + enr_seq: uint64, type: 1, payload: basic_radius ) diff --git a/ping-payload-extensions/extensions/type-2.md b/ping-payload-extensions/extensions/type-2.md index 1bb830a2..cd80ec4b 100644 --- a/ping-payload-extensions/extensions/type-2.md +++ b/ping-payload-extensions/extensions/type-2.md @@ -7,7 +7,8 @@ Ping and Pong Payload history_radius = SSZ.serialize(Container(data_radius: U256, ephemeral_header_count=U16)) -HistoryRadiusPayload = Container( +Ping/Pong Message = Container( + enr_seq: uint64, type: 2, payload: history_radius ) diff --git a/ping-payload-extensions/extensions/type-65535.md b/ping-payload-extensions/extensions/type-65535.md index 8f08d0e1..8b2ac87e 100644 --- a/ping-payload-extensions/extensions/type-65535.md +++ b/ping-payload-extensions/extensions/type-65535.md @@ -10,7 +10,8 @@ MAX_ERROR_BYTE_LENGTH = 300 error_payload = SSZ.serialize(Container(error_code: u16, message: ByteList[MAX_ERROR_BYTE_LENGTH])) -ErrorPayload = Container( +Pong Message = Container( + enr_seq: uint64, type: 65535, payload: error_payload ) diff --git a/portal-wire-protocol.md b/portal-wire-protocol.md index 74a3be38..a99cd2e5 100644 --- a/portal-wire-protocol.md +++ b/portal-wire-protocol.md @@ -95,7 +95,7 @@ The transmission of `content` data that is too large to fit a single packet is d #### Ping (0x00) -Request message to check if a node is reachable, communicate basic information about our node, and request basic information about the recipient node. Additionally sub-protocol can define a schema for the `custom_payload` field to exchange additional information. +Request message to check if a node is reachable, communicate basic information about our node, and request basic information about the recipient node. Additionally sub-protocol can define a schema for the `payload` field to exchange additional information. ``` selector = 0x00 @@ -325,7 +325,7 @@ port := UDP port number ### Protocol Specific Node State -Sub protocols may define additional node state information which should be tracked in the node state database. This information will typically be transmitted in the `Ping.custom_data` and `Pong.custom_data` fields. +Sub protocols may define additional node state information which should be tracked in the node state database. This information will typically be transmitted in the `Ping.payload` and `Pong.payload` fields. ## Algorithms diff --git a/state/state-network.md b/state/state-network.md index fcb34b19..e420ac92 100644 --- a/state/state-network.md +++ b/state/state-network.md @@ -54,9 +54,9 @@ The execution state network supports the following protocol messages: - `Find Content` - `Found Content` - `Offer` - `Accept` -#### `Ping.custom_data` & `Pong.custom_data` +#### `Ping.payload` & `Pong.payload` -In the execution state network network the `custom_payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. +In the execution state network network the `payload` field of the `Ping` and `Pong` messages. The first packet between another client MUST be [Type 0: Client Info, Radius, and Capabilities Payload](../ping-payload-extensions/extensions/type-0.md). Then upgraded to the latest payload supported by both of the clients. List of currently supported payloads, by latest to oldest. - [Type 1 Basic Radius Payload](../ping-payload-extensions/extensions/type-1.md) diff --git a/transaction-gossip/transaction-gossip.md b/transaction-gossip/transaction-gossip.md index 2ced97b2..6bbf6fbe 100644 --- a/transaction-gossip/transaction-gossip.md +++ b/transaction-gossip/transaction-gossip.md @@ -26,7 +26,7 @@ The network uses the PING/PONG/FINDNODES/FOUNDNODES/OFFER/ACCEPT messages from t The network uses the standard XOR distance function. -In the execution state network the `custom_payload` field of the `Ping` and `Pong` messages is the serialization of an SSZ Container specified as [Type 1 Basic Radius Payload](../ping-payload-extensions/extensions/type-1.md) +In the execution state network the `payload` field of the `Ping` and `Pong` messages is the serialization of an SSZ Container specified as [Type 1 Basic Radius Payload](../ping-payload-extensions/extensions/type-1.md) ## Content Keys