How does a Bitcoin node verify a transaction?

11 Feb 2015

Bitcoin network transaction verificationA node will look at a transaction as it arrives and then run a series of checks to verify it.

Each node builds its own transaction pool, which are mostly the same.

The conditions can change and evolve over time and a present list can be checked through the AcceptToMemoryPool, CheckTransaction & CheckInputs functions in the bitcoin client.

1. The transactions syntax and data structure are correct.
2. The input and outputs have values.
3. The transaction is less than the block size of 1 MB.
4. The values must be more than 0 and less than 21 million.
5. None of the inputs have a hash that is equal to 0.
6. The locktime is less than the maximum allowed number.
7. The transaction size is greater than or equal to 100 bytes.
8. The number of signatures is less than the signatute limit.
9. The unlocking script can only push numbers onto the stack.
10. The locking script must match isstandard format.
11. A matching transaction must exist.
12. If a transaction is missing move the transaction to the orphan transaction pool.
13. If the transaction is a coinbase transaction then it must have a maturity of 100 confirmations.
14. For each input the output must exist and not have been spent.
15. Check that each input value is in the required range.
16. Reject if the input value is less than the output value.
17. Reject if the transaction value is to low to get into an empty block.
18. The unlocking scripts for each input must be verified against the output locking scripts.

Important information

This website is only provided for your general information and is not intended to be relied upon by you in making any investment decisions. You should always combine multiple sources of information and analysis before making an investment and seek independent expert financial advice.

Where we list or describe different products and services, we try to give you the information you need to help you compare them and choose the right product or service for you. We may also have tips and more information to help you compare providers.

Some providers pay us for advertisements or promotions on our website or in emails we may send you. Any commercial agreement we have in place with a provider does not affect how we describe them or their products and services. Sponsored companies are clearly labelled.

CryptoCompare needs a newer browser in order to work.
Please use one of the browsers below: