-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
77 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
# Portal History Network Distance | ||
# Basic Radius Payload | ||
|
||
This payload is only supposed to be used for the history network | ||
|
||
## version 1 | ||
A basic Ping/Pong payload which only contains the nodes radius | ||
|
||
Ping and Pong Payload | ||
```python | ||
HistoryNetworkDistanceV1 = Container( | ||
type: 1, | ||
version: 1, | ||
payload: Container(data_radius: uint256) | ||
) | ||
``` | ||
|
||
## version 2 | ||
Ping and Pong Payload | ||
```python | ||
HistoryNetworkDistanceV2 = Container( | ||
basic_radius = SSZ.serialize(Container(data_radius: U256)) | ||
|
||
BasicRadiusPayload = Container( | ||
type: 1, | ||
version: 2, | ||
payload: Container(data_radius: uint256, ephemeral_header_count: uint16) | ||
payload: basic_radius | ||
) | ||
``` | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Portal State Network Distance | ||
# History Radius Payload | ||
|
||
This payload is only supposed to be used for the state network | ||
A specialized radius payload for the history network which contains field for how many ephemeral headers the node holds. | ||
|
||
## version 1 | ||
|
||
Ping and Pong payload | ||
Ping and Pong Payload | ||
```python | ||
StateNetworkDistanceV1 = Container( | ||
type: 2, | ||
version: 1, | ||
payload: Container(data_radius: uint256) | ||
|
||
history_radius = SSZ.serialize(Container(data_radius: U256, ephemeral_header_count=U16)) | ||
|
||
HistoryRadiusPayload = Container( | ||
type: 1, | ||
payload: history_radius | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
# Portal Beacon Network Distance | ||
# Get Client info | ||
|
||
This payload is only supposed to be used for the beacon network | ||
This payload is only supposed to be usable from all Networks. This payload allows you to figure out peer's client info. Which will be useful for censuses. | ||
|
||
|
||
### Type Specifications | ||
|
||
Client info are ASCII hex encoded strings. | ||
|
||
Client info strings consist of 4 parts | ||
- client name (e.x. `trin`,`fluffy`) | ||
- client version + short commit (e.x. `0.1.1-2b00d730`) | ||
- operating system + cpu archtecture (e.x. `linux-x86_64`) | ||
- programming language + language version (e.x. `rustc1.81.0`) | ||
|
||
Example | ||
- String: `trin/0.1.1-2b00d730/linux-x86_64/rustc1.81.0` | ||
- Hex encoding: `0x7472696E2F302E312E312D32623030643733302F6C696E75782D7838365F36342F7275737463312E38312E30` | ||
|
||
|
||
Max length of a client info we should accept | ||
- MAX_CLIENT_INFO_BYTE_LENGTH = 200 | ||
|
||
## version 1 | ||
|
||
Ping and Pong payload | ||
```python | ||
BeaconNetworkDistanceV1 = Container( | ||
|
||
client_info = SSZ.serialize(Container(client_info: ByteList[MAX_CLIENT_INFO_BYTE_LENGTH])) | ||
|
||
ClientInfoPayload = Container( | ||
type: 3, | ||
version: 1, | ||
payload: Container(data_radius: uint256) | ||
payload: client_info | ||
) | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters