Skip to content

A high-performance stratum mining proxy for triple merged mining of Litecoin (LTC), Dogecoin (DOGE), and Meowcoin (MEWC) using AuxPoW. Mine all three chains simultaneously with the same hashrate!

Notifications You must be signed in to change notification settings

cdonnachie/ltc-auxpow-stratum-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Litecoin Triple Merged Mining Stratum Proxy

A high-performance stratum mining proxy for triple merged mining of Litecoin (LTC), Dogecoin (DOGE), and Meowcoin (MEWC) using AuxPoW. Mine all three chains simultaneously with the same hashrate!

πŸš€ Quick Overview

This proxy enables triple merged mining where you can:

  • βœ… Mine Litecoin (parent chain) with your full hashrate
  • βœ… Simultaneously mine Dogecoin (auxiliary chain) with zero additional work
  • βœ… Simultaneously mine Meowcoin (auxiliary chain) with zero additional work
  • βœ… Find blocks on all three chains with the same Scrypt PoW hash
  • βœ… Earn rewards from up to three chains at once!

How Triple Merged Mining Works

All three chains use the same Scrypt algorithm. Every share your miner produces is checked against all three target difficulties:

Your Miner's Scrypt Hash
    ↓
    β”œβ”€β†’ Check against LTC target  β†’ If met, submit to LTC  β†’ Earn LTC
    β”œβ”€β†’ Check against DOGE target β†’ If met, submit to DOGE β†’ Earn DOGE
    └─→ Check against MEWC target β†’ If met, submit to MEWC β†’ Earn MEWC

πŸ’‘ Same work, triple the earning opportunities!

Block Finding Reality:

  • MEWC blocks: Most common (easiest target)
  • DOGE blocks: Regular (medium target)
  • LTC blocks: Rare but valuable (hardest target)
  • Multiple chains: Sometimes the same hash qualifies for 2 or 3 chains simultaneously = jackpot!

πŸ“‹ Requirements

Docker Setup (Recommended)

  • Docker and Docker Compose installed
  • Linux x86_64 binaries for all three chains (place in binaries/ folder)
  • ~300GB disk space (full nodes) or ~25GB (pruned nodes recommended)
  • 4-6GB RAM
  • Wallet addresses for DOGE and MEWC (generate after first startup)

🏁 Quick Start

Option 1: Docker Compose (Recommended - Full Triple Mining)

Step 1: Place Linux Binaries

You need Linux x86_64 ELF binaries (NOT Windows .exe or macOS binaries):

binaries/
β”œβ”€β”€ litecoin/
β”‚   β”œβ”€β”€ litecoind
β”‚   └── litecoin-cli
β”œβ”€β”€ dogecoin/
β”‚   β”œβ”€β”€ dogecoind
β”‚   └── dogecoin-cli
└── meowcoin/
    β”œβ”€β”€ meowcoind
    └── meowcoin-cli

Step 2: Configure Environment

# Windows
setup.bat

# Linux/Mac
./setup.sh

# This creates .env file with:
# - Random RPC passwords
# - Correct ports (LTC: 9332, DOGE: 22555, MEWC: 9766)
# - Placeholder wallet addresses

Step 3: Start Services

docker compose up -d

Step 4: Wait for Blockchain Sync

Monitor sync progress:

# Watch all services
docker compose logs -f

# Check specific sync status
docker compose exec litecoin litecoin-cli getblockchaininfo | findstr "blocks"
docker compose exec dogecoin dogecoin-cli getblockchaininfo | findstr "blocks"
docker compose exec meowcoin meowcoin-cli getblockchaininfo | findstr "blocks"

Step 5: Generate Wallet Addresses

# Generate Dogecoin address
docker compose exec dogecoin dogecoin-cli getnewaddress

# Generate Meowcoin address
docker compose exec meowcoin meowcoin-cli getnewaddress

# Add these to your .env file:
# DOGE_WALLET_ADDRESS=D...your_address
# MEWC_WALLET_ADDRESS=M...your_address

# Restart proxy to apply
docker compose restart stratum-proxy

Step 6: Connect Your Miner

# Example with cpuminer
minerd -a scrypt -o stratum+tcp://localhost:54321 -u LTC_ADDRESS.worker1 -p x

# Example with HiveOS
# Server: stratum+tcp://YOUR_IP:54321
# Wallet: LTC_ADDRESS.%WORKER_NAME%
# Algorithm: scrypt

### Option 2: Native Python (Advanced Users)

If you already have LTC/DOGE/MEWC nodes running:

