Questions tagged [coinbase-transaction]

A "coinbase transaction" pays the miner their block reward. Use [coinbase.com] to refer to the service.

Each block must contain exactly one coinbase transaction. The coinbase transaction pays out the block reward to the miner that created it as part of a block. The block reward consists of the newly created block subsidy and the transaction fees. The coinbase transaction is the only transaction whose outputs may pay out a larger amount than spent by the inputs (limited by the ).

The coinbase transaction must be the first transaction in the block, have exactly one input, and their outputs cannot be spent until 100 blocks later.

Related topics: , , , , ,

188 questions
38
votes
2 answers

What is the coinbase?

I searched the bitcoin wiki and found references to coinbase, but no clear cut explanation of what exactly it is. I know that miners can tag their coinbases (that is how some sites tell who mined a block).
Andrew Burns
  • 681
  • 1
  • 7
  • 6
33
votes
3 answers

What is the block maturation time?

I was reading the wiki article about the blockchain and I didn't understand the part in bold: When a block becomes an orphan block, all of its valid transactions are re-added to the pool of queued transactions and will be included in another…
nmat
  • 11,479
  • 14
  • 50
  • 78
21
votes
2 answers

What is the format of the coinbase transaction?

I'm trying to understand the format of the coinbase transaction. I've read that it is arbitrary and not specified. I'm wondering because I need to generate mining work and create an internal pool. As I've found out, you can change the ntime, nonce…
user2517742
  • 341
  • 1
  • 2
  • 5
20
votes
4 answers

How can one embed custom data in block headers?

Some mining pool admins put custom data in block headers, like prayers. How do they do that? Where can I see that data for myself?
18
votes
1 answer

What happens when a miner does not claim all fees/generated coins?

Suppose that a miner for some reason has the generation transaction of their blocks not take all the possible coins. This can happen for a variety of reasons, almost all of which are bugs: An off-by-one error makes them think that their block…
12
votes
1 answer

Why are miners setting the locktime in coinbase transactions?

Some coinbase transactions have locktime values set. One such recent example is: { "txid": "5166cb509a5d786db33963a269ea08ff82a1c40d37d4fb828a394b0465cd5efd", "hash": "075ffc5116296983aaa8286b4fdbaac101ba891a471cb835e9c532be926a7673", …
TheCharlatan
  • 333
  • 1
  • 10
11
votes
1 answer

Is there a limit to how much extra data can be put into blocks via scripts?

According to this answer, miners can include extra data in blocks. Is there an upper bound to how much a miner can add? How much?
ripper234
  • 26,452
  • 30
  • 111
  • 246
9
votes
1 answer

Why does the default miner implementation use pay-to-pubkey?

Looking at the v0.9.3 source in miner.cpp: CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; CScript scriptPubKey = CScript() << pubkey <<…
morsecoder
  • 14,008
  • 2
  • 42
  • 92
8
votes
1 answer

Why do miners seem to be using consecutive letters for the Coinbase transaction text?

If you look at coin.dance, it looks like the coinbase transactions text start with consecutive letters. For example, block 478529 starts with "AM" and 478530 starts with "BM" and 478531 starts with "CM" and so on. This continues with DM, EM, ... all…
Jimmy Song
  • 7,709
  • 16
  • 35
8
votes
2 answers

What is the format of coinbase input scripts?

The input script of the coinbase transaction of block number 1 (right after the genesis block) looks like this: 04ffff001d010b How do I recognize this as a coinbase transaction? Do I simply know that this is a coinbase transaction because it is the…
Jan
  • 451
  • 4
  • 4
8
votes
1 answer

Coinbase transaction's 100-block cooldown period

From the developer guide: The UTXO of a coinbase transaction has the special condition that it cannot be spent (used as an input) for at least 100 blocks. This temporarily prevents a miner from spending the transaction fees and block reward from a…
shx2
  • 803
  • 1
  • 8
  • 14
8
votes
1 answer

Why bother having limitations on Bitcoin Coinbase Transaction Scriptsigs?

There are a few limitations on the structure of the coinbase (reward) transaction in a block. There is only one input. vin.size() == 1 (source) It doesn't reference any previous output. vin[0].prevout.IsNull() (source) The scriptSig is not too…
morsecoder
  • 14,008
  • 2
  • 42
  • 92
7
votes
1 answer

Where, in the code, in the Satoshi client is 21 million cap implemented?

Which fragment of the Satoshi client is verifying if announced block has a valid reward? I mean, we now live in the 25 BTC reward period. I guess client after receiving a newly minted block, does verifications, like checking if inputs and outputs…
7
votes
1 answer

How to fully decode a coinbase transaction?

After reading this What is the format of the coinbase transaction? I was wondering about a few things. decoderawtransaction of a random Litecoin coinbase transaction: "coinbase" :…
user13005
  • 71
  • 1
  • 2
7
votes
3 answers

ScriptSig (coinbase) structure of the Genesis Block

From original bitcoin c++ source code: // Genesis Block: // CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1) // …
1
2 3
12 13