<blockquote>
<p>how a node first knows if there are conflicting blockchains,</p>
</blockquote>
<p>It receives two or more blocks each containing a pointer (block ID) to the same previous block.</p>
<blockquote>
<p>it is the longer blockchain</p>
</blockquote>
<p>Loosely speaking yes. In fact it is the chain with the most accumulated work. A long chain with low difficulty levels won't replace a shorter chain with higher difficulty levels.</p>
<blockquote>
<p>, is it possible for a miner to send a blockchain instead of a block</p>
</blockquote>
<p>No, the network protocol has no message type for that</p>
<blockquote>
<p>how does the node check if the transactions verified</p>
</blockquote>
<p>Nodes don't ever trust miners. Never. Nodes do all the validating themselves. Nodes don't use miners as a validating service. The only function of miners is choosing an order (sequence) for transactions.</p>
<p>The number of confirmations (not validations) of a transaction is simply the position of a transaction in the sequence. A transaction in the 19th block from the top has 19 confirmations.</p>
<hr />
<p>Everything described above, verification, confirmations, mining, nodes, blockchain fork and fork resolution would work just the same if Bitcoin blocks contained photos of cats instead of transactions. Nodes don't need a miner to tell them a photo of Pluto is not a picture of a cat, they can see that for themselves. They don't need a miner to tell them they have already seen a particular photo, they can check that themselves.</p>

CC BY-SA 4.0
2023-07-02T08:27:27.127Z
2023-07-02T08:44:48.947Z
2023-07-02T08:44:48.947Z
RedGrittyBrick
<p>Bitcoin has the longest chain rule as one of its consensus rule. Which means that the node should accept and extend the longest valid chain. If there are miners validating blocks that extend the same &quot;longest chain&quot; than a fork happens. you end up with multiple blockchains for a temporary amount of time. To resolve this miners will mine on whatever chain they believe is valid and eventually one will be larger than the others and is declared the canonical chain.</p>
<p>Basically whichever chain ends up longer first wins.
Nodes on shorter chains disregard them and switch over to referencing the longer chain as the source of truth</p>
<p>Miners dont send entire blockchains for validations as a response for your second q.</p>

CC BY-SA 4.0
2023-07-02T02:01:36.753Z
https://braiins.com/blog/bitcoin-chain-splits-explained-temporary-forks
TonyCrypto44
CC BY-SA 4.0
2023-07-02T02:01:52.033Z
Check the above article out
TonyCrypto44
CC BY-SA 4.0
2023-07-02T01:58:48.753Z
2023-07-02T01:58:48.753Z
TonyCrypto44
<p>I am curious to know how a node first knows if there are conflicting blockchains, I'm assuming, when two miners send a node a valid block, the node accepts the one it received first, and restores the second one in a cache. When new miners broadcasts blocks, and its previous hashes match the one in the cache, and it is the longer blockchain, it updates the blockchain to contain the new blocks.</p>
<p>Also, is it possible for a miner to send a blockchain instead of a block to be validated, if so, how does the node check if the transactions verified, does it only check the blockchain and the mempool to see if the transactions exist?</p>

<blockchain><full-node><blockchain-fork>
How does a node know if there are two conflicting blockchains?
CJ-Programmer
# How does a node know if there are two conflicting blockchains?

(Asked by: username_0 on 2023-07-02)

I am curious to know how a node first knows if there are conflicting blockchains, I'm assuming, when two miners send a node a valid block, the node accepts the one it received first, and restores the second one in a cache. When new miners broadcasts blocks, and its previous hashes match the one in the cache, and it is the longer blockchain, it updates the blockchain to contain the new blocks.

Also, is it possible for a miner to send a blockchain instead of a block to be validated, if so, how does the node check if the transactions verified, does it only check the blockchain and the mempool to see if the transactions exist?

**Tags:** blockchain, full-node, blockchain-fork


---

## 2 answers

### Answer by username_1 on 2023-07-02. Score: 2

> how a node first knows if there are conflicting blockchains,

It receives two or more blocks each containing a pointer (block ID) to the same previous block.

> it is the longer blockchain

Loosely speaking yes. In fact it is the chain with the most accumulated work. A long chain with low difficulty levels won't replace a shorter chain with higher difficulty levels.

> , is it possible for a miner to send a blockchain instead of a block

No, the network protocol has no message type for that

> how does the node check if the transactions verified

Nodes don't ever trust miners. Never. Nodes do all the validating themselves. Nodes don't use miners as a validating service. The only function of miners is choosing an order (sequence) for transactions.

The number of confirmations (not validations) of a transaction is simply the position of a transaction in the sequence. A transaction in the 19th block from the top has 19 confirmations.

---

Everything described above, verification, confirmations, mining, nodes, blockchain fork and fork resolution would work just the same if Bitcoin blocks contained photos of cats instead of transactions. Nodes don't need a miner to tell them a photo of Pluto is not a picture of a cat, they can see that for themselves. They don't need a miner to tell them they have already seen a particular photo, they can check that themselves.


---

### Answer by username_2 on 2023-07-02. Score: 0

Bitcoin has the longest chain rule as one of its consensus rule. Which means that the node should accept and extend the longest valid chain. If there are miners validating blocks that extend the same "longest chain" than a fork happens. you end up with multiple blockchains for a temporary amount of time. To resolve this miners will mine on whatever chain they believe is valid and eventually one will be larger than the others and is declared the canonical chain.

Basically whichever chain ends up longer first wins.
Nodes on shorter chains disregard them and switch over to referencing the longer chain as the source of truth

Miners dont send entire blockchains for validations as a response for your second q.

> **Comments:**
> **username_2**: https://braiins.com/blog/bitcoin-chain-splits-explained-temporary-forks  
> **username_2**: Check the above article out  

---

