Skip to main content
HOW-TO
MAIN CHAIN

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.

Key Numbers
  • 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​

  1. Your pool software constructs a Bitcoin block template as usual
  2. It also constructs an ELA auxiliary block header
  3. The ELA header hash is embedded in the Bitcoin coinbase transaction as an OP_RETURN output
  4. When Bitcoin PoW is solved, the proof is valid for both chains
  5. Submit the auxiliary proof to the ELA network via the submitauxblock RPC

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:

MethodPurpose
createauxblockGet an auxiliary block template (returns hash and other fields)
submitauxblockSubmit 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​