I am trying to understand the role played by various nodes in the Bitcoin Network in verifying the transactions that are taking place in real time. I think that I understand the process of Transaction (using Input and Output Scripts) and how the Transaction is formed. However I am trying to correlate it with how a Transaction is Broadcasted to other nodes and then verified?

Consider an example:

if A wants to send some BTC to B, then 2 things will occur:

(a) A will form the input script of the new transaction. It will reference the output script of a previous transaction where A received some BTC (in the past). It will prove the ownership of those BTC by using its Public Key and verifying the Signature.

(b) The output script for the new transaction will be formed by A's client. It will store the hash of the BTC Address of B and enable it to spend these BTC in future.

Now, my questions are:

  1. All these actions are performed by the Bitcoin Client of A and it does not require any interaction with the Peer to Peer Network. It has its own local copy of the Block Chain which it can use to perform the step a. So, isn't the transaction verified by the bitcoin client of A?

  2. I am guessing that this new transaction that was created (input and output scripts formed as described above) will be broadcasted to the entire Bitcoin Network. Now, what type of verification is being performed by other nodes on this transaction?

On what basis is a Transaction accepted by the Bitcoin Network and integrated into the Block which is a part of the Block Chain?


1 Answer 1

  1. Yes, but that doesn't mean that the network has accepted it.

  2. There are rules for accepting a transaction. Miners only include blocks that don't break the rules. The rules include checking that the inputs are valid, that a coin isn't double-spent, that the output isn't more than the input, etc.

A miner can choose to include a transaction or not. A miner could even choose to include a transaction that breaks the rules! But if he does that, other miners that are following the rules won't accept his block and he won't get his mining reward. So he has incentive to follow the rules.

  • thank you for the answer here -- how much does it cost computationally for the miner to do so? would that incentivize them to include less transactions as it takes longer to validate each one? Feb 23, 2016 at 20:24
  • @streetlight The computanional cost of verification is almost negligible compared to that of creating a block. Also, transactions normally have fees attached to them which will outweigh the verification cost.
    – kirelagin
    Dec 17, 2016 at 13:54

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.