Files
dst-libp2p-test-node/rust-test-node
Farooq 3dbb648960 Updated metrics for rust test node. (#14)
Added metrics are compatible with nim/go test nodes
2026-01-12 10:43:05 +05:00
..
2025-11-20 23:03:36 +05:00
2025-11-20 23:03:36 +05:00
2025-11-20 23:03:36 +05:00

Rust-libP2P GossipSub Test Node

The rust-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 go-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 (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/rust-test-node

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

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