Author

Topic: Taproot inside coinbase transaction? (Read 191 times)

staff
Activity: 4284
Merit: 8808
July 30, 2020, 09:06:22 PM
#2
This doesn't really have anything to do with taproot.  Taproot isn't a way to have additional outputs on transactions, each taproot output is still just a single output.

Coinbase transactions can already have multiple outputs, and miners can collaborate to create blocks that pay each other directly rather than the the value going to one party.  P2Pool is an example of this, unfortunately it was undermined by Bitmain which produced mining hardware which wouldn't work with p2pool or anything like it.
jr. member
Activity: 32
Merit: 77
July 30, 2020, 01:36:46 PM
#1
Now we are mining using "winner takes all" scheme. Every miner have to mine in pool or create the whole block alone with all transactions. But instead, we could use taproot on coinbase outputs and produce blocks a bit differently. First, miners could create merkle trees having all non-coinbase transactions and one coinbase with taproot output created by first miner. There could be many such trees available in the network and all of these trees would compete trying to produce lowest hashes, highest total block rewards, etc.

In this way each miner could choose some tree, validate it, and then start working on it. Each miner could attach to coinbase transaction having taproot output. This coinbase transaction would be built by all miners and when going down the tree, the difficulty would be halved each time. For example we could have something like this:
Code:
target: 00000000ffffff00...0
coinbase: address having 50.00 coins with BlockHash < 00000000ffffff00...0
But it would be P2SH coinbase taproot output, so it could as well contain something like this:
Code:
target: 00000000ffffff00...0
coinbase: TapRoot having 50.00 coins with BlockHash < 00000000ffffff00...0
          address having 25.00 coins with TapBranchHash < 00000001fffffe00...0
          address having 25.00 coins with TapBranchHash < 00000001fffffe00...0
When validating the whole block hash, everything would be the same. Just checking if block hash is lower than difficulty is enough and works fine. But when attaching to coinbase, any miner would have a chance to add something. All that this miner would have to do is just adding next address in coinbase output, produce tap branch hash lower than halved difficulty (number of halvings would depend on how deep in the whole taproot tree this miner would add something) and produce the whole block hash lower than it currently is. If it would be lower than the target, this block could be added to the blockchain and broadcasted to all miners.
Jump to: