<blockquote>
  <p>1- how do miners in a network learn that there is a new transction added in one block?</p>
</blockquote>

<p>When a node recognizes a new block, it sends it to all the other nodes directly connected to it. It is very important for miners to build on top of the newest blocks they possibly can and to get their own blocks to as many other miners as quickly as they can (or they lose money) so miners, at least, go to extraordinary lengths to make this fast and efficient.</p>

<p>For new transactions not yet in blocks, more or less the same thing happens. Nodes in the bitcoin network distribute the transactions.</p>

<blockquote>
  <p>is there some party responsible for notifications or something?</p>
</blockquote>

<p>Anyone who wants notifications is responsible for making sure that they get them. Since pretty much everyone in the network does, this is not difficult. Nodes just share new transactions and new blocks.</p>

<blockquote>
  <p>after getting this information, must a miner re-copy the whole blockchain to his local computer?</p>
</blockquote>

<p>No. They just need to adjust their current state slightly.</p>

<blockquote>
  <p>2- As I understand, mining is done on blocks in bitcoin. So if someone add a transaction to a valid block, does this mean that the block has to be re-mined?</p>
</blockquote>

<p>If you modify a block, it's a different block entirely and not the block that was mined. If you try to produce a block by any process other than mining, you will simply fail to produce a valid block.</p>

<blockquote>
  <p>3- finally who decide to create a new block?</p>
</blockquote>

<p>Pretty much every miner is trying as hard as they can to create a new valid block all the time because they want the block reward that they will get if they are successful.</p>

<blockquote>
  <p>is there some conditions on the size of the block or is it unconditional unlimited process?</p>
</blockquote>

<p>There is a block size limit. If a miner produces a block that others will not consider valid, his block will just be ignored by the network and he will lose money. So miners must create blocks that comply with all the rules that other node operators enforce.</p>

CC BY-SA 4.0
2019-11-20T04:57:16.103Z
2019-11-20T04:57:16.103Z
David Schwartz
<p>Hi and welcome to Bitcoin stack</p>

<p>I will try to give an order to your question.</p>

<blockquote>
  <p>how do miners in a network learn that there is a new transaction added in one block? is there some party responsible for notifications or something? after getting this information, must a miner re-copy the whole blockchain to his local computer?</p>
</blockquote>

<p>I think don't is wrong if I comparing <strong>for the moment</strong> the bitcoin technology to torrent (this is ONLY for the moment), how you could send your data with torrent? in the torrent network, you can share information with the peer of equal importance, in the bitcoin is similar.
An example: You create the new bitcoin transaction with the wallet (an example is bitcoin core wallet) your wallet have associated other nodes, and when you sent your transaction with your wallet, you do send the transaction to these nodes connected with your node, the other nodes have another different node-connect and through the flooding event your transaction arrived on the network bitcoin and arrived at the miner (the miner has the full node plus the software for mining).
Not exist anything responsible to listen to the blockchain event.</p>

<blockquote>
  <p>As I understand, mining is done on blocks in bitcoin. So if someone adds a transaction to a valid block, does this mean that the block has to be re-mined?</p>
</blockquote>

<p>No, the block is a "container" (is a structure for contains the valid transactions).
The mining is done by the participants of the network and with the previous example:
You send the transaction with your wallet at the network bitcoin and when you publish the transaction on the network is si save in the memory zone of the node called mempool, the mining is executed for the transactions inside the mempool, the node of mining get your transaction and other, verify these and work for resolve the proof-of-work, when the miner wins the proof-of-work will create the new block with the all transactions valid (the transaction valid now, these transactions was contained in the mempool) and it will publish the new block inside the network. When the block was created it is immutable.</p>

<blockquote>
  <p>finally who decides to create a new block? Are there some conditions on the size of the block or is it an unconditional unlimited process?</p>
</blockquote>

<p>a partial response is inside point two, what do you mean with the dimension block?</p>

<p>The maximum dimension of the single block is 1Mb before the Segregated Witness ad 4Mb after Segregated Witness.</p>

<p>ps: What is the Segregated Witness? in another question. :)</p>

<p>ps: My English is bad and I'm learning sorry my answer is difficult to read, I hope some people helm me to fix my English in this question</p>

CC BY-SA 4.0
2019-11-19T17:54:24.287Z
2019-11-19T17:54:24.287Z
vincenzopalazzo
<p>Can someone please explain these fuzzy understanding?
I am trying to implement my proper demo application of blockchain, but now I discover that many concepts are not that clear..</p>

<p>1- how do miners in a network learn that there is a new transction added in one block? is there some party responsible for notifications or something? after getting this information, must a miner re-copy the whole blockchain to his local computer?</p>

<p>2- As I understand, mining is done on blocks in bitcoin. So if someone add a transaction to a valid block, does this mean that the block has to be re-mined?</p>

<p>3- finally who decide to create a new block? is there some conditions on the size of the block or is it unconditional unlimited process?</p>

