<ol>
<li><p>They don't know about the new block until they receive it over the peer-to-peer network (or some other way, e.g. <a href="http://bitcoinfibre.org/" rel="nofollow noreferrer">FIBRE</a>).  But since it was broadcast to the network, and all nodes on the network will be trying to relay it to all their peers, this should happen pretty quickly.</p></li>
<li><p>When they receive the block, they know to exclude those transactions in their own blocks.  (In practice, they probably generate a whole new candidate block, including only transactions not already confirmed, and with a new header that lists the just-received block as its parent.)</p></li>
<li><p>When the node changes its mind about which branch is active, transactions from the previously active branch (subsequent to the block where they diverged) are returned to the memory pool, except for those which are already in the new active branch, or conflict with a transaction on that branch.  Then, just like all other transactions in the memory pool, they are eligible for inclusion in future blocks created by this node.</p></li>
</ol>

CC BY-SA 3.0
2018-03-07T04:27:16.407Z
2018-03-07T04:27:16.407Z
Nate Eldredge
<p>As new transactions are broadcasted, the nodes keep them in a pool of unconfirmed transactions.</p>

<p>One node will add it to a block as soon as it finds a proof of work. At the same time many other nodes are working on the same transactions. When a new block is broadcasted to the network, it should either be marked as confirmed or removed from the pool.</p>

<p>I have a few questions about this process:</p>

<p>1- how the other nodes know the new block is already created so they should stop working on it? (or they don't?)</p>

<p>2- when a new block of transactions are added to the blockchain how the other nodes know they should not consider that transactions in their next attempt? They read the node and mark the transaction as confirmed of remove them? Is there any other kind of message they exchange?</p>

<p>3- if 2 new blocks are added to the blockchain in different branches. the first branch as active because that block came first. a new block arrives and the second branch is discarded. what happens to the transactions in the discarded branch? they are already in the other two blocks of the blockchain for sure? what do the nodes do with them?</p>

<p>thanks!</p>

<transactions><mining-theory><proof-of-work><consensus>
When does a node mark a transaction as confirmed or unconfirmed?
Victor Ferreira
# When does a node mark a transaction as confirmed or unconfirmed?

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

As new transactions are broadcasted, the nodes keep them in a pool of unconfirmed transactions.

One node will add it to a block as soon as it finds a proof of work. At the same time many other nodes are working on the same transactions. When a new block is broadcasted to the network, it should either be marked as confirmed or removed from the pool.

I have a few questions about this process:

1- how the other nodes know the new block is already created so they should stop working on it? (or they don't?)

2- when a new block of transactions are added to the blockchain how the other nodes know they should not consider that transactions in their next attempt? They read the node and mark the transaction as confirmed of remove them? Is there any other kind of message they exchange?

3- if 2 new blocks are added to the blockchain in different branches. the first branch as active because that block came first. a new block arrives and the second branch is discarded. what happens to the transactions in the discarded branch? they are already in the other two blocks of the blockchain for sure? what do the nodes do with them?

thanks!

**Tags:** transactions, mining-theory, proof-of-work, consensus


---

## 1 answers

### Answer by username_1 on 2018-03-07. Score: 2

1. They don't know about the new block until they receive it over the peer-to-peer network (or some other way, e.g. [FIBRE](http://bitcoinfibre.org/)). But since it was broadcast to the network, and all nodes on the network will be trying to relay it to all their peers, this should happen pretty quickly.
2. When they receive the block, they know to exclude those transactions in their own blocks. (In practice, they probably generate a whole new candidate block, including only transactions not already confirmed, and with a new header that lists the just-received block as its parent.)
3. When the node changes its mind about which branch is active, transactions from the previously active branch (subsequent to the block where they diverged) are returned to the memory pool, except for those which are already in the new active branch, or conflict with a transaction on that branch. Then, just like all other transactions in the memory pool, they are eligible for inclusion in future blocks created by this node.


---

