Skip to content

[BOUNTY] Mining Pool Proxy — Let Small Miners Combine Power (50 RTC)#262

Closed
zhanglinqian wants to merge 3 commits intoScottcjn:mainfrom
zhanglinqian:feat/pool-proxy
Closed

[BOUNTY] Mining Pool Proxy — Let Small Miners Combine Power (50 RTC)#262
zhanglinqian wants to merge 3 commits intoScottcjn:mainfrom
zhanglinqian:feat/pool-proxy

Conversation

@zhanglinqian
Copy link
Contributor

Closes #258

🦞 Mining Pool Proxy for RustChain

Aggregates attestations from multiple miners and distributes rewards proportionally.

🎯 Problem Solved

Individual miners with weak hardware earn tiny rewards. The pool proxy:

  • Allows small miners to combine their computing power
  • Enables more consistent reward payouts
  • Lowers barrier to entry for new miners
  • Increases total network participation

🚀 Quick Start

# Install dependencies
pip install -r requirements-pool.txt

# Start pool server
python3 pool_proxy.py --port 8080

# Connect miners
clawrtc --pool http://localhost:8080

# View dashboard
open http://localhost:8080

✅ Requirements Met

✅ Pool proxy server (standalone Python script)
✅ Accepts attestations from multiple miners
✅ Submits combined attestation to RustChain node
✅ Tracks each miner's contribution (uptime, hardware score)
✅ Distributes epoch rewards proportionally
✅ Pool dashboard (simple web UI)
✅ Connected miners list
✅ Per-miner stats (uptime %, contribution weight)
✅ Total pool rewards
✅ Payout history

📊 Features

  • Hardware score multipliers for vintage hardware (PowerPC, 68K, SPARC)
  • Contribution weight calculation (hardware × uptime × attestations)
  • SQLite database persistence
  • Built-in web dashboard with real-time statistics
  • API endpoints for stats, miners, and rewards
  • Configurable pool fee (default 1%)
  • Test suite for validation
  • Comprehensive documentation

📦 Files Added

  • pool_proxy.py - Main pool server (650+ lines)
  • requirements-pool.txt - Python dependencies
  • POOL_PROXY_README.md - Documentation
  • test_pool_proxy.py - Test suite

Ready for testing!

- Add /api/badge/<wallet> endpoint for shields.io-compatible badge
- Returns JSON with balance, epoch, and mining status (active/inactive)
- Add GitHub Action workflow for badge updates
- Add test script for badge endpoint

Closes Scottcjn#256
- Add Dockerfile for RustChain node with gunicorn
- Add docker-compose.yml with nginx + SSL setup
- Add nginx configuration with reverse proxy and security headers
- Add SSL certificate generation script (self-signed + Let's Encrypt)
- Add .env.example with configuration options
- Add DOCKER_DEPLOYMENT.md with comprehensive documentation
- Add test-docker.sh for deployment validation
- Volume persistence for SQLite database
- Health checks and auto-restart for all services
- Single command deployment: docker-compose up -d

Closes Scottcjn#20
- Add pool_proxy.py main server with Flask
- Accepts attestations from multiple miners
- Tracks miner contributions (uptime, hardware score)
- Calculates contribution weights based on vintage hardware
- SQLite database for persistence
- Built-in web dashboard with statistics
- API endpoints for stats, miners, and rewards
- Hardware score multipliers (PowerPC, 68K, SPARC, etc.)
- Contribution weight calculation (hardware × uptime × attestations)
- Configurable pool fee (default 1%)
- Test script for validation
- Comprehensive documentation

Closes Scottcjn#258
Copy link
Contributor

@liu971227-sys liu971227-sys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking review:

  1. Scope mismatch for this bounty PR
  • PR claims mining pool proxy (#258), but diff also includes Docker deployment, nginx configs, badge workflow, and node integration changes.
  • This mixes unrelated deliverables and makes acceptance/payout mapping ambiguous.
  1. Operational blast radius is too broad for one merge unit
  • Runtime, infra, and feature code are bundled together, which raises rollback and incident risk.

Please split into focused PRs. For this bounty PR, keep only pool-proxy files (pool_proxy.py, tests/docs, and strictly required wiring).

I can re-review quickly after split.

@Scottcjn
Copy link
Owner

Thanks for the submission! Important design concern: RustChain avoids traditional mining pools. Our PoA consensus is 1 CPU = 1 Vote with hardware fingerprinting. Pools create Sybil risk. We would consider an affiliation/guild model instead — miners stay individually attested but share visibility/stats. No single operator controls multiple hardware identities. If you want to rework toward that model, we are interested!

@Scottcjn
Copy link
Owner

Closing — mining pools fundamentally conflict with RustChain's 1 CPU = 1 Vote design. Pools create centralization and Sybil risk. See new bounty for coalitions instead — a governance model where agents form voting blocs while keeping individual hardware identity. Thanks for the effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY] Mining Pool Proxy — Let Small Miners Combine Power (50 RTC)

3 participants