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

Ping/Pong Extensions #706

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Ping/Pong Extensions #706

wants to merge 25 commits into from

Conversation

ScottyPoi
Copy link
Collaborator

Implements changes in ethereum/portal-network-specs#348

Redefines the CustomPayload of PING and PONG messages to include a type parameter.

This allows different types of PING messages to provide / request different kinds of data from a peer.

Currently this includes:

  • type 0: Client Info and Capabilities
  • type 1: Basic Radius
  • type 2: History Radius

Clients will respond with a PONG of the same type, or:

  • type 65535: Error Response

@ScottyPoi ScottyPoi marked this pull request as draft January 14, 2025 01:56
Copy link
Collaborator

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! Couple of relatively small things in comments.

Other feedback already noted on discord.

@ScottyPoi ScottyPoi marked this pull request as ready for review January 14, 2025 17:32
@ScottyPoi ScottyPoi marked this pull request as draft January 14, 2025 18:14
@ScottyPoi ScottyPoi marked this pull request as ready for review January 14, 2025 19:51
Copy link
Collaborator

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me overall though I question whether we need a new dependency to grab the commit hash. I think we can safely assume that anybody running this client locally will either be running it from a cloned git repo or in docker and I'm pretty sure git is installed in our docker image so we should able to just do an exec('git rev-parse HEAD') or something to that effect and read the output instead of requiring a new dependency for this. I know I'm being persnickety but just my 2 gwei. Happy to be persuaded otherwise.

packages/cli/src/index.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants