Author

Topic: Coinbase input script (Read 1262 times)

full member
Activity: 154
Merit: 100
April 10, 2013, 11:51:18 AM
#5
Another question about coinbase transactions, do they have to be the first transaction in the block?
Yes - in fact they must be, and all others must not be coinbase.
legendary
Activity: 1232
Merit: 1094
April 10, 2013, 11:22:27 AM
#4
Another question about coinbase transactions, do they have to be the first transaction in the block?
legendary
Activity: 1232
Merit: 1094
April 10, 2013, 10:45:56 AM
#3
It has an extraNonce in it, and is also these days used for flagging features that the miner supports.

What kind of features?  Is that other BIP's that use it for miners to "vote"?
legendary
Activity: 1526
Merit: 1134
April 10, 2013, 10:42:21 AM
#2
It has an extraNonce in it, and is also these days used for flagging features that the miner supports.
legendary
Activity: 1232
Merit: 1094
April 10, 2013, 10:35:56 AM
#1
This is the sig script to unlock the input into the coinbase transaction.  However, since the coinbase doesn't have an input, it was initially undefined.  It looks like the input transaction needs to be set to 0 though.

Since BIP-34 was accepted, the start of the coinbase transaction's script is the block height, i.e. 0x03 (the length) and then the height.  This was to make sure every coinbase transaction hashed to a different value, even if they paid out to the same address.

What is the rest of the coinbase script used for?  Is it just random data or do miners has some system for deciding what to set it to?  Why not leave it as short as possible, since that would make the transaction smaller?
Jump to: