bee icon indicating copy to clipboard operation
bee copied to clipboard

feat(handshake): enum protobuf and capabilities

Open mfw78 opened this issue 7 months ago • 3 comments

Checklist

  • [x] I have read the coding guide.
  • ~~My change requires a documentation update, and I have done it.~~
  • [x] I have added tests to cover my changes.
  • [x] I have filled out the description and linked the related issues.

Description

This PR revises the handshake protocol such that:

  1. There is the inclusive of a Capabilities message within the Ack that determines if the node is a full node and/or supports tracing headers.
  2. The Handshake protobuf now is a oneof message which enforces strict typing of the messages on the wire.
  3. Unless specifically enabled by the configuration flag, no Headers are passed in the opening of new streams within libp2p, essentially reducing RTTs / network traffic that is needlessly sending empty headers on every single stream creation except Handshake. The functionality is preserved for developers / those wanting to debug the protocol.

Open API Spec Version Changes (if applicable)

N/A

Motivation and Context (Optional)

Strict typing and reduction in needless network chatter.

Related Issue (Optional)

  • https://github.com/ethersphere/SWIPs/pull/67

Screenshots (if appropriate):

N/A

mfw78 avatar May 27 '25 09:05 mfw78

@mfw78 please fix linting errors for a green CI, ta

zelig avatar May 30 '25 05:05 zelig

@mfw78 please fix linting errors for a green CI, ta

I've bumped to the latest golang linters for CI/CD within this PR, the failing CI/CD currently seems limited to beekeeper settlement tests.

mfw78 avatar May 30 '25 06:05 mfw78

investigated the beekeeper test error and it turned out swap protocol also uses libp2p header exchange. I uploaded the fix here

nugaon avatar Jul 14 '25 21:07 nugaon