What are the requirements of a transaction being included in a block? How does a miner verify that a transaction meets such requirements?

1 Answer 1


From the Bitcoin wiki (as-of March 19, 2013):

Transactions are cryptographically signed records that reassign ownership of Bitcoins to new addresses. Transactions have inputs - records which reference the funds from other previous transactions - and outputs - records which determine the new owner of the transferred Bitcoins, and which will be referenced as inputs in future transactions as those funds are respent.

Each input must have a cryptographic digital signature that unlocks the funds from the prior transaction. Only the person possessing the appropriate private key is able to create a satisfactory signature; this in effect ensures that funds can only be spent by their owners.

Each output determines which Bitcoin address (or other criteria, see Scripting) is the recipient of the funds.

In a transaction, the sum of all inputs must be equal to or greater than the sum of all outputs. If the inputs exceed the outputs, the difference is considered a transaction fee, and is redeemable by whoever first includes the transaction into the block chain.

A special kind of transaction, called a coinbase transaction, has no inputs. It is created by miners, and there is one coinbase transaction per block. Because each block comes with a reward of newly created Bitcoins (e.g. 50 BTC for the first 210,000 blocks), the first transaction of a block is, with few exceptions, the transaction that grants those coins to their recipient (the miner). In addition to the newly created Bitcoins, the coinbase transaction is also used for assigning the recipient of any transaction fees that were paid within the other transactions being included in the same block. The coinbase transaction can assign the entire reward to a single Bitcoin address, or split it in portions among multiple addresses, just like any other transaction. Coinbase transactions always contain outputs totaling the sum of the block reward plus all transaction fees collected from the other transactions in the same block.

  • Yeah, I read that. Not at all what I meant. I mean, how does a client/node do what is described in that article? How can I improve the question? Mar 20, 2013 at 3:25
  • If you read C++, it is documented best in the bitcoin/bitcoin project on GitHub. I know you are probably looking for a technical paper. The source code is where that exists for now. Mar 22, 2013 at 0:38
  • Or PicoCoin shows it fairly well, in C: github.com/jgarzik/picocoin Mar 22, 2013 at 0:41
  • Or the most simplified pseudocode: If UTXO is not yet spent, eligible for including in block. If space in block, include eligible transactions. Mar 22, 2013 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.