Open liamseanbrady opened 5 years ago
Thanks for the feedback, we are going to check on this
For reference, in the bitcoin core codebase, for a block to be considered valid the first transaction in the block must return true
from isCoinBase()
(https://github.com/bitcoin/bitcoin/blob/011c42c5bd175e14b03741398f5d4f8a4cf3dee5/src/validation.cpp#L3114), and isCoinBase()
ensures that there is only one vin
in a given transaction, and that the vin
is not derived from a previous UTXO (https://github.com/bitcoin/bitcoin/blob/127b30cce8af6acef6fb1dafff2e6a1d90bf900f/src/primitives/transaction.h#L335). Hope that helps!
Starting at 1:57 the video says "there's not really anything else special about it [the coinbase]", but the Bitcoin developer guide (https://bitcoin.org/en/developer-guide#transaction-data) seems to suggest the the coinbase transaction does have some special properties and isn't just a 'normal' transaction:
"The first one of these transactions must be a coinbase transaction…which should collect and spend the block reward (comprised of a block subsidy and any transaction fees paid by transactions included in this block)."
In the video, the first transaction in the block also contains "No Inputs (Newly Generated Coins)", which also suggests that there's something different about the first transaction.
I'm not sure if this was not included in the video on purpose to avoid introducing more information, but I thought I should point it out just in case.
Link to page: https://classroom.udacity.com/nanodegrees/nd1309/parts/31b86083-85e4-43ae-b154-6905b461f2c1/modules/0af5bc78-b446-4b60-b9cd-8659536cd59f/lessons/808abc06-4959-499c-9c31-54be1838096f/concepts/2638b316-58fb-48b3-b2a9-5730bfae8c14#
Thanks (hopefully that's helpful)!