Everything You Need to Know about Blockchain Architecture

Kavya Tolety
Edureka
Published in
5 min readMar 1, 2019

Why is it called Blockchain? — Well, this is because it stores the transaction data in blocks, that are linked together to form a chain. As the number of transactions grows, so does the size of the blockchain. To get a clearer understanding of this glorious invention, let us discuss its architecture. The architectural components have been generalized and then modified by various companies, leading to different blockchain projects like Bitcoin, Ethereum, Hyperledger etc. In this blog, to keep things simpler, we shall discuss the bitcoin blockchain architecture.

Below is a list of the architectural components:

  • Transaction
  • Block
  • P2P Network
  • Consensus Algorithm

Prior to discussing the architecture, let us get a few things clear in our heads:

  • The blockchain is not Bitcoin; Blockchain is the technology behind Bitcoin.
  • Bitcoin is the digital token or cryptocurrency whereas blockchain is the ledger to keep track of transactions of those digital tokens.
  • Bitcoin without blockchain is not possible, but you can have a blockchain without Bitcoin.

Transaction

Transactions are the smallest building blocks of a blockchain system. They normally consist of a recipient address, a sender address, and a value. It is similar to a standard credit card statement. The owner transfers the value by digitally signing the hash produced by adding the previous transaction and the public key of the receiver.

The transaction is then publically announced to the network and all the nodes independently hold their own copy of the blockchain, and the current known “state” is calculated by processing each transaction in order as it appears in the blockchain. Transactions are bundled and delivered to each node in the form of a block. As new transactions are distributed throughout the network, they are independently verified and “processed” by each node. Each transaction is time-stamped and collected in a block.

Block

Block contains the information as a block header and transactions. Blocks are data structures whose purpose is to bundles sets of transactions and are replicated to all nodes in the network. Blocks in the blockchain are created by miners. Mining is the process to create a valid block that will be accepted by the rest of the network. Nodes take pending transactions, verify that they are cryptographically accurate, and package them into blocks to be stored on the blockchain. Block header is the metadata that helps in verifying the validity of a block. The contents of block metadata are shown in the image below

The rest of a block contains transactions. It can be any number of transactions bundled in a block depending on the choice of a miner.

Types of Blocks

  1. Most blocks simply extend the current main blockchain which is also the longest chain in the network. These blocks are called “main branch blocks”.
  2. Some blocks reference a parent block that is not at the longest blockchain. These blocks are called “side branch blocks”.
  3. Some blocks reference a parent block that is not known to the node processing the block. These are called “orphan blocks”.

Side branch blocks might not currently a part of the main branch, but if more blocks are mined that reference them as a parent, there is the possibility that a particular side branch will be restructured into the main branch. This brings in the concept of forking.

P2P Network

The blockchain is a peer to peer (P2P) network working on the IP protocol. A P2P network is a flat topology with no centralized node. All nodes equally provide and can consume services while collaborating via a consensus algorithm. Peers contribute to the computing power and storage that is required for the upkeep of the network. P2P networks are generally more secure because they do not have a single point of attack or failure as in the case of a centralized network. A blockchain network can be a permission-based network as well as a permissionless network. A permissionless network is also known as a public blockchain because anyone can join the network, while a permission-based blockchain is called a consortium blockchain. A permission-based blockchain or private blockchain requires pre-verification of the participants within the network and these parties are usually known to each other. In a typical blockchain architecture, every individual node in a network maintains a local copy of the blockchain. The decentralisation of blockchain architecture is the sole credit of the P2P network that it is built on.

Consensus Algorithm

The way all these copies of a single ledger is synchronized is due to a consensus algorithm. The consensus mechanism ensures that whatever local copy every individual party has, they are consistent with each other and is the most updated one. The copy that every individual node have are identical or similar to each other. It could be arguably stated that the consensus algorithm forms the core of every blockchain architecture. Some of the consensus algorithms are discussed below:

Proof-of-Work(POW)

It involves solving a computationally challenging puzzle in order to create new blocks in the blockchain network. It basically involves guessing the string that produces a 256-bit hash, produced by the popular hashing algorithm SHA256. The fact that hashing algorithms are irreversible stands as the fundamental pillar of such an approach to consensus achievement. Since someone has to go through a million guesses to verify the hash, the process gets its name ‘proof-of-work.

Proof of Stake(POS)

In this, nodes are known as validators. They validate the transactions to earn transaction fees. The nodes are randomly selected to validate the blocks and the probability of this random selection depends on the amount of stake that a particular node has.

Simplified Byzantine Fault Tolerance(SBFT)

Here basic idea involves a single validator who bundles the proposed transactions and forms a new block. Here the validator is a known party, given the permission-based nature of the ledger. The consensus is achieved as a result of a minimum number of other nodes in the network rectifying the new block.

This brings us to the end of this “Blockchain Architecture” blog. If you wish to check out more articles on the market’s most trending technologies like Artificial Intelligence, DevOps, Ethical Hacking, then you can refer to Edureka’s official site.

Do look out for other articles in this series that will explain the various other aspects of Blockchain.

1. Ethereum Tutorial

2. Ethereum Private Networks

3. What are Smart Contracts?

4. Solidity Tutorial

5. Truffle Ethereum Tutorial

6. Best Ethereum Development Tools

7. Hyperledger Fabric

8. Hyperledge vs Ethereum

Originally published at https://www.edureka.co on March 1, 2019.

--

--

Kavya Tolety
Edureka
Writer for

Hey! Just a normal girl on the internet who loves to read, research and analyze