Whenever a new block is mined, it will be mined on a particular node. To understand the updated mining process, let's assume that we want a node, hosted on port 3001, to mine a new block for the blockchain:
- Firstly, the /mine endpoint will be hit on the selected node. When the /mine endpoint is hit, a new block is created by doing a proof of work.
- Once the new block is created, it is broadcast to all the other nodes in the network. All the other nodes will receive that new block at their /receive-new-block endpoint. This is shown in the following diagram:
- After the broadcast is complete, the entire network will ...