Blockchain Architecture Basics PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document provides an overview of blockchain architecture, explaining its basic concepts and components. It highlights the differences between centralized and decentralized systems, using examples like a Google Doc to illustrate the decentralized nature of blockchain. The document also covers various types of blockchain architectures, emphasizing their roles in data security and cost reduction.
Full Transcript
Unit-1 Blockchain Architecture Basics What is Blockchain Architecture? Logically, a blockchain is a chain of blocks which contain specific information (database), but in a secure and genuine way that is grouped together in a...
Unit-1 Blockchain Architecture Basics What is Blockchain Architecture? Logically, a blockchain is a chain of blocks which contain specific information (database), but in a secure and genuine way that is grouped together in a network (peer-to-peer). In other words, blockchain is a combination of computers linked to each other instead of a central server, meaning that the whole network is decentralized. To make it even simpler, the blockchain concept can be compared to work done with Google Docs. You may recall the days of tossing over doc. documents and waiting for other participants to make necessary edits. These days, with the help of Google Docs, it is possible to work on the same document simultaneously. The blockchain technique allows digital information to be distributed, rather than copied. This distributed ledger provides transparency, trust, and data security. Blockchain architecture is being used very broadly in the financial industry. However, these days, this technology helps create software development solutions for cryptocurrencies and record keeping, digital notary, and smart contracts. Database vs. Blockchain Architecture The traditional architecture of the World Wide Web uses a client-server network. In this case, the server keeps all the required information in one place so that it is easy to update, due to the server being a centralized database controlled by a number of administrators with permissions. In the case of the distributed network of blockchain architecture, each participant within the network maintains, approves, and updates new entries. The system is controlled not only by separate individuals, but by everyone within the blockchain network. Each member ensures that all records and procedures are in order, which results in data validity and security. Thus, parties that do not necessarily trust each other are able to reach a common consensus. To summarize things, the blockchain is a decentralized, distributed ledger (public or private) of different kinds of transactions arranged into a P2P network. This network consists of many computers, but in a way that the data cannot be altered without the consensus of the whole network (each separate computer). The structure of blockchain technology is represented by a list of blocks with transactions in a particular order. These lists can be stored as a flat file (txt. format) or in the form of a simple database. Two vital data structures used in blockchain include: ▪ Pointers - variables that keep information about the location of another variable. Specifically, this is pointing to the position of another variable. ▪ Linked lists - a sequence of blocks where each block has specific data and links to the following block with the help of a pointer. Logically, the first block does not contain the pointer since this one is the first in a chain. At the same time, there is potentially going to be a final block within the blockchain database that has a pointer with no value. Basically, the following blockchain sequence diagram is a connected list of records: Blockchain architecture can serve the following purposes for organizations and enterprises: ▪ Cost reduction - lots of money is spent on sustaining centrally held databases (e.g. banks, governmental institutions) by keeping data current secure from cyber crimes and other corrupt intentions. ▪ History of data - within a blockchain structure, it is possible to check the history of any transaction at any moment in time. This is a ever-growing archive, while a centralized database is more of a snapshot of information at a specific point. ▪ Data validity & security - once entered, the data is hard to tamper with due to the blockchain’s nature. It takes time to proceed with record validation, since the process occurs in each independent network rather than via compound processing power. This means that the system sacrifices performance speed, but instead guarantees high data security and validity. Types of Blockchain Architecture Explained All blockchain structures fall into three categories: ▪ Public blockchain architecture A public blockchain architecture means that the data and access to the system is available to anyone who is willing to participate (e.g. Bitcoin, Ethereum, and Litecoin blockchain systems are public). ▪ Private blockchain architecture As opposed to public blockchain architecture, the private system is controlled only by users from a specific organization or authorized users who have an invitation for participation. ▪ Consortium blockchain architecture This blockchain structure can consist of a few organizations. In a consortium, procedures are set up and controlled by the preliminary assigned users. The following table provides a detailed comparison among these three blockchain systems: As mentioned, blockchain is a distributed journal where all parties hold a local copy. However, based on the type of blockchain structure and its context, the system can be more centralized or decentralized. This simply refers to the blockchain architecture design and who controls the ledger. A private blockchain is considered more centralized since it is controlled by a particular group with increased privacy. On the contrary, a public blockchain is open-ended and thus decentralized. In a public blockchain, all records are visible to the public and anyone could take part in the agreement process. On the other hand, this is less efficient since it takes a considerable amount of time to accept each new record into the blockchain architecture. In terms of efficiency, the time for each transaction in a public blockchain is less eco-friendly since it requires a huge amount of computation power compared to private blockchain architecture. Core Components of Blockchain Architecture: How Does It Work These are the core blockchain architecture components: ▪ Node - user or computer within the blockchain architecture (each has an independent copy of the whole blockchain ledger) ▪ Transaction - smallest building block of a blockchain system (records, information, etc.) that serves as the purpose of blockchain ▪ Block - a data structure used for keeping a set of transactions which is distributed to all nodes in the network ▪ Chain - a sequence of blocks in a specific order ▪ Miners - specific nodes which perform the block verification process before adding anything to the blockchain structure ▪ Consensus (consensus protocol) - a set of rules and arrangements to carry out blockchain operations ▪ Any new record or transaction within the blockchain implies the building of a new block. Each record is then proven and digitally signed to ensure its genuineness. Before this block is added to the network, it should be verified by the majority of nodes in the system. ▪ The following is a blockchain architecture diagram that shows how this actually works in the form of a digital wallet. Let's have a closer look at what is a block in a blockchain. Each blockchain block consists of: ▪ certain data ▪ the hash of the block ▪ the hash from the previous block The data stored inside each block depends on the type of blockchain. For instance, in the Bitcoin blockchain structure, the block maintains data about the receiver, sender, and the amount of coins. A hash is like a fingerprint (long record consisting of some digits and letters). Each block hash is generated with the help of a cryptographic hash algorithm (SHA 256). Consequently, this helps to identify each block in a blockchain structure easily. The moment a block is created, it automatically attaches a hash, while any changes made in a block affect the change of a hash too. Simply stated, hashes help to detect any changes in blocks. The final element within the block is the hash from a previous block. This creates a chain of blocks and is the main element behind blockchain architecture’s security. As an example, block 45 points to block 46. The very first block in a chain is a bit special - all confirmed and validated blocks are derived from the genesis block. Any corrupt attempts provoke the blocks to change. All the following blocks then carry incorrect information and render the whole blockchain system invalid. On the other hand, in theory, it could be possible to adjust all the blocks with the help of strong computer processors. However, there is a solution that eliminates this possibility called proof-of-work. This allows a user to slow down the process of creation of new blocks. In Bitcoin blockchain architecture, it takes around 10 minutes to determine the necessary proof-of-work and add a new block to the chain. This work is done by miners - special nodes within the Bitcoin blockchain structure. Miners get to keep the transaction fees from the block that they verified as a reward. Each new user (node) joining the peer-to-peer network of blockchain receives a full copy of the system. Once a new block is created, it is sent to each node within the blockchain system. Then, each node verifies the block and checks whether the information stated there is correct. If everything is alright, the block is added to the local blockchain in each node. All the nodes inside a blockchain architecture create a consensus protocol. A consensus system is a set of network rules, and if everyone abides by them, they become self-enforced inside the blockchain. For example, the Bitcoin blockchain has a consensus rule stating that a transaction amount must be cut in half after every 200,000 blocks. This means that if a block produces a verification reward of 10 BTC, this value must be halved after every 200,000 blocks. As well, there can only be 4 million BTC left to be mined, since there is a maximum of 21 million BTC laid down in the Bitcoin blockchain system by the protocol. Once the miners unlock this many, the supply of Bitcoins ends unless the protocol is changed. To recap, this makes blockchain technology immutable and cryptographically secure by eliminating any third-parties. It is impossible to tamper with the blockchain system; as it would be necessary to tamper with all of its blocks, recalculate the proof-of-work for each block, and also control more than 50% of all the nodes in a peer-to-peer network.