Questions tagged [coinbase-transaction]

The transaction that pays the miner their block reward.—Use [coinbase.com] to refer to the US-based cryptocurrency company.

Filter by
Sorted by
Tagged with
38 votes
2 answers
14k views

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 ...
Andrew Burns's user avatar
35 votes
3 answers
11k views

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 ...
nmat's user avatar
  • 11.5k
22 votes
2 answers
10k views

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 ...
user2517742's user avatar
20 votes
4 answers
9k views

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?
herzmeister's user avatar
  • 3,507
19 votes
1 answer
2k views

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-...
Daniel H's user avatar
  • 684
14 votes
1 answer
556 views

Why are miners setting the locktime in coinbase transactions?

Some coinbase transactions have locktime values set. One such recent example is: { "txid": "5166cb509a5d786db33963a269ea08ff82a1c40d37d4fb828a394b0465cd5efd", "hash": ...
TheCharlatan's user avatar
11 votes
1 answer
789 views

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's user avatar
  • 26.6k
9 votes
1 answer
4k views

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; ...
morsecoder's user avatar
  • 14.1k
8 votes
1 answer
3k views

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 "...
Jimmy Song's user avatar
  • 7,759
8 votes
1 answer
3k views

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 ...
shx2's user avatar
  • 803
8 votes
2 answers
3k views

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 ...
Jan's user avatar
  • 451
8 votes
1 answer
503 views

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]....
morsecoder's user avatar
  • 14.1k
7 votes
3 answers
4k views

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=...
Vitali Grabovski's user avatar
7 votes
2 answers
1k views

What is the Block 1,983,702 Problem?

The issue, transition to requiring block height in block coinbases, was discussed back in 2012, however I just stumbled upon it, and would like to understand more about its significance.
BitcoinFanatic's user avatar
7 votes
1 answer
3k views

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 ...
UserPioneer's user avatar
7 votes
1 answer
5k views

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's user avatar
6 votes
1 answer
1k views

Why is coinbase mentioned in a BIP?

I thought that BIPs were similar to Pythons PIPs. So I was confused when I read BIP 34 mentioning coinbase explicitly. The author, Gavin Andresen, seems not to have a connection to coinbase. I thought ...
Martin Thoma's user avatar
6 votes
3 answers
882 views

Is it possible for the coinbase transaction in block 164384 to be duplicated in block 1983702?

BIP34 requires coinbase transactions to begin with a data push of the block's height. The coinbase transaction in block 164384 (3aa03753fc) happens to start with OP_PUSHBYTES_3 d6441e which is the ...
delta1's user avatar
  • 113
6 votes
2 answers
3k views

Must a Block contain a coinbase transaction?

Must a block contain a coinbase transaction? If so, how is this enforced?
Kinnard Hockenhull's user avatar
6 votes
2 answers
850 views

Why are coinbase transaction outputs greater than reward?

If the sum of the coinbase transaction's outputs must be less than or equal to the current reward (25 btc currently), why in practice do blocks have a slightly higher coinbase transaction output (for ...
Roy Hu's user avatar
  • 63
6 votes
1 answer
1k views

Can a miner steal another one's block?

Say we have two miners, Alice (an honest miner), and Eve (an evil miner). My understanding is that when Alice mines a block she advertises it to the network, and once it's part of the longest block ...
user2813687's user avatar
5 votes
2 answers
2k views

Why would a miner put an OP_RETURN in a coinbase transaction?

I’m looking at this coinbase transaction. I'm confused why there are two outputs and why one of them is labelled with OP_RETURN.
arshbot's user avatar
  • 1,750
5 votes
1 answer
756 views

Why are there more than two transaction outputs in a coinbase transaction?

In a coinbase transaction there are always more than two transaction outputs. The first transaction output contains the reward. The second contains the witness reserved value. But why are there other ...
Andy's user avatar
  • 233
5 votes
1 answer
833 views

Why does this coinbase transaction have two op_return outputs?

I've been looking at coinbase transactions for fun and I came across one with two op_return outputs.. Does anyone know what the second one is? Also, I understand the first op_return is used to ...
Andrew's user avatar
  • 51
5 votes
1 answer
651 views

Duplicated hash values in mining reward

This transaction is contained in two MainChain-Blocks: https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468 On Blockexplorer there is a note of this anomaly: ...
Dennis Kriechel's user avatar
5 votes
1 answer
120 views

When was the first OP_RETURN output in a coinbase?

One way to deal with the BIP34 does not imply BIP30 issue, aka the Block 1,983,702 Problem, is a soft-fork that makes the SegWit commitment mandatory. [0] There are no OP_RETURN outputs in any of the ...
Sjors Provoost's user avatar
5 votes
1 answer
184 views

What is the maximum number of bytes the coinbase scriptSig (coinbaseaux) can hold?

Since the scriptSig of the coinbase transaction of a block can contain arbitrary data, what is the maximum number of bytes it can contain? I've seen various mentions of a limit around 100 bytes, but ...
JBaczuk's user avatar
  • 7,358
5 votes
1 answer
1k views

Is it true the genesis block reward can't be spent forever? [duplicate]

Is the genesis block reward forever unspendable?
Zamicol's user avatar
  • 293
5 votes
2 answers
1k views

Is there a way to find the coinbase for a given block using only bitcoind commands?

ASICMiner includes hex(Mined By ASICMiner) in the coinbase. I'd like to generate weekly statistics that include ASICMiner' solo-mining efforts, but I don't want to have to rely on blockchain.info or ...
organofcorti's user avatar
5 votes
6 answers
4k views

Possible to do recurring payments with Bitcoin?

