The updated mining process

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:

  1. 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.
  1. 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:

  1. After the broadcast is complete, the entire network will ...

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.