Hey, everyone.
Welcome back to the course.
Up till now, we have talked about how blockchain works, and we have also seen different kinds of platforms
and questions you can ask yourself for employing blockchain solutions.
All these platforms and questions in the end fit into the blockchain architecture.
Now let's go and understand a typical blockchain architecture.
What kind of different layers are required for the blockchain architecture and how we can create our
architecture related to the same.
This is a general view of blockchain architecture.
As you can see in this architecture diagram, we have defined five different layers.
The bottom layer is described as data layer, which holds all the information about the block's data
and cryptography.
This layer includes the data blocks, transactions, Merkle tree hash functions, chain structures and
cryptographic protocols.
This layer will also define all the blockchain parameters required for the network.
The second layer is shown in blue is the network layer.
The network layer defines the functionalities which are required for the networking of the blockchain
network Layer defines how the nodes are going to connect the handshaking process between the nodes and
the validations.
Nodes will perform to authenticate the other nodes in whole network Layer includes the protocols and
functionalities defining peer to peer and relay network systems.
The third layer is shown in green is the consensus layer.
Consensus layer is the one which makes sure that the data is validated and immutably stored on top of
blockchain.
The nodes inside the blockchain network provides a vote over the transaction or block data, and if
the total number of votes is greater than two by three of total participants, then the consensus is
achieved and data is securely stored over the network where nobody can modify it.
The consensus layer holds consensus algorithms and consortium definitions.
Different consensus algorithms may be used within the consensus layer, including proof of work, proof
of stake, delegated proof of stake, or some other implementation of Byzantine fault tolerance.
After the consensus layer, we have insensitive layer displayed in red.
As the name suggests, the insensitive layer does not affect the blockchain architecture.
Even if the insensitive layer is removed from the architecture, the blockchain will function smoothly.
As you can see in the image, insensitive layer is only holding the block rewards and the transaction
fees.
If we remove the reward distribution and the transaction fees from the blockchain network, it won't
affect the blockchain as such.
The last layer shown in dark blue is the application layer.
The application layer is at the top of the architecture as it allows users to connect with the blockchain.
The end users will use the client side applications for interacting with the blockchain application
layer holds both the tools demonstrating the working of blockchain as well as user applications performing
specified use cases.
Different kinds of services can also be part of this layer services like a virtual machine, decentralized
applications, explorers or smart contracts may also be available in this layer, which would help in
engaging with the front end blockchain systems.
This image shown here is another view for the blockchain architecture.
In this image you can see different types of layered architecture.
The public layer is shown in red.
The enterprise layer is displayed in violet color and the application layer can be observed in the orange
color.
At the bottom we have network model, which is holding protocols like peer to peer for the public layer
and enterprise, peer to peer for enterprise layer.
The model above the network is the core blockchain.
As we have mentioned, there is no concrete architecture for the complete blockchain system.
You can define your own architecture.
The first architecture diagram which we had shown you had the core blockchain at the bottom and the
network layer above it.
But in this diagram we are keeping the network model on the bottom and the core blockchain above it.
The core blockchain consists of specifications like on chain or off chain storage, synchronization
options, virtual machine capabilities for compiling the smart contracts, public or private consensus
mechanism trusted execution processes, and all the other entities required to store the data and execution
with provision of consensus.
The core blockchain model will be different for public and enterprise layer, which can be seen in this
image.
After the core blockchain.
We have a privacy and scaling model within the privacy and scaling.
We can find the computation, algorithms and processes required for the security and scaling of the
blockchain network.
In this model, we may also have wallets and private transactions for the enterprise layer, which can
be modeled accordingly for better scaling.
We can also define the capabilities and computation requirements for on chain and off chain storage,
which will give us a much better view of the privacy and scaling required for the network.
The privacy and scaling model is then linked with the tooling model.
The tooling model consists of the interfaces as well as the integration and deployment services.
The tools required for the public layer may be different from the enterprise layer.
The public layer may include the tools like key management, interchain, utilities and wallets for
handling user credentials.
It may also define the API protocols required for the public blockchain to interact with the user applications.
The enterprise layer tools might include hardware, security modules and some identity management services
which can provide permission and authenticate users.
For example, in Hyperledger, we have a membership service provider which acts as an identity manager
and work similarly like Active Directory for the integration and deployment tools.
We might have integration libraries or software development kits available.
For example, Bitcoin and Ethereum use Json-rpc commands for integrating user applications.
Moreover, Ethereum also provides Web3 JS library, which helps us in incorporating the blockchain to
the applications.
Enterprise layer needs not to be open for all.
That's why it might use enterprise management tools to integrate with the applications.
Enterprise layer may also include oracles, which provide external data into the blockchain.
The final model in our architecture is the application model.
The application model is mostly the same for both the public and enterprise layers.
Whenever we are working with any technology, we need to have a client based application available which
will be used by the users to interact with the technology in our application model.
Apart from the decentralized front end applications, we might also have explorers and monitoring tools
which help in analyzing and auditing the blockchain networks.
Examples of front end applications could be health records, storage or land record storage.
These applications will utilize the capabilities of the blockchain.
Apart from that, we can also keep smart contracts and standards required for the smart contracts.
Governments and enterprises can define compliances and standards for the applications and smart contracts.
For example, in Ethereum blockchain we have token standards like ERC 20 or ERC 71.
These standards provide different functions and capabilities for different use cases.
Finally, we can also keep programming languages required to develop smart contracts and decentralized
applications, as well as formal verification processes to safeguard the data storage and sharing.
That was about the blockchain architecture and how different architectures are available for the blockchain.
The architectures explained here are the internal blockchain architectures for an enterprise blockchain
architecture.
You may utilize multiple services which will support and manifest the complete enterprise solution.
Your blockchain architecture may also be dependent upon the platform you are utilizing.
Hyperledger and Corda Services offers a private and enterprise solution.
Blockchain architecture with different services like channel management and membership service provider.
Whereas Ethereum and Bitcoin may provide some other different kinds of design patterns which you can
utilize for your enterprise needs, you have to choose carefully which kind of internal blockchain architecture
you are utilizing and what kind of integration services you are going to open up to make sure that your
system is functioning as a whole.
In the next lecture, we are going to learn about the different components which are going to affect
your blockchain architecture, including the business and technical components.
If you have any queries, feel free to contact us at info at the rate v2 blocks.com.