Here.
We won.
Welcome back to the course.
So now, after discussing the business and the technical components which factor into the blockchain
architecture, the blockchain platforms also provides a way into how you are going to make your enterprise
applications interact with blockchain solutions.
In this lecture, we are going to go through different blockchain platforms and we are going to analyze
their architecture and see how different capabilities and components perform within these different
blockchain platforms.
This will help us to realize our enterprise solutions because if we are familiar with the blockchain
platform architecture, then we can easily take up the components which are required to be integrated
with the blockchain platform to create the whole solution.
So the first architecture we are going to see is for the Bitcoin blockchain.
Bitcoin was the pioneer for blockchain back in 2009 when everything started for blockchain inside Bitcoin
Blockchain, it provides you a very core blockchain architecture which you can utilize as a base for
different other blockchain platforms.
As you can see in this diagram, we have a app here.
This app is a user based application.
This user based application is connected with the blockchain through a RPC services, which are remote
procedure calls.
Remote procedure calls are used by the application to submit transaction or details on top of blockchain.
This remote procedure calls always happens through a wallet.
What is a wallet?
In Bitcoin terms, wallet is a storage of private key and public addresses.
If a user wants to send a transaction, they are going to use the private key associated with the wallet
to sign the transaction.
If a user is going to receive the transaction, they are going to use the public address, which is
part of the wallet.
This wallet is part of the storage engine.
Storage engine provides us header blocks and coins.
Header blocks and coins are basically the different entries inside a block.
So once a wallet is present, their wallet receives the transaction from the application through the
remote procedure calls and through a connection manager.
Send these transactions to a memory pool.
Memory pool is like a table which is hosted by every peer inside the Bitcoin blockchain.
It's more of like a storage where all the transactions which are not yet validated or verified, are
stored and miners are going to take the transactions from the memory pool, verify them and then push
it over the blockchain.
So memory pool is a kind of like a data storage which is present with every node inside the blockchain
network.
Every node will have the memory pool and this memory pool will be synchronized throughout the ecosystem.
The transactions which come into the memory pool are then taken by the miners.
Miners are going to take the transactions out of the memory pool and then pass it through a validation
engine.
Validation engine is basically checking the transactions for the validation of if the transactions are
correctly posted inside the memory pool.
Some of the primary checks which Bitcoin performs are related to whether the transaction has the correct
signature, whether the sender has provided the correct address for the transaction, whether the sender
has the correct balance to send this transaction, whether the receiver has the address for the transaction
or not.
So all those different kinds of validations are performed by the miner.
Once those validations are done, the transaction is put with the block.
The block is composed of different kinds of information.
Some of the important information inside a Bitcoin block are the headers which incorporates the block
identity and transaction.
Merkle Root.
Also, we have the complete transactions in form of an array which is appended with the block.
Apart from this, we can also have metadata information related to some kind of data inside a block.
So the main job of miners here is to take out the transaction from the memory pool table and then push
it inside a block which is open for ten minutes with the Bitcoin.
Apart from adding the transactions inside the block, the miners also provide a nonce value inside the
block.
This nonce value is provided in such a way that the Bitcoin block has a certain number of leading zeros
associated with it, and nonce value is present with the Bitcoin blockchain to make sure that the attacker
is facing difficulty in attacking the blockchain itself.
Once the block is being formed and the nonce value has been guessed by the miner, this block is pushed
into the P2P network through the connection manager.
The connection manager defined here could be your TCP services or Https services.
In Bitcoin blockchain, we mainly use the TCP services.
This TCP service is enabled in such a way that it helps you peer discovery and also connect all the
peers inside the Bitcoin blockchain together.
So that's the core of the Bitcoin and how Bitcoin operation performs with the architecture.
There are some key important points which I'm going to summarize here.
The application is submitting the transaction through a remote procedure call.
The transaction is then signed by the wallet private key and send it to the transaction memory pool
with the node.
Every node inside the system has this transaction memory pool.
Miners take the transaction out of the memory pool and do the validation process through validation
engine.
Once the transaction is validated, transaction is added inside the block and then the block is start
being formed when the block time is over, which is ten minutes in case of Bitcoin, the miners also
add a nonce value with the block.
This nonce value is guessed by the miners in such a way that we have a certain number of leading zeros
with the bitcoin block.
These leading zeros depends upon the difficulty of the chain.
Once the block is confirmed over the chain, the block is shared.
To all the different peers through the connection manager, which allows the TCP connection to share
the new block which is coming inside the system.
When the peers receive this new block, they do a consensus of this block and provide the vote on top
of it.
If two by three of the total participants see that the block is validated and agree with the new updates,
then the new block is added to the chain and transactions are stored on top of the blockchain.
So that's the core about Bitcoin architecture.
If you see here, there are different components in action inside Bitcoin architecture, and while creating
our enterprise blockchain solution, we can replace these components as per our needs.
Let's say if you don't want to use wallets, you can directly use the key pair to provision that the
transactions are submitted there.
Apart from that, you can also modify the validation engine for your transactions.
Then we have a storage engine available also, which is helping to create the block structure.
This block structure schema can also be modified as per the storage engine.
And finally, connection manager is using TCP right now.
If you want with your enterprise solution, you can shift it to any other connection protocols like
gossip protocol.
So all these different components modification can be done as per your enterprise solution.
Another important blockchain platform which we are going to analyze is Ethereum Blockchain.
Now let's go and see how Ethereum blockchain architecture looks like.