Skip to content

add a test plan that measures the RTT of libp2p handshakes #52

Open
@marten-seemann

Description

The test plan will test that the libp2p handshake completes in the expected number of roundtrips. For example:

  • the QUIC handshake should take 1 RTT
  • the TCP handshake should take 4 RTTs (1. 3-way TCP handshake, 2. multistream negotiation of security protocol, 3. security handshake, 4. muxer negotiation)
  • when using early muxer negotiation (Tracking Issue: early muxer selection go-libp2p#1789), the TCP handshake only takes 3 RTTs

This can easily extended to test that moving the security protocol into the multiaddr (libp2p/specs#353) saves another RTT.

The test plan will need to build on the cross-version test (or maybe the cross-implementation test). This will allow us to assert that while new go-libp2p versions make use of all the performance improvements and handshaking takes fewer RTTs, we're still remain backwards-compatible.

In the long term, this test will probably replace the ping test plan, as it tests strictly more than the ping test.

Metadata

Assignees

Labels

P0Critical: Tackled by core team ASAPeffort/daysEstimated to take multiple days, but less than a weekkind/enhancementA net-new feature or improvement to an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions