The marvelous technology we know as Blockchain today was introduced with the invention of Bitcoin in 2008.
The concept of digital cash is nothing new (relatively speaking). The term has been around since the 80s, when David Chaum proposed his e-cash protocol models. One thing bitcoin accomplished where all others failes is solving the Byzantine Generals Problem. Only then was a form of electronic cash capable of solving the double spending problem.
You can learn more about the double spending and Byzantine Generals Problem here.
In 2008, a revolutionary paper entitled Bitcoin: A Peer-to-Peer Electronic Cash System was written on the topic of peer-to-peer electronic cash under the pseudonym Satoshi Nakamoto. In this paper, appeared for the first time, the term chain of blocks. This term later evolved over the years into the word blockchain.
The understanding of distributed systems is essential to the understanding of blockchain technology, as blockchain is a distributed system at its core. Blockchain is just a fancy word for distributed ledger, and distributed ledger is just a fancy word for information that lives in more than one place.
Yes, blockchain was originally intended to be and is usually used as a decentralized platform; despite that, it is not strictly necesary for a blockchain te posess such quality. However, in general blockchain can be thought of as a system that has properties of both decentralized and distributed paradigms.
We begin defining the quintessential components in a ditributed system: The node. In simple termns, a node can be defined as an individual player in a distributed system. All nodes should be capable of sending or receiving messages from any other node in the system, it doesn’t matter if these nodes are good honest nodes or naughty evil malicious blood sucking vampire nodes. Each node has memory and a procesor to prcoess information distributed accross the network. A node that exhibits dishonest behaviour is known as a Byzantine node after the Byzantine Generals Problem.
But what is a distributed system exactly? Well, nothing out of this world… A distributed system is a computing paradigm whereby two or more nodes work with each other in a coordinated fashion to achieve some common goal. A well thought-out distributed system should be one in which the end user sees a single local coherent platform, that is, the end shouldn’t be able to distiguish a distributed system from a plain old simple centralized system.
Check out What is the Byzantine Generals Problem? to learn more about the Byzantine Generals Problem.
A directed network with five nodes in which node 5 is Byzantine.
Informally, a blockchain is a secure, shared record keeping system in which each user of the data holds a copy of the records, which can only be updated if all parties involved in a transaction agree to update. In blockchain lingo: A blockchain is a peer-to-peer, distributed ledger that is cryptographically-secure, immutable, and updateable only via consensus or agreement among peers.
Blockchains use cryptography to secure transactions and make sure data is not tampered with within the blockchain.
A distributed ledger is a ledger that is spread across the network among all peers in the network, and each peer holds a copy of the complete ledger.
Peer-to-peer is just another way of saying there’s no third-party involvement between two indiduals. There is no central controller in the network. Every participant of the newtork can talk to each other directly. A famous example of a service that is peer-to-peer is: thepiratebay.
A blockchain is immutable and append only, (or at least it should be) which means that data can only be added to the blockchain in time-ordered sequential order. This is a property of supreme importance in all blockchain systems, since it asserts the validity of transactions and makes it so no user can spend the same token twice. A token is a currency or exchange medium that is used in a blockchain. On Bitcoin this token is Bitcoin and on Ethereum this token is Ether.
But what really makes a blockchain a blockchain is consensus. This is also Satoshi’s brilliant solution to the Byzantine Generals Problem. A blockchain must be updateable only via consensus. This is what makes a blockchain decentralized. any update made to the blockchain is validated against strict criteria defined by the blockchain protocol and added to the blockchain only after a consensus has been reached among all participating nodes on the network.
A block is a selection of transactions bundled together.
A transaction is a record of an event. A block is made up of transactions, and its block size varies depending on the specific objectives a blockchain wished to accomplish.
A genesis block is the first block in the blockchain that is hardcoded at the time the blockchain was first started.
A reference to a previous block is also included in the block unless it is a genesis block. The structure of a block is also dependent on the type and design of a blockchain. Generally, however, there are just a few attributes that are essential to the functionality of a block: the block header, which is composed of pointer to previous block, the timestamp, nonce, Merkle root (hash of all transactions in a block), and the block body that contains transactions.
A nonce is a random number that is used in many cryptographic operations to provide authentication, and encryption and more. In the case of Bitcoin, it’s used in PoW (Proof of Work) consensus algorithms and for transaction replay protection.
Addresses are unique identifiers used in a blockchain transaction to denote senders and recipients.
A transaction is the fundamental unit of a blockchain. A transaction represents a transfer of value from one address to another.
A block is composed of multiple transactions and other elements, such as those previously mentioned.
a peer-to-peer network is a network topology wherein all peers can communicate with each other and send and receive messages.
Scripting or programming language: Scripts or programs perform various operations on a transaction in order to facilitate various functions. For example, in Bitcoin, transaction scripts are predefined in a language called Script, which consist of sets of commands that allow nodes to transfer tokens from one address to another.
A node in a blockchain can take different performs various functions depending on the role that it takes on. A node can sign transactions and broadcast them to the network while other nodes can also propose and validate transactions and perform mining to facilitate consensus and secure the blockchain by adding confirmations to the blocks already present on the blockchain.
How blockchain architecture works basic understanding of blockchain and it’s architecture.
A node starts a transaction by first creating and then digitally signing it with its private key. A transaction is not limited to sending tokens to other users, it could represent an invocation of a smart contract or simply a message sent to another user on the nework.
A transaction is propagated by using a flooding protocol, called Gossip protocol, to peers that validate the transaction based on preset criteria.
Once the transaction is validated, it is included in a block, which is then propagated onto the network. At this point, the transaction is considered confirmed. The newly-created block now becomes part of the ledger, and the next block links itself cryptographically back to this block.
Transactions are then reconfirmed every time a new block is created. With every confirmation it becomes increasingly difficult to modify the content of a block (this is due to the PoW mechanism).
This concludes a basic exploration of what blockchain is and should give you an idea of its potential applications. If you wish to learn more about blockchain and it’s specifics concerning cryptocurrencies I recommend you visit Blockchain: Everything You Need to Know for a deeper understanding.
Written on January 18th, 2021 by José María Landa Chávez