feat: add haskell to kad-dht interop matrix - #136
Open
adust09 wants to merge 1 commit into
Open
Conversation
Register libp2p-hs, a Haskell implementation of libp2p, as an implementation in the kad-dht suite. The node implements all three roles (bootstrap, provider, querier) behind the ROLE env var and follows the Redis coordination contract. The image builds from the repository's own Dockerfile, matching the nim entry's source layout.
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.
Add
haskellto the Kad-DHT suite.libp2p-hs is a Haskell implementation of
the libp2p stack. It is already registered in the transport suite as
haskell-v0.1(#134); this adds its Kademlia DHT node here.Test app
The node implements all three roles behind the
ROLEenv var and follows thecontract in
kad-dht/README.md:ROLE,TEST_KEY,REDIS_ADDRSETs{TEST_KEY}_bootstrap_addr, runs a DHT serverprovide+putValue, thenSETs{TEST_KEY}_provider_donefindProviders+getValue, printsstatus: pass/status: fail(pluserror:lines) on stdoutinterop-test-key-{TEST_KEY}and/example/data/{TEST_KEY}, valuehello from haskell clientThe image builds from the repository's own Dockerfile with the repo root as
build context, so it uses the existing
source.dockerfilepath inbuild-images.sh— the same mode asnim. No changes tobuild-images.sh,generate-tests.sh, orrun-single-test.shwere needed.Validation
Full local run of all 37 matrix tests involving
haskell, with the image builtfrom the pinned commit through the same path CI takes:
Getting there took two fixes in libp2p-hs (adust09/libp2p-hs#265), both found by
running against this suite rather than against itself:
hello frompayload conventionThe second one is worth flagging for anyone adding an implementation:
dotnet-libp2p awaits
/ipfs/id/1.0.0on every outbound connection before itsdial resolves, so a node that does not serve Identify is undialable from dotnet
even though the transport handshake completes.
Note on the existing matrix
For reference, the 27 pre-existing
py/dotnet/nimtests score 24/27 on thesame machine. The three failures (
py_x_py_x_dotnet,dotnet_x_py_x_dotnet,dotnet_x_dotnet_x_dotnet) are dotnet-querier lookups timing out and areunrelated to this change — they reproduce without
haskellinimages.yaml.The matrix grows from 27 to 64 tests. The image is a GHC build and takes roughly
10 minutes from cold; let me know if that is a problem for the test pass budget.