Mining Pool Integration
Bitcoin miners can simultaneously mine ELA blocks without additional computational resources. This guide explains how to integrate merged mining into your pool.
What is Merged Mining?
Merged mining (also called Auxiliary Proof of Work) allows a miner to use the same SHA-256 work to produce blocks on both Bitcoin and Elastos. The miner submits proof of work to both networks -- no extra hash power required.
- ELA blocks are produced approximately every 2 minutes
- Block size limit: 8 MB
- Hash algorithm: SHA-256 (same as Bitcoin)
- Current block reward: decreasing annually per emission schedule
How It Works
- Your pool software constructs a Bitcoin block template as usual
- It also constructs an ELA auxiliary block header
- The ELA header hash is embedded in the Bitcoin coinbase transaction as an
OP_RETURNoutput - When Bitcoin PoW is solved, the proof is valid for both chains
- Submit the auxiliary proof to the ELA network via the
submitauxblockRPC
Integration Steps
1. Set Up an ELA Node
You need a running ELA mainchain node. See the ELA Full Node guide.
Ensure the node is fully synced before mining.
2. Configure Merged Mining
In your ELA node's config.json, enable the mining RPC:
{
"Configuration": {
"EnableRPC": true,
"RPCUser": "your-rpc-user",
"RPCPass": "your-rpc-password",
"RPCPort": 20336
}
}
3. Pool Software Integration
Your pool software needs to call two ELA RPC methods:
| Method | Purpose |
|---|---|
createauxblock | Get an auxiliary block template (returns hash and other fields) |
submitauxblock | Submit a solved auxiliary block with Bitcoin's PoW |
Get auxiliary block:
curl -X POST http://localhost:20336 \
-H "Content-Type: application/json" \
-d '{"method": "createauxblock", "params": {"paytoaddress": "YOUR_ELA_ADDRESS"}}'
Submit solved block:
curl -X POST http://localhost:20336 \
-H "Content-Type: application/json" \
-d '{"method": "submitauxblock", "params": {"blockhash": "...", "auxpow": "..."}}'
4. Reward Distribution
Mined ELA goes to the paytoaddress specified in createauxblock. Configure your pool's payout system to distribute ELA rewards to miners alongside Bitcoin rewards.
Compatible Pool Software
Most Bitcoin mining pool software that supports auxiliary/merged mining can be adapted for ELA. The integration follows the standard Namecoin-style merged mining protocol.
Resources
- ELA GitHub -- mainchain source code
- ELA Full Node Setup -- node deployment guide
- Mainchain API -- full RPC reference