is your single stop for crypto

How Does a Bitcoin Node Verify a Transaction?


Before the Bitcoin node can verify a transaction, it will look at the transaction and run some checks.

This includes conditional operations in a script that tell whether or not the account can be locked or unlocked (true/false) if the signature/private key is valid.

Each node collects similar transactions in a pool.

The Bitcoin client, AcceptToMemoryPool, CheckTransaction & CheckInput functions, can be checked to find the latest list because they change and evolve over time; however, here’s what they usually check that:

  1. Transaction’s data structure and syntax

  2. Input and output values

  3. The transaction is less than the block size of 1 MB.

  4. The values are between 0 and 21 million

  5. No hashes equal 0

  6. Locktime is less than the max allowed number

  7. Transaction time is more than or equal to 100 bytes

  8. The number of signatures is less than the limit

  9. Unlocking script only pushes numbers into the stack

  10. Locking script matches the standard format

  11. The matching transaction exists

  12. If the matching transaction is missing, it must be moved to an orphan pool

  13. If it is a coinbase transaction, it must have 100 confirmations

  14. For each input, an output must exist and not have been spent

  15. Each input value is in the required range

  16. If the input value is less than the output value, it must be rejected

  17. If the transaction value is too low to get into an empty block, it must be rejected

  18. The unlocking scripts for each input are verified against the output locking scripts

Leave a Reply

Please Login to comment