How can nodes verify the transactions before miner ? Give me easy explaination

1

1

If Alice sends 2 Bitcoin, it goes to the nodes to be verified. If nodes are verifying, then what do miners do? I read somewhere that if miner changes the transactions in a block, the block will be invalid. How can miner change the transactions in a block?

red hair shanks

Posted 2018-01-14T04:29:23.170

Reputation: 11

Answers

3

Contrary to popular belief, it is not the miners' job to verify transactions. Rather it is the job of the full nodes on the network to verify the transactions, and miners are a subset of that (i.e. miners are also full nodes). Rather miners only exist to establish the ordering of transactions, within certain restrictions.

Full nodes can verify transactions without them being a block and without mining a block because the process of mining does not alter the transaction. A full nodes merely needs to know the transactions that a given transaction spends from in order to determine whether the transaction is valid. Miners must do the same thing so that they only include valid transactions in their blocks.

What miners exist to do is to establish the ordering of transactions. They are not there to say that a transaction is valid. Rather what they do is, when given two transactions that conflict with each other, say which one is "first" and thus the one that everyone else should believe. Bitcoin uses a first come, first serve system, and miners are only here to say which transaction was first. The two conflicting transactions must be valid as transaction validity is a precondition for this conflict resolution.


I read somewhere that if miner changes the transactions in a block, the block will be invalid. How can miner change the transactions in a block?

A transaction is just data. Anyone can alter data that they have. If a miner alters a transaction and includes it in his block, the transaction will be invalid and all full nodes on the network will reject it.

Andrew Chow

Posted 2018-01-14T04:29:23.170

Reputation: 40 910

Then how can nodes verify transaction without taking that transaction to block ? And how can miners verify it ?red hair shanks 2018-01-15T05:46:01.263

There is no need for a transaction to be in a block. Everything that is needed to verify a transaction is available before that transaction is included in a block.Andrew Chow 2018-01-15T05:48:15.390

So how can ordering of transactions is done by miners and nodes i am new here about bitcoin so?red hair shanks 2018-01-15T06:16:58.190

The blockchain establishes the ordering of transactions. Miners are the ones who add blocks to the blockchain, thus miners are the ones who order the transactions.Andrew Chow 2018-01-15T06:56:31.627