I just have a few questions to help better my understanding of the coinbase transaction.
From what I know currently, the format of the coinbase transaction typically looks something like this when decoded:
TX Version: 01000000 # of Inputs: 01 Previous TX Hash: 0000000000000000000000000000000000000000000000000000000000000000 Previous Index: FFFFFFFF Input Script Len: 4D Input Script: 04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73 Input Sequence: FFFFFFFF # of Outputs: 01 Output Value (Sat): 00F2052A01000000 Output Script Len: 43 Output Script: 4104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC Lock Time: 00000000
My first question:
What exactly is the "Previous Index" and why is the value of it FFFFFFFF and not 00000000? Since the previous transaction doesn't exist, shouldn't it be 0 just like the previous hash?
From my understanding, the input script contains arbitrary data chosen by the miner when constructing the coinbase transaction and can typically be decoded into ASCII.
For example, this example input script (genesis block) decodes into ASCII as:
ÿÿEThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks
Is this correct? And is this also used when the nonce overflows as an 'extraNonce'?
What is the input sequence? Why is it always 0xFFFFFFFF when the locktime is 0x00000000?
Final question (I promise):
What data is stored in the output script, and how can it be broken down to be decoded?