bee
bee copied to clipboard
feat(handshake): enum protobuf and capabilities
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:
- There is the inclusive of a
Capabilitiesmessage within theAckthat determines if the node is a full node and/or supports tracing headers. - The
Handshakeprotobuf now is aoneofmessage which enforces strict typing of the messages on the wire. - 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 exceptHandshake. 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 please fix linting errors for a green CI, ta
@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.
investigated the beekeeper test error and it turned out swap protocol also uses libp2p header exchange. I uploaded the fix here