Decentralized pool mining software for Dash cryptocurrency.
The installation guide covers:
- ✅ System requirements and dependencies
- ✅ Dash Core installation and configuration
- ✅ Python 2.7 / PyPy setup (modern Ubuntu/Debian)
- ✅ dash_hash module compilation
- ✅ Standalone vs Multi-node configuration
- ✅ Common issues and solutions (OpenSSL, missing modules, etc.)
- ✅ Performance tuning and security
- Dash Core: >=23.0.0 (Protocol 70238+)
- Python: 2.7 (via PyPy recommended)
- Twisted: >=19.10.0
- pycryptodome: >=3.9.0
- dash_hash: X11 hashing module (included as submodule)
- ✅ ASICBOOST Support: Full BIP320 version-rolling implementation
- ✅ Modern ASIC Compatible: Works with Antminer D3/D5/D7
- ✅ Enhanced Difficulty Control: Support for +difficulty and /difficulty modifiers
- ✅ Variable Difficulty: Configurable vardiff with --share-rate parameter
- ✅ Backward Compatible: CPU/GPU miners still supported
Python 2 is no longer available. Use PyPy:
# Install PyPy
sudo snap install pypy --classic
# Install dependencies
pypy -m pip install twisted==19.10.0 pycryptodome
# Clone and setup
git clone https://github.com/dashpay/p2pool-dash.git
cd p2pool-dash
git submodule init
git submodule update
# Build dash_hash
cd dash_hash
pypy setup.py install --user
cd ..
# Run P2Pool
pypy run_p2pool.py --net dash -a YOUR_DASH_ADDRESSSee INSTALL.md for detailed instructions.
For Ubuntu 24.04 systems, we provide an automated installer script that sets up PyPy2, builds a local OpenSSL 1.1, and configures p2pool with systemd integration:
./install_p2pool_ubuntu_2404.shIf Python 2.7 is still available:
sudo apt-get install python2 python2-dev python2-twisted python2-pip gcc g++
git clone https://github.com/dashpay/p2pool-dash.git
cd p2pool-dash
git submodule init && git submodule update
cd dash_hash && python2 setup.py install --user && cd ..
python2 run_p2pool.py --net dash -a YOUR_DASH_ADDRESSPoint your miner to:
stratum+tcp://YOUR_IP:7903
Username: Your Dash address
Password: anything
You can append difficulty modifiers to your Dash address:
Pseudoshare difficulty (for vardiff tuning):
YOUR_ADDRESS+DIFFICULTY
Example: XdgF55wEHBRWwbuBniNYH4GvvaoYMgL84u+4096
Actual share difficulty (fixed minimum):
YOUR_ADDRESS/DIFFICULTY
Example: XdgF55wEHBRWwbuBniNYH4GvvaoYMgL84u/65536
Worker names (for monitoring):
YOUR_ADDRESS.worker_name
Example: XdgF55wEHBRWwbuBniNYH4GvvaoYMgL84u.antminer1
Edit p2pool/networks/dash.py:
PERSIST = False # No peers requiredEdit p2pool/networks/dash.py:
PERSIST = True # Connect to P2Pool network- Delete old sharechain data:
data/dash/shares.*anddata/dash/graph_db - Old shares are incompatible due to
_scriptfield changes - All nodes in the P2Pool network must update together
- Protection: Incompatible shares are validated and rejected BEFORE entering sharechain
- Outdated peers receive clear upgrade instructions in logs
For detailed configuration, see INSTALL.md.
pypy run_p2pool.py --helpCommon options:
--net dash- Use Dash mainnet--net dash_testnet- Use Dash testnet-a ADDRESS- Your Dash payout address--dashd-rpc-port 9998- Dash RPC port (default: 9998)--dashd-address 127.0.0.1- Dash RPC address--share-rate SECONDS- Target seconds per pseudoshare (default: 10)
All issues and solutions are documented in INSTALL.md, including:
- ❌
ImportError: No module named dash_hash→ Rebuild dash_hash module - ❌
AttributeError: ComposedWithContextualOptionalsType→ Update to latest version - ❌
ValueError: Block not found→ Update to commit e9b5f57+ - ❌
ImportError: No module named bitcoin→ Update to latest version - ❌
ImportError: No module named OpenSSL→ Non-fatal, can ignore or see INSTALL.md - ✅
p2pool is not connected to any peers→ Fixed! No longer blocks work generation - ❌ High CPU usage → Limit miner threads with
-tflag
See INSTALL.md for complete troubleshooting guide.
- ✅ Missing type classes in pack.py (ComposedWithContextualOptionalsType, ContextualOptionalType, BoolType)
- ✅ Wrong module import (bitcoin → dash)
- ✅ Block hash formatting (zero-padding)
- ✅ Empty payee address handling
- ✅ Removed defunct bootstrap nodes
- ✅ Standalone mode support (PERSIST=False)
- ✅ Enhanced difficulty control (+diff, /diff modifiers)
- ✅ X11 DUMB_SCRYPT_DIFF constant for accurate difficulty display
- ✅ Worker IP tracking infrastructure
- ✅ Configurable vardiff with --share-rate parameter (default: 10 seconds)
- ✅ Improved min_share_target bounds for better difficulty adjustment
- ✅ Fixed Dash-specific got_response() signature compatibility
- ✅ Block luck calculation with time-weighted average hashrate
- ✅ Hashrate sampling for precise luck statistics
- ✅ Telegram notifications for block announcements
- ✅ Block status tracking (confirmed/orphaned/pending)
- ✅ Dash Platform support (v20+): Handles OP_RETURN platform payments (22.5% block subsidy)
- ✅ Packed object compatibility: Fixed share verification for _script field handling
- ✅ Mainnet ready: Full support for masternode/platform/superblock payment structures
- ✅ Solo mining support: Removed peer connection requirement - works standalone with PERSIST=True
- ✅ Incompatible share protection: Pre-validation prevents outdated shares from entering sharechain
- ✅ Smart peer connections: Temporary bans for failing peers, counts total connections (incoming+outgoing)
If behind NAT, forward these ports:
- 8999: P2Pool P2P (for peer connections)
- 7903: Stratum (for miners)
Do NOT forward port 9998 (Dash RPC - security risk)
P2Pool provides a web interface at http://YOUR_IP:7903/:
/static/index.html- Classic status page/static/dashboard.html- Modern dashboard with graphs/static/graphs.html- Detailed statistics graphs
/local_stats- Local node statistics/global_stats- Pool-wide statistics/recent_blocks- Recently found blocks with luck info/current_payouts- Current payout distribution/hashrate_samples- Hashrate sampling stats for luck calculation/block_history- Historical block data
Block luck shows how "lucky" the pool was finding each block:
- >100% (green): Found faster than expected
- 75-100% (yellow): Normal range
- <75% (red): Found slower than expected
Luck is calculated using: (expected_time / actual_time) × 100%
The pool uses three methods for hashrate estimation (in order of preference):
- Time-weighted average: Uses actual hashrate samples between blocks (most precise)
- Simple average: Average of hashrates at previous and current block
- Single hashrate: Fallback to current pool hashrate
To enable Telegram block announcements:
- Create a bot via @BotFather
- Edit
data/dash/telegram_config.json:
{
"enabled": true,
"bot_token": "YOUR_BOT_TOKEN",
"chat_id": "YOUR_CHAT_ID"
}The Stratum interface includes intelligent threat detection that monitors connection patterns per IP address. The system calculates a connection-to-worker ratio to distinguish between:
- Normal: Legitimate multi-rig miners (e.g., 7 connections running 7 unique workers = 1:1 ratio)
- Elevated: Suspicious patterns (e.g., 10 connections but only 2 workers = 5:1 ratio)
- High: Likely attack or misconfiguration (e.g., 20 connections with 3 workers = 6.7:1 ratio)
Thresholds are configurable per network in p2pool/networks/*.py:
# Default values (dash.py)
CONNECTION_WORKER_ELEVATED = 4.0 # Flag if >4 connections per worker
CONNECTION_WORKER_WARNING = 6.0 # Flag as high if >6 connections per workerThis ensures legitimate miners running multiple machines from the same IP are not incorrectly flagged as threats, while still detecting actual connection flooding attempts.
P2Pool stores all found blocks in data/dash/block_history.json for permanent record-keeping. This allows the web interface to display complete historical data including:
- Block height, hash, and timestamp
- Network difficulty and block reward
- Pool hashrate at the time of discovery
- Block status (confirmed/orphaned/pending)
- Luck calculation with time-weighted averages
If you want to add previously mined blocks to the persistent history (e.g., after a fresh install), use the populate_block_history.py utility:
# Create a file with block heights (one per line)
cat > historical_blocks.txt <<EOF
2389670
2389615
2389577
EOF
# Populate block history from blockchain
pypy populate_block_history.py \
--datadir data/dash \
--blocks-file historical_blocks.txt \
--dashd-rpc-username YOUR_RPC_USER \
--dashd-rpc-password YOUR_RPC_PASSOr specify blocks directly:
pypy populate_block_history.py \
--datadir data/dash \
--blocks 2389670,2389615,2389577 \
--dashd-rpc-username YOUR_RPC_USER \
--dashd-rpc-password YOUR_RPC_PASSThe script will query dashd to fetch block rewards, timestamps, and difficulty, then merge this data into your block history. This ensures consistent graphs and statistics even for blocks found before the current p2pool installation.
https://en.bitcoin.it/wiki/P2Pool
- https://github.com/hardcpp/P2PoolExtendedFrontEnd
- https://github.com/johndoe75/p2pool-node-status
- https://github.com/justino/p2pool-ui-punchy
Thanks to:
- The Bitcoin Foundation for its generous support of P2Pool
- The Litecoin Project for its generous donations to P2Pool
- The Vertcoin Community for its great contribution to P2Pool
- jakehaas, vertoe, chaeplin, dstorm, poiuty, elbereth and mr.slaveg from the Darkcoin/Dash Community