All the operations that happen on a blockchain (from a simple transaction to a more complex interaction with a smart contract) go through the same process:

Untitled

  1. A user triggers the operation. First, users need a wallet to interact with a blockchain. Wallets store and manage a user’s private and public keys:

    A private key is the most critical piece of information a user needs to take custody of their funds. Losing or forgetting the private key would mean that the user could no longer interact with a blockchain and, therefore, would be unable to retrieve the funds.

    Example: Alice writes the information of a transaction (To: Bob Send: 1BTC), signs it with the private key through her wallet, and sends it to the blockchain.

  2. Operations then enter the mempool: a waiting line where all operations from all different users wait for validators to pick them up and process them.

  3. Validators take transactions from the mempool and bundle them in blocks: a finite list of operations launched by users. At this point, blocks are just suggestions, and transactions are not yet finished.

  4. The block gets validated through a consensus mechanism. Different blockchains use different mechanisms: the most popular ones are Proof of Work and Proof of Stake.

  5. The validated block is added to the blockchain, and the transaction is considered complete and immutable.

  6. The new configuration of the blockchain is broadcast to all the network nodes. From this moment on, the information contained in each block becomes publicly accessible.

In our example, Bob can now check the blockchain to verify that his balance has been updated to reflect Alice’s payment. **


Go to the next chapterIntroduction to smart contracts