<p>Let's assume that you are solo-mining.<br>
If you are a miner you need to run a Bitcoin Full-Node for example Bitcoin Core. If you do this you are a full part of the Bitcoin network.<br>
If you mine a block, you do the following steps:</p>

<ul>
<li>Putting transaction together and verify them</li>
<li>Doing the Proof-of-Work (Calculating the nounce until the first characters are zeros).</li>
<li>Adding stuff like coinbase and timestamps</li>
<li>Profit from the reward and transaction fees</li>
</ul>

<p>If this is done you broadcast the block to all nodes in the network the same way as broadcast a transaction. This means that all nodes are receiving this block. They are also checking it like if your block matches the difficulty and if the transaction are valid. Then they are adding it to their own local copy of the blockchain.</p>

<p>The nodes are broadcasting the blocks and transactions under each other. That's how peer to peer work. You should take a look at <a href="https://bitcoin.stackexchange.com/questions/62553/how-is-a-transaction-broadcasted">this</a></p>

CC BY-SA 4.0
2019-01-06T13:48:30.817Z
2019-01-06T13:48:30.817Z
Emil Engler
<p>To actually publish the block onto the Bitcoin network, you can use the <code>bitcoin-cli</code> command <a href="https://bitcoincore.org/en/doc/0.17.0/rpc/mining/submitblock/" rel="nofollow noreferrer"><code>submitblock</code></a>. You would have to serialize all the data in the block into hex format first. </p>

CC BY-SA 4.0
2019-02-06T09:17:41.727Z
2019-02-06T09:17:41.727Z
torkel
<p>Can anyone tell me what to do to publish if I mined a block</p>

<blockchain>
A node can publish any block at any time. How? How to publish?
Shilps
# A node can publish any block at any time. How? How to publish?

(Asked by: username_0 on 2019-01-06)

Can anyone tell me what to do to publish if I mined a block

**Tags:** blockchain


---

## 2 answers

### Answer by username_1 on 2019-01-06. Score: 1

Let's assume that you are solo-mining.  
If you are a miner you need to run a Bitcoin Full-Node for example Bitcoin Core. If you do this you are a full part of the Bitcoin network.  
If you mine a block, you do the following steps:

* Putting transaction together and verify them
* Doing the Proof-of-Work (Calculating the nounce until the first characters are zeros).
* Adding stuff like coinbase and timestamps
* Profit from the reward and transaction fees

If this is done you broadcast the block to all nodes in the network the same way as broadcast a transaction. This means that all nodes are receiving this block. They are also checking it like if your block matches the difficulty and if the transaction are valid. Then they are adding it to their own local copy of the blockchain.

The nodes are broadcasting the blocks and transactions under each other. That's how peer to peer work. You should take a look at [this](https://bitcoin.stackexchange.com/questions/62553/how-is-a-transaction-broadcasted)


---

### Answer by username_2 on 2019-02-06. Score: 0

To actually publish the block onto the Bitcoin network, you can use the `bitcoin-cli` command [`submitblock`](https://bitcoincore.org/en/doc/0.17.0/rpc/mining/submitblock/). You would have to serialize all the data in the block into hex format first.


---

