<p>From the Bitcoin wiki (as-of March 19, 2013):</p>

<blockquote>
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Each output determines which
  Bitcoin address (or other criteria, see Scripting) is the recipient of
  the funds.</p>
  
  <p>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.</p>
  
  <p>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.</p>
</blockquote>

<ul>
<li><a href="http://en.bitcoin.it/wiki/Protocol_specification#Transaction_Verification" rel="nofollow">http://en.bitcoin.it/wiki/Protocol_specification#Transaction_Verification</a></li>
</ul>

CC BY-SA 3.0
2013-03-20T03:25:55.227Z
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?
Kinnard Hockenhull
CC BY-SA 3.0
2013-03-22T00:38:12.580Z
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.
Stephen Gornick
CC BY-SA 3.0
2013-03-22T00:41:25.430Z
Or PicoCoin shows it fairly well, in C: https://github.com/jgarzik/picocoin
Stephen Gornick
CC BY-SA 3.0
2013-03-22T00:45:11.870Z
Or the most simplified pseudocode:

If UTXO is not yet spent, eligible for including in block.
If space in block, include eligible transactions.
Stephen Gornick
CC BY-SA 3.0
2013-03-19T14:04:04.743Z
2013-03-19T14:04:04.743Z
Stephen Gornick
<p>What are the requirements of a transaction being included in a block? How does a miner verify that a transaction meets such requirements?</p>

<protocol><block><transaction-verification><transaction-selection>
What are the requirements of a transaction being included in a block?
Kinnard Hockenhull
# What are the requirements of a transaction being included in a block?

(Asked by: username_0 on 2013-03-19)

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

**Tags:** protocol, block, transaction-verification, transaction-selection


---

## 1 answers

### Answer by username_1 on 2013-03-19. Score: 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.

* <http://en.bitcoin.it/wiki/Protocol_specification#Transaction_Verification>

> **Comments:**
> **username_0**: 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?  
> **username_1**: 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.  
> **username_1**: Or PicoCoin shows it fairly well, in C: https://github.com/jgarzik/picocoin  
> **username_1**: Or the most simplified pseudocode:  If UTXO is not yet spent, eligible for including in block. If space in block, include eligible transactions.  

---

