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

sentry.proto: invert HandShake data flow #165

Open
battlmonstr opened this issue May 4, 2023 · 1 comment
Open

sentry.proto: invert HandShake data flow #165

battlmonstr opened this issue May 4, 2023 · 1 comment

Comments

@battlmonstr
Copy link
Contributor

Currently a supported eth network protocol version is sent from sentry to the node.

The sentry being an RLPx proxy knows very little about eth (only the status exchange is covered).
It uses the version only to forward it to connected peers.
Versions 66 to 68 are 100% compatible from the sentry's point of view.

The task of working with eth specifics lies on the node, and there it could be possible to work with supported compatible peers simultaneously (e.g. 66 and 67).

Therefore it makes more sense that the supported eth versions are passed from the node to sentry instead.

There would be an administration benefit that when an eth version changes, multiple sentries don't need to be reconfigured, because currently they require a fixed --p2p.protocol option.

Proposal

Add a new method:

message HandshakeRequest {
  repeated Protocol eth_versions = 1;
}

rpc Handshake2(HandshakeRequest) returns (google.protobuf.Empty);

The node would accept a new option:

--p2p.eth.versions x,y,z

For example: --p2p.eth.versions 66,67

means that the node should start with support for both versions, and issue a Handshake2 call to sentry with them.

The sentry that receives it should then forward all versions (both eth/66 and eth/67) to connected peers in RLPx Hello.

@battlmonstr
Copy link
Contributor Author

battlmonstr commented Jul 10, 2023

CC @canepat this is in relation to what you've tried to explain about SetStatus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant