Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

Thanks.

share|improve this question
  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.

share|improve this answer
    
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? – streetlight Feb 23 at 20:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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