Files
dst-libp2p-test-node/go-test-node
Farooq 775fd9fbf7 added pubsub metrics for go-libp2p test node (#13)
* added pubsub metrics (compatible with nim metrics) for go-libp2p test node
2026-01-12 10:24:21 +05:00
..
2025-10-27 04:02:06 +05:00
2025-10-27 04:02:06 +05:00

go-libP2P GossipSub Test Node

The go-libp2p based test node provides a flexible and extensible environment for GossipSub experiments. It supports yamux/quic transports, and follows the same features and architecture as in the the nim-libp2p and rust-libp2p test nodes.

Features

  • Configurable test node parameters
  • Multi-transport support (Yamux, QUIC)
  • Message fragmentation support
  • HTTP-based message injection for dynamic test configuration
  • Latency measurements for message propagation
  • Prometheus metrics collection
  • Kubernetes and shadow deployment

Environment Variables

  • PEERS — Number of peers in the network (default: 100)
  • CONNECTTO — Target number of peers to dial (default: 10)
  • MUXER — Stream multiplexer: supports QUIC and yamux (default: yamux)
  • FRAGMENTS — Number of message fragments (default: 1)
  • SHADOWENV — Whether running in shadow simulator (default: false)
  • SERVICE — K8s service name for peer discovery (default: nimp2p-service)

Building

git clone https://github.com/vacp2p/dst-libp2p-test-node.git
cd dst-libp2p-test-node/go-test-node

# Build Docker image
docker build -t go-libp2p-test .
docker tag go-libp2p-test user/go-test-node:vx.x

# Extract binary for shadow simulator
docker create --name temp go-libp2p-test
docker cp temp:/node/main ../shadow/main
docker rm temp