Taproot coinbase
Taproot outputs in a coinbase transaction, and what they can and cannot do for a decentralized pool
Using Taproot addresses in the coinbase transaction to represent multiple outputs or facilitate multiple transactions is technically feasible and offers several benefits in terms of efficiency and privacy.
Single Taproot Address for Multiple Outputs
A Taproot address, derived from a Schnorr public key combined with MAST (Merkelized Abstract Syntax Trees), can hide complex spending conditions under a single address. This means you could potentially pay multiple parties from a single Taproot output by encoding different conditions into the script-path spending of that output. However, the output is spent as a whole: whoever satisfies one of the conditions spends all of it, so any split between the parties has to be made in the outputs of the spending transaction.
Multiple Taproot Addresses in Coinbase
You can also use multiple Taproot addresses directly in the outputs of a coinbase transaction, similar to using multiple legacy or SegWit addresses. Each output can point to a different Taproot address, allowing the transaction to distribute block rewards to multiple entities or addresses, each with its own set of complex spending conditions encoded via Taproot.
Advantages
- Privacy: Taproot addresses can provide better privacy since conditions under which the coins are spent can be hidden unless they become relevant (i.e., when they are actually used in a transaction).
- Efficiency: Taproot can make use of Schnorr signatures, which are more efficient in terms of space and verification time compared to the ECDSA signatures used in traditional Bitcoin transactions.
Usage Considerations
When using a single Taproot address to encode multiple payment conditions, it's crucial that the conditions are structured such that they do not unnecessarily complicate the spending of funds. The key idea is to maintain transaction efficiency while leveraging Taproot's ability to simplify complex transactions.
To summarize, you can use one or two Taproot addresses in a coinbase transaction either by pointing multiple outputs to different Taproot addresses or by using one Taproot address to cover multiple spending conditions within a single output. This setup can be particularly useful for mining pools looking to streamline payouts and enhance privacy and security of the transactions.
A Taproot address itself is a type of Bitcoin address that starts with “bc1p” and uses the Bech32m format for encoding. Unlike traditional addresses, a Taproot address can represent more complex scripts in a more space-efficient and privacy-preserving way, using a Schnorr public key that can also commit to a MAST of scripts.
Example of a Taproot Transaction Structure
Inputs
- Input 1: Txid (transaction ID from a previous transaction); Vout (output index in the previous transaction); ScriptSig: empty (a Taproot spend carries its data in the witness); Witness: contains the Schnorr signature and possibly other components if the script-path spending is utilized.
- Input 2: Another input following the same format.
Outputs
- Output 1: Value (amount of bitcoins to be sent); ScriptPubKey:
OP_1 <32-byte x-only output key>(34 bytes:51 20 …), the format of a Taproot output script, which only becomes complex if script-path spending is triggered. - Output 2: Another output with its value and Taproot script.
Detailed Walkthrough
Txid and Vout: Each input references a previous transaction's output. These are spent using the inputs in the new transaction.
ScriptSig: Taproot transactions typically have an empty ScriptSig because the script validation relies on the witness part of the transaction.
Witness: Contains the Schnorr signature that proves ownership of the Taproot public key. If complex conditions are used (script-path spending), the relevant scripts and signatures are included here.
Outputs: Each output specifies how many bitcoins are being sent and to which address (represented by the Taproot public key). The ScriptPubKey for Taproot outputs is simplified to OP_1 <Taproot public key>, enabling potential complex conditions to be handled in the witness data if script-path spending is activated.
This structure allows for sophisticated conditions embedded within the outputs that aren't visible until they're specifically activated (e.g., in case of refunds, multi-party agreements, etc.), enhancing privacy and flexibility. The real power of Taproot comes from the fact that unless a transaction is contested or conditions are complex, only the key-path spending (i.e., single signature) needs to be revealed, keeping other possible conditions hidden and transactions looking like ordinary single-signature ones. This is just a conceptual example. Actual transaction creation would need to comply with specific software or hardware wallet implementations that support Taproot.
Sending the coinbase reward to a Taproot address
It is entirely possible for the coinbase transaction reward to be sent to a Taproot address in transaction 0 (the coinbase transaction) of the block that a miner has found. Taproot enhances the flexibility and privacy of transactions and can be integrated into any kind of output, including those in a coinbase transaction.
- Generating a Taproot Address: The miner, or more typically the mining pool, would generate a Taproot address. This involves creating a Schnorr public key which can optionally include additional script conditions for more complex spending scenarios.
- Creating the Coinbase Transaction: In the coinbase transaction, the output is set to the Taproot address. The scriptPubKey field of the output would look something like
OP_1 <Taproot public key>. - Mining the Block: Once the block is successfully mined, the coinbase transaction, along with its output to the Taproot address, is confirmed on the blockchain.
- Block Reward Maturity: As with any coinbase transaction, the bitcoins rewarded are not spendable until 100 blocks later, due to the maturity requirement in Bitcoin's protocol.
- Spending from Taproot Address: Once mature, the bitcoins can be spent from the Taproot address, utilizing either the key-path for straightforward single-signature transactions or the script-path for more complex conditions if those are set up.
Worked example: Alice, Bob, and others in a pool
This example uses both the key-path and script-path elements of Taproot to distribute rewards based on certain conditions.
Step 1 — Generating the Taproot Address. Alice, Bob, and others agree on a set of conditions under which they will receive their share of the mining rewards. They create a Taproot address that combines their public keys and any necessary scripts for more complex distributions.
Step 2 — Setting Up the Coinbase Transaction. Output 1 pays to a Taproot address which includes: a Key-path (a single signature from a primary key, possibly held by the pool operator, for straightforward distribution if all parties agree) and a Script-path (scripts for different distributions, e.g., Alice gets 40%, Bob gets 30%, and others share the remaining 30% based on their agreed terms).
Example of transaction script:
Key-path output: OP_1 <combined Schnorr public key> Script-path output: Uses MAST to hide individual conditions where: - Alice's condition could be based on time or block height for her shares. - Bob's condition might involve his active participation in mining over a period. - Others have their script based on other criteria like electricity contributions.
Step 3 — Mining the Block. Once the block is mined, the coinbase transaction is confirmed with the above structure, and the block is added to the blockchain.
Step 4 — Distribution of Rewards. Key-path Spend: if all conditions are standard and uncontested, the holder of the primary key can sign a transaction to distribute the rewards according to a pre-agreed formula. Script-path Spend: if specific conditions need to be met (like a dispute resolution or time-based release), the relevant scripts encoded in the MAST structure are executed to distribute rewards accordingly.
Step 5 — Reward Maturity and Spend. The rewards from the coinbase transaction must mature for 100 blocks before they can be spent. Once mature, the distribution occurs according to the key-path or script-path conditions that were triggered.
Keeping the main Taproot key undisclosed
It's possible and sometimes preferable for the main Taproot key to remain unknown to all parties involved until it's used in the coinbase transaction, particularly where the main key is used primarily for a specific function, like distributing mining rewards, and its exposure is limited to maintain security and privacy.
Confidentiality: keeping the main Taproot key unknown until its first use helps protect the details of the agreement and the distribution formula from being exposed prematurely — beneficial in competitive mining environments. Security: by limiting the exposure of the key, you reduce the risk of unauthorized access or leaks; this key, when used, might control significant amounts of cryptocurrency.
Implementation. Generation: the key can be generated by a trusted party or through a collaborative process using a protocol like MuSig, where multiple parties contribute to the generation without any single party knowing the entire key. Usage: the key is used in the script of the Taproot address within the coinbase transaction. Reveal: the output key is public once the coinbase is published; the internal key and any unused script leaves stay hidden.
Note, November 2026. The 32-byte output key itself is public: it is in the coinbase output from the moment the block is mined. What can stay private is the internal key and every script leaf that is never used. With MuSig2 no single party ever holds the private key of a combined key.
In a mining pool scenario, using a Taproot key that is unknown to all participants until its use can enforce agreed-upon distribution rules without revealing the specifics to each miner, and allow for dispute resolution or conditional distributions encoded in the script-paths, activated only if certain conditions are met.
Verifying distribution without the private key
Alice, Bob, and others can verify the distribution of mining rewards associated with a Taproot address without needing to know the private key, due to the public and transparent nature of Bitcoin's blockchain.
- Public Key Transparency: even though the private key is not known, the public key associated with the Taproot address is visible and verifiable. Taproot's Schnorr signatures enable key aggregation and privacy-enhanced script execution but still allow public verification of intended transaction structures.
- Script Exploration: Taproot addresses can contain MAST, which hide complex scripts that only need to be revealed when used. The conditions under which these scripts execute can be made transparent from the outset through public documentation or a cooperative pool's agreement.
- Pre-commitment to Conditions: the conditions for reward distribution can be pre-committed within the Taproot script. While individual scripts are only revealed if used, the hash of these scripts (part of the Merkle root) can be shared and verified against what is committed on the blockchain.
- Simulation and Tools: tools can simulate transactions based on the public key and the known or assumed conditions of the scripts, without executing the transactions or accessing the private key.
In practice, before commencing mining on a block candidate, participants would review the Taproot setup and associated scripts, use blockchain analysis tools to verify that the public key and the script hashes match the agreed terms, and confirm through simulation or contractual agreements that the reward distribution matches their expectations.
Invalid-address handling in MAST
If one of the spending transactions in a MAST setup attempts to send funds to an invalid address, several scenarios could unfold depending on the nature of the “invalid address”:
- Invalid Address Format: if the address does not conform to any recognized Bitcoin address format, the wallet refuses to build the transaction (see the note below).
- Non-existent but Valid Address: if the address is technically valid but corresponds to no known private key, the transaction can still be processed and added to a block — the bitcoins would be effectively burned, as no one holds the key to spend them.
- Script Evaluation Failure: an output script is not run when it is created; a script that cannot succeed only makes a later spend fail, and its coins are burned (see the note below).
Note, November 2026. At the protocol level there are no addresses, only output scripts. An address that does not decode is caught by the wallet before any transaction exists. An output script that nobody can satisfy is still valid in a block, and its coins are burned. A script leaf that fails only fails when someone tries to spend with it.
Handling and prevention: well-designed wallets and nodes validate addresses before broadcasting; scripts within a MAST should be designed to fail safely; scripts should be thoroughly tested and audited before deployment; and advanced setups can include recovery conditions (with careful cryptographic design to avoid new vulnerabilities). Sending to an invalid address typically results in rejection of the transaction or loss of funds, so robust checks and audits are essential.
Bitcoin mining basics, with Taproot
Bitcoin mining is the process of adding new transactions to the blockchain; miners use powerful computers to solve hash puzzles, and the first to solve gets to add a block and receive the reward. Since mining requires significant power, individual miners often join mining pools that combine computational power; when the pool succeeds, the reward is distributed among members based on contributed power.
Incorporating Taproot: a Taproot address is generated to receive the mining rewards (a single public key for simplicity, or complex conditions hidden in its MAST). When the pool mines a block, the coinbase can output the reward to the Taproot address — key-path for a straightforward split, script-path for conditional shares (by time or contributed power), revealed only when needed. Even before mining a candidate, all members can verify the address setup and distribution script to ensure fairness, and the use of Taproot enhances security and privacy because the complexity is hidden unless conditions require revealing it, while all transactions remain verifiable on the blockchain.
Taproot with P2Pool
Incorporating Taproot into a decentralized pool like P2Pool involves modifications due to its dynamic nature. P2Pool has a decentralized model (no pool operator; nodes form a peer-to-peer network, and a miner runs its own node or connects to a public one), a sharechain (a secondary blockchain where each share is proof of work contributing to finding a main block; shares are found far more frequently than blocks), and dynamic participation (miners join and leave without registering, measured by submitted shares).
- Dynamic Taproot Address Generation: each miner could generate a personal Taproot address with simple payout conditions (key-path) and conditional payouts based on ongoing participation (script-path); or a collective Taproot address managed by a consensus mechanism that adjusts to changes in contributions and the sharechain state.
- Reward Distribution: when a block is mined, the reward is sent to the collective Taproot address; distribution is based on the sharechain data, reflecting each miner's contribution over a rolling window — fair and proportional to effort.
- Dynamic Script Execution: conditions embedded in the MAST could automatically adjust the distribution based on the sharechain's rolling window, accounting for changes in mining power, share frequency, and participation, and handling participants joining/leaving.
- Decentralized Verification: all participating miners verify the integrity and fairness of the distribution via the blockchain and the sharechain.
- Efficiency and Privacy: Taproot reveals specific scripts only when needed and Schnorr signatures provide efficiency in size and verification time — beneficial in a high-frequency environment.
Hardware address-count restrictions
If mining hardware or its firmware limited the number of coinbase addresses a miner can use — which would restrict such hardware in decentralized pools like P2Pool or c2pool — Taproot alone could not completely resolve it. Taproot can consolidate multiple spending conditions under a single address (via MAST and Schnorr), reduce the need for multiple addresses, and enhance privacy and efficiency — making a limited number of addresses go further. But the core issue touches manufacturer policies, hardware control, and miner autonomy:
- Hardware Firmware Restrictions: if the firmware is locked to a specific set of addresses or limits address functionality, Taproot's capabilities might be underutilized without firmware/hardware modification.
- Need for Manufacturer Cooperation or Policy Change: real change would likely require policy shifts by manufacturers or pressure from the community.
- Alternative Solutions: miners might look towards more open-source or customizable hardware where they have more control over such settings.
Taproot addresses the symptoms — how efficiently and flexibly each allowed address can be used — but not the root cause, the manufacturer-imposed limit on the number of addresses. Workarounds include reusing addresses across different blocks (if permitted), pool-level address management (a single Taproot address per pool or a small set), and — where legal/ethical — firmware modification; alongside broader advocacy for open standards and attention to legal, warranty, and regulatory implications.
Taproot in c2pool today
- c2pool’s Litecoin node requires the
segwit,taprootandmwebsoft forks, as the Litecoin network does. - A Taproot payout address is not supported on the Litecoin share chain today. A V36 share carries a 20-byte payout hash, and a P2TR (or P2WSH) output needs 32 bytes. c2pool accepts such a login, but that miner’s Litecoin payout is redistributed by the node’s
--redistributemode (to other miners in the default mode; to the node owner or the donation script in thefeeanddonatemodes), with a warning in the log and “P2WSH/P2TR address → redistributed” on the dashboard. Use a P2PKH, P2WPKH or P2SH address. - For merged mining c2pool needs a Dogecoin payout for every Litecoin miner. Dogecoin has neither SegWit nor Taproot, so c2pool pays the Litecoin address’s key (P2PKH and P2WPKH as P2PKH, P2SH as P2SH), unless the miner gives a Dogecoin address explicitly in the stratum login (
LTC_ADDRESS,DOGE_ADDRESS).
The setups above lean on a Taproot key “possibly held by the pool operator” and on MAST to pack many conditions into one output. A key path held by an operator is a custodial shape, which a decentralized pool must avoid. MAST consolidation also cannot pay an unbounded set of miners from a coinbase of bounded size.
An earlier version of this box described a remedy in which miners would be owed balances kept in a shared ledger and paid in later blocks. That model is withdrawn: an independent review showed that a pool with no custodian cannot owe some miners without overpaying others, and the overpayment is never recovered. See the errata of 4 October 2026 in the Purple Paper summary; the paper’s Section 9 is marked withdrawn.
Taproot remains a useful primitive: each output can still be a Taproot key, for privacy and efficiency. It is not, by itself, an answer to the coinbase-size problem.