DEV Community

Cover image for Digest of Papers: Bitcoin: A Peer-to-Peer Electronic Cash System
Gustavo Preciado
Gustavo Preciado

Posted on

Digest of Papers: Bitcoin: A Peer-to-Peer Electronic Cash System

Satoshi Nakamoto

Bitcoin is the most popular blockchain implementation and its whitepaper written by the anonymous Satoshi Nakamoto was one of the first papers that divided and explained each element required for blockchain implementation. The purpose of this paper was to eliminate the necessity of having a trusted third party entity, like banks, as the only way to avoid the double-spending problem in money transactions.

Transactions

Blocks in Bitcoin are data structures designed to store all the information about money transactions between users, so each time that one user sends one coin to other its create a transaction that includes an electronic signature composed by the previous transaction hash and the public key of the new owner, this signature allows the receiver to validate that the transactions were for him, but he cannot validate the previous owner didn't send the same coin to another user. Additionally, transactions can have multiple inputs and outputs to split and combine coins into groups.

Proof of Work

PoW is a computational challenge consist of finding a certain value that can be added to the next block and after applying a hash function, like SHA-256, it returns a specific amount of zeros at the begging. The computing capacity required by this challenge is the shield against attackers who want to add corrupted blocks because they will need to have the 51% total capacity of the network to produce the accepted next block due to the consensus algorithm make each node to prefer the largest chain so you have to be the first in resolve the PoW.

In order to works in the long term, the PoW has to increase the difficulty to match the increment in components capacity so the network is constantly changing the challenge by requiring more and more zeros.

Of course, none of the network's nodes want to put this capacity for free so there is a transaction fee that is paid to the one who solves the challenge, and also the generation of a new block creates new coins that are inserted into the network via the solver this inflation of the coin its expect to be unnecessary in the future and the reward will be only the transaction fee.

Network

Each new transaction is added to the blockchain and spread around the network in 6 steps:
The transaction is broadcast to all nodes.
Each node group new transactions in one block.
Each node start working in the PoW.
One node solves the PoW and broadcast the new block.
All nodes accept the largest chain of new blocks that pass the PoW.
Each node adds the new blocks to the chain and starts working in the next.

Merkle Tree

With the accumulative history of transactions, the whole chain can require a lot of disk space in the nodes so a Merkle tree is used as the data structure of this history because it allows the nodes to order the hashes in a way that it is easy to delete the oldest transactions of a coin without breaking the operation.

Privacy

Each transaction in the network is public so everyone knows where the coins are, but the only data available is the value that is being transferred and the public key of the receiver so you can't know who this is person or entity is.

Top comments (0)