Skip to content

add sessionheader, extending the handshake protocol

Glen De Cauwsemaecker requested to merge GlenDC:handshake-header into gateway-proto

This PR adds the concept of a sessionheader, extending the handshake protocol:

  • connecting peers are now ensured to share the same genesis blockID;
  • connecting peers are now ensured not to connect to itself;
  • pinging between newer clients is no longer a hack;

It does this by having a new connectSessionHandshake that comes right after the connectVersionHandshake, which exchanges the genesisID, gatewayID and if the peer wants to connect (eg this is false when the peer was just pinging).

This is a pretty invasive feature, but should be fully backwards compatible. Well that's the goal at least. Would love feedback on this, and make this a thing into master, together, if possible.

Review Request: @DavidVorick @lukechampine

Merge request reports