AuxPoW Integration
Status: Built, not yet activated on mainnet. Active on testnet from block 1000 and regtest from genesis.
Tidecoin AuxPoW integration is a protocol flow: get a Tidecoin candidate, commit its hash in the parent coinbase, build the parent merkle root, mine a parent scrypt header, serialize the AuxPoW proof, and submit it to Tidecoin.
This page describes the protocol contract. It does not document any specific pool codebase.
Candidate Creation
Create a candidate with an explicit Tidecoin payout address:
tidecoin-cli createauxblock "<tidecoin-payout-address>"The result includes:
| Field | Use |
|---|---|
hash | Tidecoin aux block hash to commit in the parent coinbase. |
chainid | Must be 8 for Tidecoin. |
previousblockhash | Tidecoin parent tip used by the candidate. |
coinbasevalue | Tidecoin block subsidy and fees for the candidate. |
bits | Tidecoin target in compact form. |
height | Tidecoin candidate height. |
_target | Deprecated full target representation. |
If the Tidecoin tip changes, refresh the candidate. Tidecoin rejects stale candidate hashes that are no longer known to the AuxPoW RPC cache.
Parent Coinbase Commitment
Tidecoin searches the parent coinbase input script for the merged-mining marker:
fa be 6d 6dThe marker must appear exactly once and immediately before the aux-chain merkle root.
For a single auxiliary chain, the commitment blob is:
fabe6d6d || tide_aux_hash_display_order || 01000000 || 00000000| Field | Size | Meaning |
|---|---|---|
fabe6d6d | 4 bytes | Merged-mining marker. |
tide_aux_hash_display_order | 32 bytes | Tidecoin candidate hash in the order returned by RPC. |
01000000 | 4 bytes | Aux chain merkle tree size, little-endian 1. |
00000000 | 4 bytes | Aux chain merkle nonce, little-endian 0. |
For multiple auxiliary chains, replace the direct Tidecoin hash with the
aux-chain merkle root, set size = 1 << chain_merkle_branch_height, choose a
nonce, and set Tidecoin’s chain index to
CAuxPow::getExpectedIndex(nonce, 8, height).
Parent Coinbase Shape
A real parent coinbase must remain valid for the parent chain. A typical Stratum split is:
coinbase = coinbase1 || extranonce1 || extranonce2 || coinbase2The parent coinbase script usually contains:
- parent-chain BIP34 height push;
- optional compatibility fields such as timestamp;
- miner-controlled extranonce bytes;
- a push containing the merged-mining commitment blob.
The merged-mining marker and root only need to be present in the script byte stream where Tidecoin can find them. They do not need to be a standalone output.
Parent Merkle Root
After miners fill extranonce and nonce fields:
- Reconstruct the full parent coinbase transaction.
- Compute the coinbase transaction hash.
- Combine it with the parent template transaction merkle branch.
- Put the resulting merkle root into the parent 80-byte header.
- Mine the parent header with scrypt.
The coinbase merkle branch submitted in AuxPoW must prove the coinbase
transaction at index 0 into the parent header’s merkle root. Use the same hash
byte order that the parent header uses for its merkle root field.
AuxPoW Serialization
Tidecoin’s CAuxPow serialization order is:
parent coinbase transaction
hashBlock
coinbase merkle branch vector
nIndex
chain merkle branch vector
nChainIndex
parent block headerFor the common single-chain case:
| Field | Value |
|---|---|
| parent coinbase transaction | The real parent coinbase containing the Tidecoin commitment. |
hashBlock | Legacy MerkleTx field. Tidecoin does not use it for AuxPoW validity. |
| coinbase merkle branch | Branch from parent coinbase txid to parent header merkle root. |
nIndex | 0, because the parent coinbase is transaction index 0. |
| chain merkle branch | Empty. |
nChainIndex | 0. |
| parent block header | The mined 80-byte scrypt parent header. |
Submit with:
tidecoin-cli submitauxblock "<tide_aux_hash>" "<serialized_auxpow_hex>"Validation Checks
Tidecoin verifies:
- AuxPoW is active at the candidate height.
- The block version has the AuxPoW flag.
- The block version encodes chain ID
8. - The parent chain ID is not Tidecoin’s chain ID under strict checks.
- The parent coinbase contains exactly one merged-mining marker.
- The marker is immediately before the aux-chain merkle root.
- The coinbase merkle branch reaches the parent header merkle root.
- The chain merkle tree size and nonce match
nChainIndex. - The parent scrypt proof satisfies Tidecoin’s target.
Reorg and Refresh Rules
- Refresh Tidecoin candidates when the Tidecoin tip changes.
- Refresh parent jobs when the parent tip, parent transactions, parent time, or parent payout script changes.
- Treat transport errors during
submitauxblockas ambiguous until reconciled from the chain. - Do not pay miners solely because a share was submitted; pay according to the pool’s confirmed or maturity-adjusted accounting policy.
Source Cross-Checks
| Topic | Source |
|---|---|
| Tidecoin AuxPoW validation | ../tidecoin/src/auxpow.cpp |
| Tidecoin AuxPoW serialization | ../tidecoin/src/auxpow.h |
| AuxPoW RPC cache and submission | ../tidecoin/src/rpc/auxpow_miner.cpp |
| Functional-test minimal AuxPoW | ../tidecoin/test/functional/test_framework/auxpow.py |
| Pool protocol reference example | ../../pool/liquidpool/crates/mm_auxpow_tide/src/lib.rs |
| Parent coinbase split example | ../../pool/liquidpool/crates/mm_engine_bells_tide/src/bells_coinbase.rs |
See also: Protocol / AuxPoW, Mining Pool Operator Guide, RPC Reference.