```bash
# Install dependencies
pip install -r requirements.txt

# Copy and configure
cp .env.example .env
# Edit .env with your node RPC settings

# Run proxy
python -m ltc_proxy.main

βš™οΈ Configuration

Key Environment Variables

Variable Description Default Notes
Litecoin (Parent Chain)
LTC_RPC_USER / LTC_RPC_PASS LTC node credentials auto-generated Required
LTC_RPC_PORT / LTC_P2P_PORT LTC ports 9332 / 9333 Standard
Dogecoin (Auxiliary Chain 1)
DOGE_RPC_USER / DOGE_RPC_PASS DOGE node credentials auto-generated Required
DOGE_RPC_PORT / DOGE_P2P_PORT DOGE ports 22555 / 22556 Standard
DOGE_WALLET_ADDRESS Your DOGE address blank Must set for DOGE rewards
Meowcoin (Auxiliary Chain 2)
MEWC_RPC_USER / MEWC_RPC_PASS MEWC node credentials auto-generated Required
MEWC_RPC_PORT / MEWC_P2P_PORT MEWC ports 9766 / 9767 Standard
MEWC_WALLET_ADDRESS Your MEWC address blank Must set for MEWC rewards
Stratum Proxy
STRATUM_PORT Miner connection port 54321 Customize if needed
PROXY_SIGNATURE Coinbase signature /your-pool-name/ Max 32 bytes
Mining Settings
USE_EASIER_TARGET Use easiest difficulty true Recommended
SHARE_DIFFICULTY_DIVISOR Share frequency 1000.0 Higher = more shares
ENABLE_VARDIFF Variable difficulty false Per-miner adaptive diff
Advanced
ENABLE_ZMQ Real-time block updates true Better performance
ENABLE_DASHBOARD Web monitoring UI false Access at port 8080
ENABLE_DATABASE Stats persistence false SQLite for history
VERBOSE Debug logging true Helpful for troubleshooting

VarDiff Settings (Optional)

For heterogeneous miners (mixed CPU/GPU/ASIC), enable VarDiff for automatic per-miner difficulty adjustment:

ENABLE_VARDIFF=true
VARDIFF_TARGET_SHARE_TIME=15.0        # Target 15 seconds between shares
VARDIFF_MIN_DIFFICULTY=16             # For low-end GPUs
VARDIFF_MAX_DIFFICULTY=65536          # For high-end ASICs

See .env.example for full VarDiff configuration options.

Pruning (Disk Space Optimization)

To reduce disk usage, enable pruning:

# In .env file:
LTC_PRUNE=10000    # Keep last ~10GB of blocks (minimum: 550 MB)
DOGE_PRUNE=5000    # Keep last ~5GB of blocks (minimum: 2200 MB)
MEWC_PRUNE=2000    # Keep last ~2GB of blocks (minimum: 550 MB)

# Restart services
docker compose down && docker compose up -d

Important Notes:

  • Dogecoin: Minimum prune value is 2200 MB (due to block size)
  • Litecoin/Meowcoin: Minimum prune value is 550 MB
  • Values below minimum will be ignored (node runs as full node)
  • Recommended: Use at least 2-3x the minimum for stable operation

Pruned vs Full Node:

  • Full (~300GB): Supports all RPC calls, helps network
  • Pruned (~25GB): Mining works fine, saves disk space

πŸ” Monitoring & Management

Check Blockchain Sync Status

# Quick status check (all chains)
docker compose exec litecoin litecoin-cli getblockchaininfo | findstr "blocks"
docker compose exec dogecoin dogecoin-cli getblockchaininfo | findstr "blocks"
docker compose exec meowcoin meowcoin-cli getblockchaininfo | findstr "blocks"

# Detailed sync info
docker compose exec litecoin litecoin-cli getblockchaininfo
docker compose exec dogecoin dogecoin-cli getblockchaininfo
docker compose exec meowcoin meowcoin-cli getblockchaininfo

View Logs

# All services
docker compose logs -f

# Specific service
docker compose logs -f stratum-proxy
docker compose logs -f litecoin
docker compose logs -f dogecoin
docker compose logs -f meowcoin

# Last 100 lines
docker compose logs --tail 100 stratum-proxy

Block Submission History

All block submissions are logged to ./submit_history/:

submit_history/
β”œβ”€β”€ LTC_1234567_1759358421.txt    # Litecoin block
β”œβ”€β”€ DOGE_922359_1759358421.txt    # Dogecoin AuxPoW block
└── MEWC_123456_1759358421.txt    # Meowcoin AuxPoW block

Each file contains the full submission details including:

  • Block header
  • Coinbase transaction
  • AuxPoW proof (for DOGE/MEWC)
  • Target and hash values
  • Timestamp

Web Dashboard (Optional)

Enable the web dashboard for real-time monitoring:

# In .env:
ENABLE_DASHBOARD=true
DASHBOARD_PORT=8080
ENABLE_DATABASE=true  # Optional: for historical stats

# Restart
docker compose restart stratum-proxy

# Access at:
http://localhost:8080

Dashboard shows:

  • Real-time hashrate per miner
  • Share submissions and acceptance rate
  • Block finds for all three chains
  • Network difficulties
  • Connected workers

Useful CLI Commands

# Check mining status
docker compose exec litecoin litecoin-cli -datadir=/home/litecoin/.litecoin getmininginfo
docker compose exec dogecoin dogecoin-cli -datadir=/home/dogecoin/.dogecoin getmininginfo
docker compose exec meowcoin meowcoin-cli -datadir=/home/meowcoin/.meowcoin getmininginfo

# Check wallet balances
docker compose exec litecoin litecoin-cli -datadir=/home/litecoin/.litecoin getbalance
docker compose exec dogecoin dogecoin-cli -datadir=/home/dogecoin/.dogecoin getbalance
docker compose exec meowcoin meowcoin-cli -datadir=/home/meowcoin/.meowcoin getbalance

# Check network info
docker compose exec litecoin litecoin-cli -datadir=/home/litecoin/.litecoin getnetworkinfo
docker compose exec dogecoin dogecoin-cli -datadir=/home/dogecoin/.dogecoin getnetworkinfo
docker compose exec meowcoin meowcoin-cli -datadir=/home/meowcoin/.meowcoin getnetworkinfo

# Count peer connections
docker compose exec litecoin litecoin-cli -datadir=/home/litecoin/.litecoin getconnectioncount
docker compose exec dogecoin dogecoin-cli -datadir=/home/dogecoin/.dogecoin getconnectioncount
docker compose exec meowcoin meowcoin-cli -datadir=/home/meowcoin/.meowcoin getconnectioncount

πŸ› Troubleshooting

"Coinbase parts not ready"

Cause: Blockchain nodes still syncing
Solution: Wait for all three chains to fully sync. Check progress with getblockchaininfo

"aux job is stale" messages

Normal: This happens when auxiliary chains find blocks faster than LTC. Proxy auto-refreshes.

Miner can't connect

  • Check firewall allows port 54321 (or your STRATUM_PORT)
  • Verify proxy is running: docker compose ps
  • Check proxy logs: docker compose logs stratum-proxy

Low hashrate showing

  • Increase SHARE_DIFFICULTY_DIVISOR for more frequent share submissions
  • Check miner is using scrypt algorithm
  • Verify miner connection is stable

Binary format errors

Cause: Wrong binaries (Windows .exe or macOS instead of Linux ELF)
Solution: Download Linux x86_64 binaries:

# Check binary format
file binaries/litecoin/litecoind

# Should show:
# ELF 64-bit LSB executable, x86-64

Auxiliary blocks not submitting

  • Verify wallet addresses are set in .env
  • Check DOGE_WALLET_ADDRESS and MEWC_WALLET_ADDRESS are valid
  • Restart proxy after changing addresses: docker compose restart stratum-proxy

High disk usage

  • Enable pruning (see Configuration section)
  • Check Docker volume sizes: docker system df -v
  • Clean old data: docker system prune -a --volumes (⚠️ deletes blockchain data!)

ZMQ connection issues

Symptoms: "Failed to connect to ZMQ endpoint" in logs
Solution: ZMQ endpoints are internal to Docker network, should work automatically. If issues persist:

# Restart all services
docker compose down && docker compose up -d

πŸ“Š Understanding Triple Mining

How Difficulty Works

Each chain has its own target difficulty, but all use the same Scrypt PoW hash:

Litecoin:   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ (hardest - highest security)
Dogecoin:   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ (medium - balanced)
Meowcoin:   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ (easiest - lowest difficulty)

Your Hash:  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
            ↓
            βœ“ Beats MEWC β†’ Submit to MEWC
            βœ“ Beats DOGE β†’ Submit to DOGE
            βœ— Doesn't beat LTC β†’ No LTC submission this time

Expected Block Finding Rates

Based on typical network difficulties:

Chain Approximate Frequency Value Notes
MEWC Every few hours Lower Most common finds, good for morale
DOGE Every few days Medium Regular rewards, good liquidity
LTC Every few weeks Highest Rare but most valuable

Actual rates depend on your hashrate and network difficulty

AuxPoW Structure

When submitting to auxiliary chains, the proxy creates an AuxPoW proof:

AuxPoW Proof Contains:
β”œβ”€β”€ Parent (LTC) Coinbase Transaction
β”‚   └── Contains commitment to auxiliary block hash
β”œβ”€β”€ Merkle Branch (coinbase to merkle root)
β”œβ”€β”€ AUX Merkle Branch (for chain ID commitment)
└── Parent Block Header (80 bytes)
    └── Used for difficulty validation

Key Points:

  • LTC blocks contain the work for all three chains
  • DOGE and MEWC get the same Scrypt PoW as LTC
  • Each auxiliary chain commits independently (no tree between aux chains)
  • Chain IDs: DOGE=62, MEWC=9

πŸ”§ Advanced Configuration

Custom RPC Hosts

If running nodes on different machines:

# In .env:
LTC_RPC_HOST=192.168.1.100
DOGE_RPC_HOST=192.168.1.101
MEWC_RPC_HOST=192.168.1.102

Testnet Mode

TESTNET=true

ZMQ Endpoints

The proxy uses ZMQ for instant block notifications (better than polling):

ENABLE_ZMQ=true
LTC_ZMQ_ENDPOINT=tcp://litecoin:28332
DOGE_ZMQ_ENDPOINT=tcp://dogecoin:28332
MEWC_ZMQ_ENDPOINT=tcp://meowcoin:28332

Notifications

Get notified when blocks are found:

# Discord
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

# Telegram
TELEGRAM_BOT_TOKEN=123456789:ABCdef...
TELEGRAM_CHAT_ID=123456789

πŸ“ Project Structure

ltc-auxpow-stratum-proxy/
β”œβ”€β”€ docker-compose.yml           # Main Docker Compose configuration
β”œβ”€β”€ .env.example                 # Environment template
β”œβ”€β”€ .env                         # Your configuration (created by setup scripts)
β”œβ”€β”€ Dockerfile                   # Stratum proxy container
β”œβ”€β”€ Dockerfile.litecoin          # Litecoin node container
β”œβ”€β”€ Dockerfile.dogecoin          # Dogecoin node container
β”œβ”€β”€ Dockerfile.meowcoin          # Meowcoin node container
β”œβ”€β”€ entrypoint.sh                # Proxy startup script
β”œβ”€β”€ entrypoint-litecoin.sh       # Litecoin node startup
β”œβ”€β”€ entrypoint-dogecoin.sh       # Dogecoin node startup
β”œβ”€β”€ entrypoint-meowcoin.sh       # Meowcoin node startup
β”œβ”€β”€ health-check.sh              # Container health checks
β”œβ”€β”€ setup.sh / setup.bat         # Setup scripts
β”œβ”€β”€ test-cli.sh / test-cli.bat   # CLI testing scripts
β”œβ”€β”€ requirements.txt             # Python dependencies
β”œβ”€β”€ binaries/                    # Blockchain binaries (you provide)
β”‚   β”œβ”€β”€ litecoin/
β”‚   β”œβ”€β”€ dogecoin/
β”‚   └── meowcoin/
β”œβ”€β”€ config/                      # Configuration templates
β”‚   β”œβ”€β”€ litecoin.conf
β”‚   β”œβ”€β”€ dogecoin.conf
β”‚   └── meowcoin.conf
β”œβ”€β”€ data/                        # Database and state
β”‚   β”œβ”€β”€ mining.db
β”‚   └── vardiff_state.json
β”œβ”€β”€ ltc_proxy/                   # Main application
β”‚   β”œβ”€β”€ consensus/               # Block building & AuxPoW
β”‚   β”œβ”€β”€ rpc/                     # Blockchain RPC clients
β”‚   β”œβ”€β”€ state/                   # Template management
β”‚   β”œβ”€β”€ stratum/                 # Stratum protocol
β”‚   β”œβ”€β”€ utils/                   # Utilities (hashing, encoding)
β”‚   β”œβ”€β”€ web/                     # Dashboard (optional)
β”‚   └── zmq/                     # Block notifications
└── submit_history/              # Block submission logs
    β”œβ”€β”€ LTC_*.txt
    β”œβ”€β”€ DOGE_*.txt
    └── MEWC_*.txt

πŸš€ Performance Tips

  1. Enable ZMQ: Provides instant block updates (default: enabled)
  2. Use SSD storage: Much faster blockchain sync
  3. Enable pruning: Reduces disk I/O for non-archival needs
  4. Adjust VarDiff: Optimize for your miner mix (CPU/GPU/ASIC)
  5. Monitor share rate: Increase SHARE_DIFFICULTY_DIVISOR if too few shares

πŸ”’ Security

  • Change default RPC passwords (setup scripts do this automatically)
  • Use firewall rules to restrict RPC port access
  • Keep wallet backups secure and offline
  • Monitor logs for suspicious activity
  • Update binaries regularly for security patches

πŸ“š Additional Resources

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

MIT License - See LICENSE file for details

⚠️ Disclaimer

This software is provided "as is" without warranty. Cryptocurrency mining involves financial risk. Always:

  • Test with small amounts first
  • Secure your private keys
  • Understand the risks
  • Monitor your systems
  • Keep backups

Happy Triple Mining! πŸŽ‰

Questions? Issues? Check the logs first, then open an issue on GitHub!

About

A high-performance stratum mining proxy for triple merged mining of Litecoin (LTC), Dogecoin (DOGE), and Meowcoin (MEWC) using AuxPoW. Mine all three chains simultaneously with the same hashrate!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages