Skip to content

Add jvm-libp2p implementation for gossipsub-interop#772

Closed
raulk wants to merge 35 commits intolibp2p:masterfrom
raulk:feat/jvm-libp2p-interop
Closed

Add jvm-libp2p implementation for gossipsub-interop#772
raulk wants to merge 35 commits intolibp2p:masterfrom
raulk:feat/jvm-libp2p-interop

Conversation

@raulk
Copy link
Member

@raulk raulk commented Jan 7, 2026

Summary

Adds a JVM/Kotlin implementation of the gossipsub interop binary for Shadow network testing. This enables testing jvm-libp2p's gossipsub implementation alongside go-libp2p and rust-libp2p in the Shadow simulator.

Key additions:

  • jvm-libp2p/ directory: Complete Kotlin implementation of the interop binary
  • Key generation: Deterministic ED25519 key generation from node ID (little-endian encoded seed)
  • Script parsing: Polymorphic JSON deserialization for all instruction types (start, connect, subscribe, publish, etc.)
  • Partial messages: Full support for partial message testing (PeerDAS use case)
  • Makefile integration: Build targets for JVM binaries and compositions

Usage

# Build the JVM binary
make gossipsub-interop-jvm

# Run with JVM nodes
uv run run.py --composition all-jvm --scenario partial-messages

Supported compositions

  • all-jvm - All JVM nodes
  • go-jvm - Go publisher, JVM subscriber
  • jvm-go - JVM publisher, Go subscriber

Dependencies

This PR depends on: libp2p/jvm-libp2p#433

Test plan

  • Shadow simulation passes with all-jvm composition
  • Partial message exchange works between JVM nodes
  • Cross-implementation testing (go-jvm, jvm-go)

MarcoPolo and others added 30 commits December 15, 2025 20:46
adds Go implementation of partial messages and changes to the test
runner to support it.
go-libp2p debugging lines

debug print rust
We create a chain topology 1 <-> 2 <-> ... <-> n. Provide each node with
one part of the message. And then publish the message from one of the
nodes. Eventually all the nodes should have all the messages.
jxs and others added 5 commits December 15, 2025 20:46
- treat None metadata as peer having nothing, send all available parts
- create topic/group entries on-the-fly when receiving unknown partial messages instead of error'ing
- log "All parts received" when local node has complete message
Adds a JVM/Kotlin implementation of the gossipsub interop binary for Shadow
network testing. This enables testing jvm-libp2p's gossipsub implementation
alongside go-libp2p and rust-libp2p.

Key additions:
- jvm-libp2p/ directory with Kotlin implementation
- Deterministic ED25519 key generation from node ID
- Params.json parsing with polymorphic script instructions
- Partial message support for PeerDAS testing
- Integration with Makefile for jvm builds

Usage:
- make gossipsub-interop-jvm  # Build the JVM binary
- Compositions: all-jvm, go-jvm, jvm-go

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@raulk raulk closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants