Bitcoin Forum
May 04, 2024, 10:31:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Coinbase input script  (Read 1238 times)
TierNolan (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
April 10, 2013, 03:35:56 PM
 #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?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
1714818699
Hero Member
*
Offline Offline

Posts: 1714818699

View Profile Personal Message (Offline)

Ignore
1714818699
Reply with quote  #2

1714818699
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714818699
Hero Member
*
Offline Offline

Posts: 1714818699

View Profile Personal Message (Offline)

Ignore
1714818699
Reply with quote  #2

1714818699
Report to moderator
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
April 10, 2013, 03:42:21 PM
 #2

It has an extraNonce in it, and is also these days used for flagging features that the miner supports.
TierNolan (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
April 10, 2013, 03:45:56 PM
 #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"?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
TierNolan (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1083


View Profile
April 10, 2013, 04:22:27 PM
 #4

Another question about coinbase transactions, do they have to be the first transaction in the block?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
April 10, 2013, 04:51:18 PM
 #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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!