Repository navigation
feat(cli): run the interop harness on the real stack - #88
Open
IvanAnishchuk wants to merge 7 commits into
Open
IvanAnishchuk wants to merge 7 commits into
IvanAnishchuk wants to merge 7 commits into
Conversation
…tiate The host builds its upgrade from the public stages of libp2p/negotiate. The secured checkpoint sits between the handshake and the muxer stage, where the core seam puts it. Stream selection is a host shell over the pure negotiate core. This commit deletes the Negotiate.Legacy copy, and the unit 1b host legs now run. Part of etheorem#70.
This was referenced Nov 10, 2026
IvanAnishchuk
force-pushed
the
seam-interop-stack
branch
from
November 10, 2026 11:41
db33675 to
2bdb30a
Compare
Root ARCHITECTURE §3.1 says every suite above the transport runs on the test values, and the Noise test value has fixed keys. The host legs used Noise.securityProtocol, whose ephemeral keys come from Rng.system. Each suite host now takes Noise.fixedKeyProtocol, seeded from its identity byte. The host PLAN offered the production value as an option, and now names the test value only. Part of etheorem#70.
The sim checks of the req/resp suite now run between two hosts with Noise and yamux. Tests/HostPair.lean builds the pair. The requester opens its stream through the host's newStream. This commit deletes Protocols.Mock.Muxer and Protocols.Mock.HostStream. An id the peer does not serve now fails the open. Multistream-select answers na, so the stream never opens for that id. Part of etheorem#78.
The req/resp section said the host still upgrades through a mock of libp2p/negotiate, so the suite ran against a mock of the stream call. etheorem#86 puts the host on the real negotiate, and this branch runs the suite between two real hosts, so the sentence goes. Part of etheorem#78.
… test clock Root ARCHITECTURE §3.1 says every suite above the transport runs on the test values. Tests/HostPair.lean built its hosts with Noise.securityProtocol and the system clock. Each host now takes Noise.fixedKeyProtocol, seeded from its identity byte, and both hosts run on one TestClock that Pair.close closes. Part of etheorem#78.
Identify and ping now type over the seam types of libp2p/core, and this commit deletes Protocols.Mock.Core and Protocols.Mock.Host. The push handler checks the pushed key against the peer of its stream's connection and stores the addresses through the host's peerstore. The responder writes the connection's remote address as the observed address, as go reads both from the connection. The identify deadline reset now runs in a TaskSet the call owns and joins. The old reset task had no owner. GossipsubSession serves the identify handler with no bridge. ReqResp/Payload.lean imports Streams.Error, which it had reached only through the core mock. Part of etheorem#55.
The harness composes the identity, TCP, Noise with a generated static key, yamux, the host, and ping from the real packages. This commit deletes Interop/Mock/Stack.lean. scripts/interop-matrix.sh passes every cell: lean and go in both dial directions, lean with lean, the silent peer, and the slow reader. libp2p/mux holds no mplex value (P2), so a run with muxer=mplex exits nonzero at the host start. Part of etheorem#73.
IvanAnishchuk
force-pushed
the
seam-interop-stack
branch
from
November 10, 2026 13:00
2bdb30a to
013e7f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The transport-interop harness now runs on the real stack, and the W5.9 matrix is green against go-libp2p v0.50.0: both dial directions, lean with lean, the silent peer, and the slow reader. This PR deletes
Interop/Mock/Stack.lean. Closes #73.This PR stacks on #86 (the host on the real negotiate), #87 (the req/resp mocks), and #89 (identify and ping on the real core and host). Until those merge, the diff also shows their commits. Review the last commit,
feat(cli): ….What changed
cli/:Interop.leanimports the real packages.startHostbuilds an Ed25519 identity,Noise.Config.generatefor the static key,Mux.yamux, andLibp2p.Hostwith TCP andPing.pingHandler. The dialer opens its stream forPing.protocolId.muxer=mplexstill parses, as a name of the test plan.libp2p/muxholds no mplex value (P2, the mux PLAN, unit 2), so the host start refuses it, and the run exits nonzero. TheConfig.leandoc called mplex "the secondMuxervalue", which is false on this tip, and now says the above.Interop/Mock/Stack.leanis deleted. The cli ARCHITECTURE replaces "The mock" with "The stack", and drops the module row.Test plan
lake build --wfail interopis green (329 jobs).lake testpasses: 27832 passed, 0 failed, 4 skipped. It passes again withLEAN_NUM_THREADS=1.scripts/interop-matrix.sh, binary SHA-256cc33582966bd36c8c2377ea029e0bbf1784da5deb77b827886e7c593fdcaf039:{"handshakePlusOneRTTMillis":6.579,"pingRTTMilllis":0.217}{"handshakePlusOneRTTMillis":49.061,"pingRTTMilllis":0.973}{"handshakePlusOneRTTMillis":138.545,"pingRTTMilllis":0.982}{"handshakePlusOneRTTMillis":52.583,"pingRTTMilllis":2.580}{"handshakePlusOneRTTMillis":136.802,"pingRTTMilllis":0.853}{"stalledAfterBytes":524224,"pingRTTMillis":12.417}Risk / trust footprint
None added or removed. The deleted mock held eleven
opaquedeclarations and no axiom.Notes for reviewers
Interop/Mock/Stack.lean(PR feat(cli): W5.9, the transport-interop harness and the matrix script #60) can be struck when this merges. The green run is on [W5.9] cli: the transport-interop harness (gate) #24 with this binary SHA.LICENSE (LGPL version 3)