CC BY-SA 4.0
2019-11-20T18:26:00.577Z
I have found this post useful and answer some of my questions https://blog.goodaudience.com/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476
SaliaMun
CC BY-SA 4.0
2019-11-20T18:26:56.060Z
@david schwarz, do you agree with the content of this https://blog.goodaudience.com/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476
SaliaMun
<blockchain><mining-theory>
Bitcoin mining process
SaliaMun
# Bitcoin mining process

(Asked by: username_0 on 2019-11-19)

Can someone please explain these fuzzy understanding?
I am trying to implement my proper demo application of blockchain, but now I discover that many concepts are not that clear..

1- how do miners in a network learn that there is a new transction added in one block? is there some party responsible for notifications or something? after getting this information, must a miner re-copy the whole blockchain to his local computer?

2- As I understand, mining is done on blocks in bitcoin. So if someone add a transaction to a valid block, does this mean that the block has to be re-mined?

3- finally who decide to create a new block? is there some conditions on the size of the block or is it unconditional unlimited process?

**Tags:** blockchain, mining-theory

> **Comments:**
> **username_0**: I have found this post useful and answer some of my questions https://blog.goodaudience.com/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476  
> **username_0**: @username_1 schwarz, do you agree with the content of this https://blog.goodaudience.com/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476  

---

## 2 answers

### Answer by username_1 on 2019-11-20. Score: 2 | Accepted answer

> 1- how do miners in a network learn that there is a new transction added in one block?

When a node recognizes a new block, it sends it to all the other nodes directly connected to it. It is very important for miners to build on top of the newest blocks they possibly can and to get their own blocks to as many other miners as quickly as they can (or they lose money) so miners, at least, go to extraordinary lengths to make this fast and efficient.

For new transactions not yet in blocks, more or less the same thing happens. Nodes in the bitcoin network distribute the transactions.

> is there some party responsible for notifications or something?

Anyone who wants notifications is responsible for making sure that they get them. Since pretty much everyone in the network does, this is not difficult. Nodes just share new transactions and new blocks.

> after getting this information, must a miner re-copy the whole blockchain to his local computer?

No. They just need to adjust their current state slightly.

> 2- As I understand, mining is done on blocks in bitcoin. So if someone add a transaction to a valid block, does this mean that the block has to be re-mined?

If you modify a block, it's a different block entirely and not the block that was mined. If you try to produce a block by any process other than mining, you will simply fail to produce a valid block.

> 3- finally who decide to create a new block?

Pretty much every miner is trying as hard as they can to create a new valid block all the time because they want the block reward that they will get if they are successful.

> is there some conditions on the size of the block or is it unconditional unlimited process?

There is a block size limit. If a miner produces a block that others will not consider valid, his block will just be ignored by the network and he will lose money. So miners must create blocks that comply with all the rules that other node operators enforce.


---

### Answer by username_2 on 2019-11-19. Score: 0

Hi and welcome to Bitcoin stack

I will try to give an order to your question.

> how do miners in a network learn that there is a new transaction added in one block? is there some party responsible for notifications or something? after getting this information, must a miner re-copy the whole blockchain to his local computer?

I think don't is wrong if I comparing **for the moment** the bitcoin technology to torrent (this is ONLY for the moment), how you could send your data with torrent? in the torrent network, you can share information with the peer of equal importance, in the bitcoin is similar.
An example: You create the new bitcoin transaction with the wallet (an example is bitcoin core wallet) your wallet have associated other nodes, and when you sent your transaction with your wallet, you do send the transaction to these nodes connected with your node, the other nodes have another different node-connect and through the flooding event your transaction arrived on the network bitcoin and arrived at the miner (the miner has the full node plus the software for mining).
Not exist anything responsible to listen to the blockchain event.

> As I understand, mining is done on blocks in bitcoin. So if someone adds a transaction to a valid block, does this mean that the block has to be re-mined?

No, the block is a "container" (is a structure for contains the valid transactions).
The mining is done by the participants of the network and with the previous example:
You send the transaction with your wallet at the network bitcoin and when you publish the transaction on the network is si save in the memory zone of the node called mempool, the mining is executed for the transactions inside the mempool, the node of mining get your transaction and other, verify these and work for resolve the proof-of-work, when the miner wins the proof-of-work will create the new block with the all transactions valid (the transaction valid now, these transactions was contained in the mempool) and it will publish the new block inside the network. When the block was created it is immutable.

> finally who decides to create a new block? Are there some conditions on the size of the block or is it an unconditional unlimited process?

a partial response is inside point two, what do you mean with the dimension block?

The maximum dimension of the single block is 1Mb before the Segregated Witness ad 4Mb after Segregated Witness.

ps: What is the Segregated Witness? in another question. :)

ps: My English is bad and I'm learning sorry my answer is difficult to read, I hope some people helm me to fix my English in this question


---