I'm a developer and using the Coinbase Ruby API to attempt to build a Coinbase application. I'm still coming to grips with how it all works. My question is, is it possible to set up recurring ...
Dave's user avatar
  • 405
5 votes
1 answer
196 views

Where is the code that sends generated Bitcoins from mining to the wallet?

I was just looking through the Bitcoin code but since I am relatively new to C++ I was wondering, if anybody could tell me where the code responsible for sending coins generated through mining to the ...
Cheese's user avatar
  • 61
4 votes
2 answers
1k views

Why does IsCoinBase() check if there is exactly one input?

In the Bitcoin Core source code there is a function to check if a given transaction is a coinbase or not: bool IsCoinBase() const { return (vin.size() == 1 && vin[0].prevout....
Amir reza Riahi's user avatar
4 votes
1 answer
231 views

Will a post-subsidy block with no transactions include a coinbase transaction?

If a block: Is after the last halving, so there is no subsidy Includes no non-coinbase transactions, so there are no fees Must it include a coinbase transaction? If so, will it simply have no ...
Casey Rodarmor's user avatar
4 votes
1 answer
156 views

Was it always required for the Coinbase transaction to be the first transaction in a block?

The user tempo mentioned on another topic: "At least in the early protocol versions it was possible to put the coinbase transaction not on the top of the outputs." I have never heard about this ...
Murch's user avatar
  • 74.4k
4 votes
1 answer
538 views

Why does Bitcoin block 526,591 have a 6.25 (instead of 12.5) block reward?

https://chain.so/block/BTC/0000000000000000002ba5a1fb96f93e6c215d62db4280f1cbd30e82c7c71fba https://blockchair.com/bitcoin/block/526591 It's an empty block (zero transactions), but the coinbase ...
vonneumann1903's user avatar
4 votes
1 answer
5k views

How is 10% transaction fee possible for a bitcoin transfer from coinbase to another exchange?

I moved 0.01BTC from coinbase to another exchange and i got charged 0.001BTC for it. This is 10%!!. I understand concept of dynamic pricing depending on network crowding etc. However, how is 10% fee ...
toing's user avatar
  • 145
4 votes
2 answers
353 views

How does the network apply credit for created blocks?

First post. I must say in advance thanks to everyone for all the great conversation and help and software so far. It's really helped me get familiar with bitcoins and bitcoin mining. I have a ...
Coder Roadie's user avatar
4 votes
1 answer
95 views

Can a miner open a Lightning channel with a coinbase output?

Assuming that the funding transaction uses a P2WSH output, can we open a channel by providing that standard 2-of-2 multisig as the coinbase output?
oz21m's user avatar
  • 107
4 votes
1 answer
892 views

Where is the source code that allows new coins to be generated?

As per Bitcoin documentation, new coins are generated and brought into circulation when miner receive the reward. I am not talking about existing coins that are collected at the time of mining. Can ...
Vinay Chitale's user avatar
4 votes
1 answer
3k views

How can we look at the hidden message in the first block?

This is the first block, how can I see the message? 'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks'
smatthewenglish's user avatar
4 votes
1 answer
2k views

Which receiving address does my block reward go to when mining through bitcoind?

I'm wondering where goes the BTC as my bitcoin server finds a block? Using bitcoind, I see no setting for a bitcoin address..
Guest123's user avatar
4 votes
2 answers
375 views

How to generate a coinbase transaction?

I am creating a miner in C++ for solo mining, and am struggling to create the proper coinbase transaction. Say I have a bc1 address, like bc1qfc7fameteuguetm0kfzypnvf2ju6wppdvj6tkc , what would be and ...
Martin Bradley's user avatar
4 votes
1 answer
192 views

Replay attacks: can a coinbase transaction be replayed?

I'm pretty sure that I understand how replay attacks work: A malicious node takes a valid transaction from chain A, and replays it on chain B. Other nodes on chain B see the transaction as valid and ...
Nathan Wallheimer's user avatar
4 votes
1 answer
3k views

Details on Genesis Block

The question asked here displays the genesis block in pretty good detail. I am still trying to get a breakdown of some of the elements seen here (and some others not seen here): The Merkle Root Time ...
HenryDorsettCase's user avatar
3 votes
1 answer
254 views

Does the coinbase transaction have inputs?

I was wondering if I can add dummy data into a coinbase transaction’s inputs. Is it possible to do this? Can you insert invalid input scripts into a coinbase transaction? Can you add multiple inputs ...
Haim Bender's user avatar
3 votes
2 answers
265 views

Where was the term "coinbase" first coined, who first used it?

The white paper doesn't mention the term "coinbase" (in reference to the reward transaction). I see the first version of the software main.cpp does: // First transaction must be coinbase,...
Lee's user avatar
  • 478
3 votes
1 answer
174 views

Can a coinbase transaction have a segwit output?

And more generally speaking, are there any restrictions on the output of a coinbase transaction?
Darius's user avatar
  • 789
3 votes
1 answer
535 views

How does a miner collects the fees?

The way I understand it, at the very top of the block the miner adds a transaction to collect the 25 bitcoins it would earn if it solves the block. Obviously that transaction is included in the hash/...
user2223142's user avatar
3 votes
1 answer
118 views

Different balances between fullnode and bitcoin explorer

I looked up Block 200 at https://www.blockchain.com/explorer/blocks/btc/200 and found out that coinbase transaction was made and sent 50 BTC to 1HwmP33SaknLYShXfjVU8KmVThU3JiuVgH. But if I check utxos ...
Jin's user avatar
  • 61
3 votes
2 answers
320 views

Can a coinbase transaction have more than one input?

I know that a coinbase transaction must have one input, but can it have more than one?
Casey Rodarmor's user avatar