Block chain architecture

blockchain architecture-2
Share on facebook
Share on twitter
Share on pinterest

Introduction

A blockchain is a mesh network of computers linked not to a central server but rather to each other. Computers in this network define and agree upon a shared state of data and adhere to certain constraints imposed upon this data.

This shared state is simply a distributed state machine, with each “block” making a change to the current, known, shared state.

 

In general, blockchain technology has the core characteristics of decentralization, accountability, and security. This technique can improve operational efficiency and save costs significantly. The demand and usage of applications built on blockchain architecture will only evolve.

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 is employed not only for cryptocurrencies, but also for record keeping, digital notary, and smart contracts.

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.

Blockchain Hashing

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 Structure

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

Nodes in Public vs. Private Blockchains

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.

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 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..

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.

Blockchain Network Creation

Once an organization, or a few, decide to implement a blockchain solution, they are already creating a network. The network could be viewed as companies with their personnel or from the perspective of the technical infrastructure within these companies.

To make it more concrete, let’s take the example of diamonds. Risks and challenges associated with diamonds exist during every part of the process, from the extraction of diamonds to their final, commercial result. Consumers want to be sure they are purchasing real and ethical diamonds. Government institutions want to keep track of their taxation and exports. Blockchain architecture can be used to eliminate these risks.

The parties involved in this network include:

  • Diamond Manufacturers
  • Government Institutions
  • Diamond Transporters
  • Diamond Sellers

Blockchain solutions organize all these parties into a peer-to-peer network that helps to remove all the mentioned risks and build a transparent system. Everyone would receive access to the synchronized data of a “shared, immutable ledger” and be able to keep track of the diamond’s moving from manufacturing to the final consumer. The blockchain ledger would hold the sequence of all actions occurring like diamond mining, refining, and distribution.

In most cases, each organization within a network holds their own copy synced together with clever protocols and technical layers of blockchain network (called peers). As well, in order to outline a few processes happening at the same time, there is the Ordering Service. This is shared among all parties deciding the transactions within the blockchain structure and their order. In case with multiple users, there is a Membership Services Provider (MSP) that allows access for particular users inside the network.

In the end, all the transactions during this path are kept in a general ledger (e.g data with diamond photos, place of extraction, color, serial number, place where it was cut, purified, sold, etc.). This information is complete and authentic.

Here is a high-level hyperledger architecture diagram to create a blockchain solution.

Diagram from the Hyperledger Composer

Blockchain Code Creation

After the blockchain network is set up, the next step is to agree upon the type of business transactions happening inside the blockchain architecture. In reality, these rules are written in legal agreements. Logically, within the blockchain code, this refers to a Smart Contract (also called as Chaincode or Business Network Definition from Hyperledger Composer).

As in the real world, the blockchain contract has participants, assets, and transactions. For each transaction, a Transactional Processor Function is written (reflects JavaScript) and lays out the things that will happen once the transaction has been generated.

Skills Required to Build Blockchain Architecture

To be a blockchain developer is a demanding task that requires a lot of technical skills and a complex background. Generally, in order to work with blockchain architecture, a strong background in Computer Science or Engineering is most desirable. As well, knowledge pertaining to consensus methods, data structures, decentralized ledgers, cryptographies and cryptocurrencies, and data security is also highly sought after.

Recently, the task of developing a blockchain has been simplified with the help of Ethereum and other similar blockchain software. Ethereum is an open source software platform based on blockchain technology allowing for the building and deployment of decentralized applications (DApps).

In terms of the coding skills required to develop a blockchain solution, one should become familiar with a range of programming languages, not one specifically. If the goal is to implement a customizable blockchain system, programming languages such as C++, Python, C, Java, and Ruby help to accomplish this task. As well, web development skills like HTML, CSS, Node JS could become handy.

In case you are interested in writing smart contracts (smart contracts are the programs stored in the blockchain system and used to automatically exchange coins or any other funds based on predefined conditions) using Ethereum, the contract-based programming language Solidity is required.

Aside from hard programming skills, blockchain developers need to understand business requirements and operations, as well as possess great cooperation and negotiation skills.

Key Characteristics of Blockchain Architecture

Blockchain architecture possesses a lot of benefits for businesses. Here are several embedded characteristics:

  • Cryptography – blockchain transactions are validated and trustworthy due to the complex computations and cryptographic proof among involved parties
  • Immutability – any records made in a blockchain cannot be changed or deleted
  • Provenance – refers to the fact that it is possible to track the origin of every transaction inside the blockchain ledger
  • Decentralization – each member of the blockchain structure has access to the whole distributed database. As opposed to the central-based system, consensus algorithm allows for control of the network
  • Anonymity– each blockchain network participant has a generated address, not user identity. This keeps users’ anonymity, especially in a public blockchain structure
  • Transparency – the blockchain system cannot be corrupted. This is very unlikely to happen, as it requires huge computing power to overwrite the blockchain network completely

Create Your Own Blockchain Architecture

To summarize everything, blockchain technology can be viewed from business, legal, and technical perspectives as a great solution. It can help businesses run daily operations more easily within a network of mutually agreeing members. From a legal perspective, any intermediaries are excluded from the blockchain ledger and any connection is made between involved parties only. At the same time, technically, it ensures control, security, and privacy of data inside the system.

Blockchain technology enables organizations & companies in the following ways:

  • Possibility to complete transactions much more quickly and with trust
  • Cost reduction for businesses, or cross-enterprise processes while removing intermediaries, inefficiencies, and duplications
  • Introduction of modern digital interaction
  • Opportunity to keep detailed control over business processes and transactions without a central control point
  • Remove cheating, cyber attacks, or other electronic crimes

A blockchain, with its transparent mechanisms and maximum clarity, will ultimately revolutionize the way individuals and societies carry out transactions and deal with one another. Unsurprisingly, many projects already exist using blockchain architecture.

The future looks bright for blockchain solutions. These are applied in fields like crowdfunding, stock trading, the sharing economy, in many aspect of the healthcare industry, etc.

Any questions?

Our mission

To bridge the gap between education and the market place.

our Vision

To be the education and innovation hub of Africa.

© 2019 All rights reserved​

@Tutorgram