<p>Every full node, such as a wallet like Bitcoin core, verifies all data independently.</p>
<p>Because all full nodes apply the same verification rules, they arrive at the same conclusion about the validity of the data.</p>
<p>Because these rules are the same in every node, they are called the consensus rules.</p>
<p>We say that the Bitcoin network reaches a consensus about the contents of the blockchain.</p>
<hr />
<p>So the consensus is an emergent property of the network. It isn't a thing that performs actions. It is wrong to say</p>
<ul>
<li>&quot;the blockchain uses the consensus to verify transactions&quot; (WRONG).
<ul>
<li>the blockchain is just data, it isn't an active agent that does things.</li>
<li>The consensus is just an emergent property, it isn't something that is used to perform actions.</li>
</ul>
</li>
<li>&quot;the consensus verifies the transaction&quot; (WRONG)
<ul>
<li>the consensus isn't a thing that can perform actions.</li>
<li>nodes verify transactions</li>
</ul>
</li>
<li>&quot;the consensus only generate the hash&quot; WRONG
<ul>
<li>the consensus isn't a thing that can perform actions.</li>
<li>miners calculate the block hash but so do all nodes that verify the block.</li>
</ul>
</li>
<li>&quot;before the consensus run for creating the new hash for new block.&quot; (WRONG)
<ul>
<li>There's no such thing as a &quot;consensus run&quot;</li>
<li>Hashes are not really <em>created</em> they are <em>calculated</em> from block data or transaction data that has been created. This may seem a minor distinction but I think it is important to be careful with words if we want to avoid confusion.</li>
</ul>
</li>
</ul>

CC BY-SA 4.0
2022-03-07T09:45:47.937Z
2022-03-07T09:45:47.937Z
RedGrittyBrick
<p>I think part of the confusion here is the fact that the word &quot;consensus&quot; is used in two different meanings here.</p>
<p>Bitcoin has a concept of &quot;consensus rules&quot;, which are the rules that all blocks and transactions must obey to be considered valid. They are called this way, because all nodes must implement them exactly the same way. If two nodes differ in their implementation of consensus rules, they risk ending up on permanently distinct chains (if both have hashrate and get blocks mined that are mutually inacceptable to the nodes).</p>
<p>In this sense, transactions are indeed verified according to the consensus rules before they end up in a block. Because transactions that do not follow these rules are simply ignored by nodes and dropped on the floor.</p>
<p>Yet, there is no consensus about these transactions. They're not in a block yet, so nodes have no way of knowing whether or not other nodes consider them part of the best chain. All they know is that they are valid, and eligible for inclusion in a block.</p>

CC BY-SA 4.0
2022-03-07T09:44:50.410Z
2022-03-07T09:44:50.410Z
Pieter Wuille
<p>The consensus protocol is the guarantee for stable operation of blockchain system. Nodes or computer on the network agree on a certain value or transaction through consensus protocol.</p>

CC BY-SA 4.0
2022-03-07T09:09:08.267Z
The consensus flow encodes the transactions with the nonce for generating a hash string for the block only, that mean the transactions should be verified before the consensus, isn't it?
Mark Smith
CC BY-SA 4.0
2022-03-07T08:13:35.503Z
2022-03-07T08:13:35.503Z
zeenat ali
<p>So many blockchain documentation tell that the blockchain uses the consensus to verify transactions. But what I understand the consensus only generate the hash to create the new block. I don't know why the documentation says that the consensus verifies the transaction while the transaction has been created (made) before the consensus run for creating the new hash for new block. The consensus flow does not care about the input (group of transactions), it doesn't know the transactions group are valid or not. Why the blockchain documentation say that?</p>

<transactions><blockchain><consensus>
How blockchain consensus verify the transaction?
Mark Smith
# How blockchain consensus verify the transaction?

(Asked by: username_0 on 2022-03-07)

So many blockchain documentation tell that the blockchain uses the consensus to verify transactions. But what I understand the consensus only generate the hash to create the new block. I don't know why the documentation says that the consensus verifies the transaction while the transaction has been created (made) before the consensus run for creating the new hash for new block. The consensus flow does not care about the input (group of transactions), it doesn't know the transactions group are valid or not. Why the blockchain documentation say that?

**Tags:** transactions, blockchain, consensus


---

## 3 answers

### Answer by username_1 on 2022-03-07. Score: 1

Every full node, such as a wallet like Bitcoin core, verifies all data independently.

Because all full nodes apply the same verification rules, they arrive at the same conclusion about the validity of the data.

Because these rules are the same in every node, they are called the consensus rules.

We say that the Bitcoin network reaches a consensus about the contents of the blockchain.

---

So the consensus is an emergent property of the network. It isn't a thing that performs actions. It is wrong to say

* "the blockchain uses the consensus to verify transactions" (WRONG).
  + the blockchain is just data, it isn't an active agent that does things.
  + The consensus is just an emergent property, it isn't something that is used to perform actions.
* "the consensus verifies the transaction" (WRONG)
  + the consensus isn't a thing that can perform actions.
  + nodes verify transactions
* "the consensus only generate the hash" WRONG
  + the consensus isn't a thing that can perform actions.
  + miners calculate the block hash but so do all nodes that verify the block.
* "before the consensus run for creating the new hash for new block." (WRONG)
  + There's no such thing as a "consensus run"
  + Hashes are not really *created* they are *calculated* from block data or transaction data that has been created. This may seem a minor distinction but I think it is important to be careful with words if we want to avoid confusion.


---

### Answer by username_2 on 2022-03-07. Score: 1

I think part of the confusion here is the fact that the word "consensus" is used in two different meanings here.

Bitcoin has a concept of "consensus rules", which are the rules that all blocks and transactions must obey to be considered valid. They are called this way, because all nodes must implement them exactly the same way. If two nodes differ in their implementation of consensus rules, they risk ending up on permanently distinct chains (if both have hashrate and get blocks mined that are mutually inacceptable to the nodes).

In this sense, transactions are indeed verified according to the consensus rules before they end up in a block. Because transactions that do not follow these rules are simply ignored by nodes and dropped on the floor.

Yet, there is no consensus about these transactions. They're not in a block yet, so nodes have no way of knowing whether or not other nodes consider them part of the best chain. All they know is that they are valid, and eligible for inclusion in a block.


---

### Answer by username_3 on 2022-03-07. Score: 0

The consensus protocol is the guarantee for stable operation of blockchain system. Nodes or computer on the network agree on a certain value or transaction through consensus protocol.

> **Comments:**
> **username_0**: The consensus flow encodes the transactions with the nonce for generating a hash string for the block only, that mean the transactions should be verified before the consensus, isn't it?  

---

