Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from eth/66 to eth/67 #113

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ In Erigon, there are with two interfaces:

## 2. Sentry

Sentry is the component, connecting the node to the p2p network of the blockchain. In case of Erigon and Ethereum, it implements [`eth/65`, `eth/66`, etc](https://github.com/ethereum/devp2p/blob/master/caps/eth.md#change-log) protocols via [devp2p](https://github.com/ethereum/devp2p).
Sentry is the component, connecting the node to the p2p network of the blockchain. In case of Erigon and Ethereum, it implements [`eth/67`](https://github.com/ethereum/devp2p/blob/master/caps/eth.md) protocol via [devp2p](https://github.com/ethereum/devp2p).

Sentry accepts connections from [Core] and [Transaction Pool] components.

Expand Down
71 changes: 22 additions & 49 deletions p2psentry/sentry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,27 @@ package sentry;
option go_package = "./sentry;sentry";

enum MessageId {
// ======= eth 65 protocol ===========

STATUS_65 = 0;
GET_BLOCK_HEADERS_65 = 1;
BLOCK_HEADERS_65 = 2;
BLOCK_HASHES_65 = 3;
GET_BLOCK_BODIES_65 = 4;
BLOCK_BODIES_65 = 5;
GET_NODE_DATA_65 = 6;
NODE_DATA_65 = 7;
GET_RECEIPTS_65 = 8;
RECEIPTS_65 = 9;
NEW_BLOCK_HASHES_65 = 10;
NEW_BLOCK_65 = 11;
TRANSACTIONS_65 = 12;
NEW_POOLED_TRANSACTION_HASHES_65 = 13;
GET_POOLED_TRANSACTIONS_65 = 14;
POOLED_TRANSACTIONS_65 = 15;


// ======= eth 66 protocol ===========

// eth64 announcement messages (no id)
STATUS_66 = 17;
NEW_BLOCK_HASHES_66 = 18;
NEW_BLOCK_66 = 19;
TRANSACTIONS_66 = 20;

// eth65 announcement messages (no id)
NEW_POOLED_TRANSACTION_HASHES_66 = 21;

// eth66 messages with request-id
GET_BLOCK_HEADERS_66 = 22;
GET_BLOCK_BODIES_66 = 23;
GET_NODE_DATA_66 = 24;
GET_RECEIPTS_66 = 25;
GET_POOLED_TRANSACTIONS_66 = 26;
BLOCK_HEADERS_66 = 27;
BLOCK_BODIES_66 = 28;
NODE_DATA_66 = 29;
RECEIPTS_66 = 30;
POOLED_TRANSACTIONS_66 = 31;



// ======= eth 67 protocol ===========
// ...
// ======= eth/67 protocol ===========
// Version 67 removed the GetNodeData and NodeData messages.

// eth/64 (or earlier) announcement messages (no request-id)
STATUS = 0;
NEW_BLOCK_HASHES = 1;
TRANSACTIONS = 2;
NEW_BLOCK = 3;

// eth/65 announcement messages (no request-id)
NEW_POOLED_TRANSACTION_HASHES = 4;

// eth/66 messages with request-id
GET_BLOCK_HEADERS = 5;
BLOCK_HEADERS = 6;
GET_BLOCK_BODIES = 7;
BLOCK_BODIES = 8;
GET_POOLED_TRANSACTIONS = 9;
POOLED_TRANSACTIONS = 10;
GET_RECEIPTS = 11;
RECEIPTS = 12;
}

message OutboundMessageData {
Expand Down Expand Up @@ -111,8 +85,7 @@ message StatusData {
}

enum Protocol {
ETH65 = 0;
ETH66 = 1;
ETH67 = 0;
}

message SetStatusReply {}
Expand Down
2 changes: 1 addition & 1 deletion remote/ethbackend.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ service ETHBACKEND {
// Version returns the service version number
rpc Version(google.protobuf.Empty) returns (types.VersionReply);

// ProtocolVersion returns the Ethereum protocol version number (e.g. 66 for ETH66).
// ProtocolVersion returns the Ethereum protocol version number (e.g. 67 for ETH67).
rpc ProtocolVersion(ProtocolVersionRequest) returns (ProtocolVersionReply);

// ClientVersion returns the Ethereum client version string using node name convention (e.g. TurboGeth/v2021.03.2-alpha/Linux).
Expand Down