provisioning/taskservs/polkadot/zombienet/info.md
2025-09-22 23:11:41 +01:00

144 lines
4.6 KiB
Markdown

Perfect! I've successfully created a comprehensive Polkadot Zombienet taskserv for the provisioning system. Here's what was built:
🧟 Polkadot Zombienet Taskserv (polkadot-zombienet)
Created files:
- taskservs/polkadot-zombienet/kcl/polkadot-zombienet.k - Complete KCL schema definitions
- taskservs/polkadot-zombienet/default/provisioning.toml - Service metadata
- taskservs/polkadot-zombienet/default/env-polkadot-zombienet.j2 - Environment configuration
- taskservs/polkadot-zombienet/default/install-polkadot-zombienet.sh - Installation script
- taskservs/polkadot-zombienet/default/prepare - Preparation and validation script
- taskservs/polkadot-zombienet/default/network-config.toml.j2 - Dynamic network configuration template
Network Templates:
- simple-network.toml - Minimal 2-node relay chain (Alice + Bob)
- parachain-network.toml - Relay chain with one parachain (3 validators + 1 collator)
- multi-parachain-network.toml - Multi-parachain setup with XCM testing (4 validators + 3 parachains)
Test Scripts:
- test-basic.zndsl - Basic network functionality tests
- test-parachain.zndsl - Parachain-specific functionality tests
Service Management:
- zombienet-service.sh.j2 - Service management script template
🔧 Key Features
Multi-Provider Support
- Native Provider: Downloads and runs Polkadot/Parachain binaries locally
- Kubernetes Provider: Deploys networks to Kubernetes clusters with monitoring
- Podman Provider: Uses Podman containers with rootless support
Network Configuration
- Relay Chain: Configurable validators (Alice, Bob, Charlie, Dave)
- Parachains: Multiple parachain support with custom collators
- Chain Types: Rococo-local, Westend-local, Kusama-local, Polkadot-local
- Custom Images: Support for custom Docker images and binaries
Management Tools
- zombienet-manager: CLI tool for network management
- spawn - Start networks
- test - Run test suites
- list - Show available networks
- logs - View network logs
- clean - Cleanup processes
Testing Framework
- ZNDSL Tests: Domain-specific language for network testing
- Block Production: Verify relay chain and parachain block production
- Connectivity: Test node peer connections
- Registration: Verify parachain registration
📋 Usage Examples
Deploy Simple Network
./core/nulib/provisioning taskserv create polkadot-zombienet
# Start simple 2-node network
zombienet-manager spawn
# Start with custom network
zombienet-manager spawn /var/lib/zombienet/networks/parachain-network.toml
Test Networks
# Run basic tests
zombienet-manager test /var/lib/zombienet/test-basic.zndsl
# Run parachain tests
zombienet-manager test /var/lib/zombienet/test-parachain.zndsl
Network Management
# List available networks
zombienet-manager list
# View logs
zombienet-manager logs
# Cleanup
zombienet-manager clean
🎯 Configuration Options
Provider Settings
- provider: native, kubernetes, podman
- timeout: Network spawn timeout (default: 1000s)
- enable_tracing: Enable detailed tracing
- backchannel: Enable node communication backchannel
Relay Chain
- chain: rococo-local, westend-local, kusama-local, polkadot-local
- default_image: Docker image for relay chain nodes
- nodes: Array of validator nodes with custom configurations
Parachains
- id: Parachain ID (1-4000)
- collators: Array of collator nodes
- genesis_wasm: Custom parachain WASM runtime
- balance: Initial parachain balance
Provider-Specific
- Kubernetes: namespace, monitoring, prometheus prefix
- Podman: monitoring port, rootless support
- Native: automatic binary downloads
🚀 Advanced Features
Binary Management
- Automatic download of Polkadot and Parachain binaries
- Version-specific binary support
- Custom binary path configuration
- Symlink management for PATH access
Monitoring & Logging
- Centralized log management
- Provider-specific monitoring (Prometheus, Grafana)
- Network process tracking
- Real-time log tailing
Development Support
- Pre-configured test networks
- XCM testing setup
- Multi-parachain environments
- Custom collator configurations
The service can be deployed using: ./core/nulib/provisioning taskserv create polkadot-zombienet
This provides a complete ephemeral network testing platform for Polkadot/Substrate development, supporting everything from simple
relay chains to complex multi-parachain networks with XCM testing capabilities. Perfect for developers working on parachain
development, cross-chain messaging, and network validation testing.