This repository contains a complete testing environment for the WORM Shai-Hulud incentivized testnet, including:
- Official WORM miner (via git submodule for security)
- Web-based React UI with MetaMask integration
- Backend API server for WORM operations
- Docker containerization for easy deployment
- Automated shell scripts for all operations
The React-based web interface provides an intuitive way to interact with the WORM testnet, featuring MetaMask integration, real-time balance updates, and comprehensive mining operations.
- β Git Submodule: Uses official WORM miner repository (no copied code)
- β Verifiable: Users can verify the miner code authenticity
- β Secure: No risk of malicious modifications to core miner code
- β Updated: Automatically tracks official repository updates
This project follows security best practices by using git submodules instead of copying code, ensuring users can trust they're running the authentic WORM miner without any modifications.
worm-testing/
βββ miner/ # Official WORM miner (git submodule)
βββ scripts/ # Shell script wrappers
βββ ui/
β βββ backend/ # Node.js Express API server
β βββ frontend/ # React TypeScript UI
βββ docker-compose.yml # Docker orchestration
βββ Dockerfile.miner # WORM miner container
βββ docs/ # Documentation
βββ logs/ # Operation logs
βββ .env.example # Environment template
βββ README.md # This file
- Machine: x86-64 architecture (VPS, dedicated server, or local machine)
- RAM: Minimum 16GB
- OS: Debian/Ubuntu recommended
- Docker & Docker Compose: For containerized setup (recommended)
- MetaMask: Browser extension for UI testing
- Sepolia ETH: 1.0+ testnet ETH from faucets
# Clone with submodules
git clone --recursive https://github.com/2Rebfl/worm-testing.git
cd worm-testing
# Configure environment
cp .env.example .env
# Edit .env with your private key
# Start everything with Docker
docker-compose up -d
# Download WORM parameters (one-time setup)
docker exec worm-miner worm-miner-download-artifacts
# Access the UI
open http://localhost:3000- β No local dependencies (Rust, Node.js, etc.)
- β Consistent environment across all machines
- β Easy deployment with single command
- β Automatic networking between services
- β Volume persistence for WORM data
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Rebuild after changes
docker-compose build
# Execute worm-miner commands
docker exec worm-miner worm-miner info --network sepolia --private-key YOUR_KEY# Install system dependencies
sudo apt update
sudo apt install -y build-essential cmake libgmp-dev libsodium-dev nasm curl m4 git wget unzip nlohmann-json3-dev
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
# Install Node.js (if not already installed)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs# Initialize and update git submodules
git submodule update --init --recursivecd miner
make download_params # Downloads 5GB+ parameter files
cargo install --path .
cd ..# Copy and edit environment file
cp .env.example .env
# Edit .env with your private key and settings# Backend dependencies
cd ui/backend
npm install
cd ../frontend
# Frontend dependencies
npm install --legacy-peer-deps
cd ../..# Check account info
./scripts/info.sh
# Burn ETH to BETH
./scripts/burn.sh 1 0.999 0.001
# Participate in mining
./scripts/participate.sh 0.1 3
# Claim rewards
./scripts/claim.sh 0 1# Terminal 1: Start backend API server
cd ui/backend
npm start
# Server runs on http://localhost:3001
# Terminal 2: Start frontend development server
cd ui/frontend
npm start
# UI available at http://localhost:3000- Open Browser: Navigate to
http://localhost:3000 - Connect Wallet: Click "Connect Wallet" and connect MetaMask to Sepolia
- View Account: See BETH/WORM balances and current epoch
- Burn ETH: Convert Sepolia ETH to BETH for mining
- Mine WORM: Participate in mining epochs
- Claim Rewards: Claim earned WORM tokens
The backend server provides REST API endpoints:
GET /api/account/info- Get account informationGET /api/account/coins- List unspent coins
POST /api/worm/burn- Burn ETH to BETHPOST /api/worm/participate- Participate in miningPOST /api/worm/claim- Claim WORM rewardsPOST /api/worm/spend- Spend from coinsPOST /api/worm/recover- Recover failed burns
GET /api/health- Server health status
- Account Overview: Real-time balance display
- Burn ETH Tab: Convert ETH to BETH with form validation
- Mine WORM Tab: Participate in mining epochs
- Claim Rewards Tab: Claim earned tokens
- Mining Status: View active epoch participation
- MetaMask Integration: Seamless wallet connection
- Sepolia Network: Automatic network switching
- Real-time Updates: 30-second data refresh
- Error Handling: Comprehensive error states
- Responsive Design: Mobile-friendly interface
- TypeScript: Full type safety
- Material-UI: Professional component library
- Duration: 30 minutes each
- Rewards: 50 WORM per epoch (fixed pool)
- Distribution: Proportional to BETH committed
- Participation: Commit BETH for multiple epochs
Total Epoch Pool: 50 WORM
Your BETH: 1.0
Total BETH: 5.0
Your Reward: (1.0/5.0) Γ 50 = 10 WORM
# .env file contains sensitive data
PRIVATE_KEY=your_sepolia_private_key_here
NETWORK=sepolia- Never share private keys
- Use dedicated testnet wallet
- Store burn keys securely
- Monitor transaction logs
cd ui/backend
npm run dev # Development mode with auto-reloadcd ui/frontend
npm start # Development server with hot reload
npm run build # Production build
npm test # Run test suite- Backend: Add routes in
ui/backend/server.js - Frontend: Create components in
ui/frontend/src/components/ - Scripts: Add shell wrappers in
scripts/
All operations are logged to the logs/ directory:
worm-operations.log- All WORM operationsapi-requests.log- Backend API requestserrors.log- Error tracking
# OpenSSL issues
sudo apt install libssl-dev pkg-config
# Parameter download fails
cd miner && make download_params# Dependency conflicts
npm install --legacy-peer-deps
# TypeScript errors
npm run build- Ensure MetaMask is installed
- Switch to Sepolia testnet
- Check account has Sepolia ETH
- Check logs in
logs/directory - Review console output for errors
- Verify environment configuration
- Consistent Participation: Mine regularly across epochs
- Test All Features: Use both CLI and UI interfaces
- Report Issues: Document bugs and improvements
- Community Engagement: Join Discord/Telegram
- Environment setup complete
- Successful ETH burns
- Mining participation
- WORM rewards claimed
- UI functionality tested
- All features working
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
- β Free to use: You can use this software for any purpose
- β Free to modify: You can modify and distribute the software
- β Free to distribute: You can share the software with others
β οΈ Copyleft: Any modifications must also be licensed under AGPLv3β οΈ Network use: If you run this on a server, you must provide source code to users
See the LICENSE file for the complete license text.
- WORM Miner: Uses official WORM repository (via git submodule)
- React & Dependencies: Various open source licenses (see package.json files)
- Docker Base Images: Respective open source licenses
- WORM GitHub: https://github.com/worm-privacy/shaihulud
- Sepolia Faucets:
- Sepolia Explorer: https://sepolia.etherscan.io
- Security: Replaced copied code with official git submodule
- Docker: Complete containerization with Docker Compose
- Trust: Users can verify authentic WORM miner code
- Deployment: One-command setup with Docker
- Maintenance: Automatic updates from official repository
- Fixed: "Cannot claim an ongoing epoch!" error resolved
- Enhanced: Proper handling of ongoing vs completed epochs
- Improved: Better error handling for contract business rules
- Added: Visual indicators for epoch status in UI
- Updated: Contract service with correct ABI definitions
β Complete WORM Testing Environment Ready
This setup provides everything needed to participate in the WORM Shai-Hulud testnet with both command-line and web interfaces. The React UI offers a user-friendly way to perform all WORM operations while the CLI provides direct access for advanced users.
Latest Version: Secure, containerized setup with official WORM miner code and comprehensive Docker support.
Happy Testing! πβοΈ
