<p>It would first have to broadcast the first block. The way it works, the hash of the first block (including the nonce that is needed to solve the puzzle) would included in the second block. So the miner can't create the next block without first solving the puzzle for the first block because that's the only way to get that nonce.</p>

<p>So you can't work on two blocks and broadcast them simultaneously. The blockchain defeats that (that nonce which you can't tell till you have actually solved the block). You can work on two blocks to find the next block faster (although I doubt it's really reasonable since you have two split your hashing power between the workloads).</p>

<p>Now it's possible to broadcast the first block and find the next one  or two in quick succession. This happens. Finding the hash is brute force. It's a game of probability, which is basically just a fancy word for chance.</p>

CC BY-SA 3.0
2017-07-15T23:14:41.130Z
2017-07-15T23:14:41.130Z
AAA
<blockquote>
  <p>In the blockchain, every peer receives both transactions and blocks.</p>
</blockquote>

<p>Yes, nodes receive transactions and blocks from peers on request.</p>

<blockquote>
  <p>A peer will store the transactions they received into a local buffer, keep them ordered, and organize them into blocks. </p>
</blockquote>

<p>Yes. A node stores unconfirmed transactions in the <em>memory pool</em>.</p>

<blockquote>
  <p>Then, if this peer successfully solves the mathematical puzzle, it will broadcast the block it has. </p>
</blockquote>

<p>Yes. A node that finds a nonce yielding a block with a hash value within the target range will send it to connected peers, and they will relay the block further.</p>

<blockquote>
  <p>Otherwise, if this peer receives a block, it will update the existing transactions in its buffer according to the transactions in that newly received block.</p>
</blockquote>

<p>Yes. If a block with sufficient proof-of-work is received, it will be accepted and a new round of hashing will begin to extend the new block.</p>

<blockquote>
  <p>If the above process is correct, does a peer broadcast only 1 block each time when it solves the mathematical puzzle, or it can broadcast multiple blocks?</p>
</blockquote>

<p>A node will publish any number of blocks that extend the tip of the active chain. For example, if a node gets lucky and finds a block immediately after the last one, it will publish two blocks - a parent and a child.</p>

<blockquote>
  <p>If a peer can only broadcast 1 block, what if the peer has created multiple blocks since last time it has received or broadcast any block?</p>
</blockquote>

<p>A node can publish any block at any time. Whether or not peers accept the block is a different question around which the topic of "consensus" revolves.</p>

CC BY-SA 4.0
2018-06-16T16:10:33.573Z
2018-06-16T16:10:33.573Z
Rich Apodaca
<p>If a 'miner' wants to solve two blocks then this has to be done one after the other.  Indeed, solving a block implies that you find the hash-vale for that block that fulfils the condition of being smaller than a certain threshold (or, equivalently that the hash starts with a pre-specified number of zeroes). This is the 'proof of work'. </p>

<p>But, every solved block contains not only the transactions and a nonce, but it also contains the hash of the previous block in the chain.  So if a minder wants to solve two consecutive blocks it <strong>must first solve the first block</strong>, put the ('valid') hash of that block in the next block (this can not be done before solving the first block because else you do not know this) and <strong>then solve this next block</strong> (that includes the valid hash of the previous block).  </p>

<blockquote>
  <p>So the miner can only start solving the second block after it solved
  the first one.</p>
</blockquote>

<p>Of course a miner could decide to do so and try to find to consecutive blocks and then broadcast them (in the right order, because else they are invalid) to the network, but if in the meantime another miner solves a block, then these two blocks arrive 'too late' and will not be appended at the end of the blockchain.  </p>

<p>The risk of arriving 'too late'' is significant because - by the above-  that particular minor has to solve two blocks before <em>any</em> other minor solves one block. </p>

CC BY-SA 3.0
2017-09-14T13:35:17.260Z
2017-09-14T13:35:17.260Z
user0009
<p>Importantly it is generating a random solution to an insolvable "problem" that creates the non-deterministic authorization for a single node to publish a block that is acceptable to the rest of the network (ie. the lottery). "Mining" is a misnomer.</p>

<p>Some methods of attempting to exploit this have been discussed, but most prove impractical or inefficient. Some of these methods require winning nodes to hold back the winning block in an attempt to publish a valid fork of the blockchain unknowingly to the rest of the network. So what you describe is possible, theoretically.</p>

<p><a href="https://bitcoin.org/en/glossary/51-percent-attack" rel="nofollow noreferrer">https://bitcoin.org/en/glossary/51-percent-attack</a></p>

<p><a href="https://btc-hijack.ethz.ch/" rel="nofollow noreferrer">https://btc-hijack.ethz.ch/</a></p>

<p><a href="https://www.reddit.com/r/Bitcoin/comments/7uzm6o/game_theory_and_network_attacks_how_to_destroy/" rel="nofollow noreferrer">https://www.reddit.com/r/Bitcoin/comments/7uzm6o/game_theory_and_network_attacks_how_to_destroy/</a></p>

CC BY-SA 4.0
2018-06-10T21:52:23.440Z
2018-06-10T21:52:23.440Z
robertdavid
<p>A miner can only create a new valid block by solving the 'puzzle' (Proof of work) for that particular block. To broadcast more than one at once, it would have to have found a valid hash for <em>both</em> blocks, otherwise one of them would be invalid. The difficulty of the puzzle is chosen so that a block will roughly be found once every 10 minutes in the entire network. </p>

<p>I believe the 'buffer' you are talking about is the mempool. This holds all transactions that a node has seen which haven't been mined into a block (they are the unconfirmed transactions). Once a node receives a valid block from a miner, those transactions are no longer kept in the mempool.</p>

CC BY-SA 3.0
2017-07-14T05:41:49.207Z
2017-07-14T05:41:49.207Z
meshcollider
<p>Followings are some of my understandings about how bitcoin blockchain works, and want to confirm. Appreciate your comments and thoughts.</p>

<p>In the blockchain, every peer receives both transactions and blocks. A peer will store the transactions they received into a local buffer, keep them ordered, and organize them into blocks. Then, if this peer successfully solves the mathematical puzzle, it will broadcast the block it has. Otherwise, if this peer receives a block, it will update the existing transactions in its buffer according to the transactions in that newly received block. Please correct me if I am wrong.</p>

<p>If the above process is correct, does a peer broadcast only 1 block each time when it solves the mathematical puzzle, or it can broadcast multiple blocks? If a peer can only broadcast 1 block, what if the peer has created multiple blocks since last time it has received or broadcast any block?</p>

<blockchain><peers>
How blocks are created and broadcast?
Qi Zhang
# How blocks are created and broadcast?

(Asked by: username_0 on 2017-07-14)

Followings are some of my understandings about how bitcoin blockchain works, and want to confirm. Appreciate your comments and thoughts.

In the blockchain, every peer receives both transactions and blocks. A peer will store the transactions they received into a local buffer, keep them ordered, and organize them into blocks. Then, if this peer successfully solves the mathematical puzzle, it will broadcast the block it has. Otherwise, if this peer receives a block, it will update the existing transactions in its buffer according to the transactions in that newly received block. Please correct me if I am wrong.

If the above process is correct, does a peer broadcast only 1 block each time when it solves the mathematical puzzle, or it can broadcast multiple blocks? If a peer can only broadcast 1 block, what if the peer has created multiple blocks since last time it has received or broadcast any block?

**Tags:** blockchain, peers


---

## 5 answers

### Answer by username_1 on 2017-07-15. Score: 1

It would first have to broadcast the first block. The way it works, the hash of the first block (including the nonce that is needed to solve the puzzle) would included in the second block. So the miner can't create the next block without first solving the puzzle for the first block because that's the only way to get that nonce.

So you can't work on two blocks and broadcast them simultaneously. The blockchain defeats that (that nonce which you can't tell till you have actually solved the block). You can work on two blocks to find the next block faster (although I doubt it's really reasonable since you have two split your hashing power between the workloads).

Now it's possible to broadcast the first block and find the next one or two in quick succession. This happens. Finding the hash is brute force. It's a game of probability, which is basically just a fancy word for chance.


---

### Answer by username_2 on 2018-06-16. Score: 0

> In the blockchain, every peer receives both transactions and blocks.

Yes, nodes receive transactions and blocks from peers on request.

> A peer will store the transactions they received into a local buffer, keep them ordered, and organize them into blocks.

Yes. A node stores unconfirmed transactions in the *memory pool*.

> Then, if this peer successfully solves the mathematical puzzle, it will broadcast the block it has.

Yes. A node that finds a nonce yielding a block with a hash value within the target range will send it to connected peers, and they will relay the block further.

> Otherwise, if this peer receives a block, it will update the existing transactions in its buffer according to the transactions in that newly received block.

Yes. If a block with sufficient proof-of-work is received, it will be accepted and a new round of hashing will begin to extend the new block.

> If the above process is correct, does a peer broadcast only 1 block each time when it solves the mathematical puzzle, or it can broadcast multiple blocks?

A node will publish any number of blocks that extend the tip of the active chain. For example, if a node gets lucky and finds a block immediately after the last one, it will publish two blocks - a parent and a child.

> If a peer can only broadcast 1 block, what if the peer has created multiple blocks since last time it has received or broadcast any block?

A node can publish any block at any time. Whether or not peers accept the block is a different question around which the topic of "consensus" revolves.


---

### Answer by username_3 on 2017-09-14. Score: 0

If a 'miner' wants to solve two blocks then this has to be done one after the other. Indeed, solving a block implies that you find the hash-vale for that block that fulfils the condition of being smaller than a certain threshold (or, equivalently that the hash starts with a pre-specified number of zeroes). This is the 'proof of work'.

But, every solved block contains not only the transactions and a nonce, but it also contains the hash of the previous block in the chain. So if a minder wants to solve two consecutive blocks it **must first solve the first block**, put the ('valid') hash of that block in the next block (this can not be done before solving the first block because else you do not know this) and **then solve this next block** (that includes the valid hash of the previous block).

> So the miner can only start solving the second block after it solved
> the first one.

Of course a miner could decide to do so and try to find to consecutive blocks and then broadcast them (in the right order, because else they are invalid) to the network, but if in the meantime another miner solves a block, then these two blocks arrive 'too late' and will not be appended at the end of the blockchain.

The risk of arriving 'too late'' is significant because - by the above- that particular minor has to solve two blocks before *any* other minor solves one block.


---

### Answer by username_4 on 2018-06-10. Score: 0

Importantly it is generating a random solution to an insolvable "problem" that creates the non-deterministic authorization for a single node to publish a block that is acceptable to the rest of the network (ie. the lottery). "Mining" is a misnomer.

Some methods of attempting to exploit this have been discussed, but most prove impractical or inefficient. Some of these methods require winning nodes to hold back the winning block in an attempt to publish a valid fork of the blockchain unknowingly to the rest of the network. So what you describe is possible, theoretically.

<https://bitcoin.org/en/glossary/51-percent-attack>

<https://btc-hijack.ethz.ch/>

<https://www.reddit.com/r/Bitcoin/comments/7uzm6o/game_theory_and_network_attacks_how_to_destroy/>


---

### Answer by username_5 on 2017-07-14. Score: 0

A miner can only create a new valid block by solving the 'puzzle' (Proof of work) for that particular block. To broadcast more than one at once, it would have to have found a valid hash for *both* blocks, otherwise one of them would be invalid. The difficulty of the puzzle is chosen so that a block will roughly be found once every 10 minutes in the entire network.

I believe the 'buffer' you are talking about is the mempool. This holds all transactions that a node has seen which haven't been mined into a block (they are the unconfirmed transactions). Once a node receives a valid block from a miner, those transactions are no longer kept in the mempool.


---

