Blockchain CBSA – Blockchain 101 Part 4
- Objective – Value Creation
Let’s talk about value creation and blockchain. Now, anytime as an architect we want to go ahead and derive an architecture or to try to sell a solution. We have to be able to determine the value and display that to the customer. We want to realize that blockchain technology has some specific value creation benefits if it is a right use case for the technology. And around that we’re going to be looking at costing, security, privacy, efficiency and it is open source as well.
Now, I won’t spend a lot of time talking about each of these. I do want to cover different areas of creating value. From an architecture standpoint, when we talk about the value creation with blockchain, most of the value is going to come out of smart contracts. So smart contracts, again, we know what that is. It’s a way for computer program code to basically execute if a condition is met, right? It’s an agreement. Now because we’re able to automate, we’re able to create value. So let’s go back here and talk more about this. Because of a smart contract we have the ability to reduce costing.
We could also increase our efficiency as well. And as part of that it may also increase privacy and security if we remove like intermediaries and we reduce manual labor. So with that said, smart contracts can provide immense value if they are implemented appropriately. Now, another area of blockchain that value can be created is through the use of tokens. Well, what is a token? Well, a token is a store of value and it’s similar to cryptocurrency.
For example, in Ethereum we have what’s called Ether and because we’re able to use a token it allows essentially the miners but it also allows the users, the developers to be able to be able to basically not only pay for the use of the Ethereum network, but also get paid if they’re providing a service. So there’s a lot of value that can be derived out of this. Now, one of the things too is you don’t have to store your token on your computer, you don’t have to, again, maintain the tokens on your laptop or your desktop. You keep this in a wallet, you keep this in a token, store whatever you’re using. Again, these are digital resources.
Another area that smart contracts provide, again, they’re going to provide areas around autonomy, trust. Also to remember when smart contract is on the blockchain it’s going to be backed up by other nodes as well. So you’re going to have multiple copies, can provide savings, can be a lot quicker, accuracy, a lot of these can really be met with the right use case.
Also too, another area is we could think about if we’re able to reduce costs, we’re able to reduce funding requirements. In other words, that funding could be used for something else. For example, if you have a client app that was using $300,000 a year in capex funds just to maintain it and never mind have an administrator that you had to have managed it, and you’re able to reduce that down to 100,000 or 30,000 or whatever. That is a significant creation of value to the customer.
And again, a lot of things to consider with this, but in general, the main thing on the exam I want to just make sure you get is to be able to understand how a blockchain can create value. And that’s generally going to be through the blockchain services, such as a smart contract. Let’s go ahead and move on.
- Objective – Blockchain Key Components
Okay, in this objective, let’s talk about blockchain, key components. Now, when we talk about blockchain, there are specific components that are going to be part of a blockchain network and we’re going to need to have specific components to perform specific tasks and actions and add value, et cetera. So we need to have cryptography. We know what cryptography is, we won’t spend a lot of time on it. We know what a peer to peer network is, a digital ledger, consensus, algorithms, validity rules, and virtual machines. Now, virtual machines could also be a container as well, like Kubernetes or Docker as well. Okay, let’s go ahead and talk more about this. When it comes to key components, we need to have cryptography. Why do we want cryptography? Because we want to make sure that we’re securing our transactions. We also need to have cryptography too, because we don’t have any kind of central authority. We also generally are going to have on a blockchain a peer to peer network and it’s going to run a peer to peer protocol.
Now, in the world of Ethereum, again, it uses a peer to peer protocol and each of the EVMs are going to communicate with each other so the computer share responsibility on the network. And we also know, for example, that when there’s a transaction, that transaction is distributed between all the nodes. And so we need to realize that the peer to peer protocol performs many different actions. Now this ledger is going to be a shared data structure and this digital ledger is going to be essentially very similar to a distributed database. Now, the main difference we know between a database and a blockchain ledger is that the database supports typically Crud, which is basically create, read, update and delete. A blockchain ledger supports only create and read. It does not support, update and delete. Now the consensus algorithm is going to be implemented as part of the application.
And again, different ecosystems are going to have different methods for attaining consensus. But the main thing is the consensus algorithm is responsible for the world state. So do remember that you may see that again on the exam, validity rules. Now, validity rules are going to validate how the user and the transactions are going to be validated. For example, in a theory of validation is a little different than in the world of hyperledger. And we’ll talk about those specific blockchains when we get to those sections. But for this main part of the module here, for this course, we just want to make sure you know what the components are, what the key components are at a high level because on the exam you’ll need to select, for example, what component is going to provide the validation for the transaction, for example. And that will be validity rules.
Now, is it the EVM or is it the encryption? No, they have a different role, the virtual machine. Now virtual machines are going to be what it’s going to be basically a lightweight server that’s going to be running typically on a virtual machine or a container. Most of the blockchains that are generally going to be Enterprise are going to run on containers like Docker, for example. Hyperledge is a good example. Now, Ethereum uses what’s called an Ethereum virtual machine. Again, it’s nothing but a computer program that is running that’s going to run the blockchain network services. Let’s go ahead and move onto the next module.
- Objective – Blockchain Architecture
Let’s go ahead and talk about blockchain architecture. Now when we talk about blockchains, we want to just look at it from a perspective on how they’re different from other architectures. The first thing is to realize that blockchains are decentralized. It’s a peer to peer network, right? And therefore we’re not actually going through client server approach in most cases. Now some blockchains are less decentralized than others, like Ripple really is not decentralized, even though that’s part of their jargon that they are. But in reality it’s banking cartel that is a banking cartel, right? So when we talk about Ethereum, it’s a true peer to peer network. When we talk about hyperledger, it’s peer to peer network in the sense of its consortium members, right? And you do have some flexibility in how you derive your hyperledger network, for example. And quota of course handled things a little differently as well. But in general, when we talk about Aetherium, it’s truly decentralized.
When it comes to blockchain architectures, we want to know of course what a blockchain is, right? We know what a blockchain is, we’ve talked about it quite a bit. But in general a blockchain is going to have what, it’s a decentralized distributed ledger. It’s going to be a data structure. So this data structure is going to essentially reside on different peers and each of the peers in the network, such as Ethereum, you’re going to have an EVM. This EVM is going to of course have the blockchain network service is running, going to have the smart contracts, the apps on it as well. Now, a decentralized ledger we know is a data structure. And when we look at a typical blockchain like Ethereum or Bitcoin, we know that when we add more nodes, what will happen generally is that the performance of the transactions generally will slow down.
So if you add to the theorem network 100 more nodes, or EVMs, I should say, then that basically adds to the requirement that every node has to be updated for that transaction to again be valid, right? So a lot of this is good in that sense where you have redundancy built in, you have security built in, right? So from an architecture perspective, the transaction processing can certainly be dependent on the consensus algorithm as well. For example, proof of work will of course will scale up horizontally. But again, with proof of work, our transaction processing is going to slow down. Like in the world of Bitcoin, we’re looking at what, four transactions per second if we’re lucky. But if we go over to theorem, we might get twelve or 14 on a good day.
But if we go over to a platform such as Hyper Ledger that can scale up possibly to 3500 and ripple basically quotes around 1600 or so, I believe when it comes to the architectures again, you want to be able to appreciate, for example, that you want to try to remove the third party. Now remember, this is a peer to peer network and the peers are going to be doing the work. They’re going to be trusting each other and instead of having an intermediary send money from point A to point B, that intermediary is gone. In other words, that algorithm is going to handle and respond to any kind of malicious activities. Also too, when it comes to these ledgers, they’re immutable. And immutable means what? You’re not able to go in there and modify or delete that transaction.
This is all in memory of the EDM, for example. And each of the participants will have the same copy of the ledger. So if you have 1600 ethereum nodes, each of the nodes are going to have a copy of the blockchain ledger. As far as metadata is concerned. One of the things that you might want to pay attention to is, again, understand some of the terms here. I won’t read each of these to you if you don’t know what they are. I would advise you to take a few minutes to go ahead and look this up or just validate in your mind that you know what a merkel root is, that you understand what NBits is and not. Those are the ones you may see on the exam. So NBits basically does what it’s going to identify the current difficulty. The knots is a random number, that’s all it is. So we know too from the hashing demo that if we change the knots that the input, in other words, if the inputs change, the output will change as a result.
Now, a genesis block is a term you want to know. A genesis block is the first block of a blockchain. Block categories, main branches, right? These are all other parts that derive off of a genesis block. The main thing you want to know for this exam is know what a genesis block is, right? It’s the very first block written to a blockchain and then the demo coming up. We’ll go ahead and show you that. Now what about scalability? Blockchains in reality do not scale well. They scale horizontally. You could add more nodes but that does not mean the performance will go up. And the reason is why, for example, an ethereum or bitcoin, if you add more nodes then each of those nodes that you add will need to have a copy of the blockchain and that blockchain is not up to date until all the nodes have the same exact world state. Essentially every node processes the transaction, right? So there’s a trade off. You have the ability for low transaction throughput versus a high level of decentralization. So if you centralize you’re going to get better performance. That’s sort of the lesson here. When it comes to scaling. There’s a couple areas around blockchain architecture to appreciate.
Now in an earlier module we talked about segway, we talked about basically performing, for example, a fork. These are ways that could basically increase some of the scaling capabilities, for example, SegWit, removing the signatures and then we can look at sharding and off chain using channels, for example, increase the block size as well. Could be done a lot of different areas to consider when it comes to scaling and improving performance. SegWit, we know what Seguit is, I won’t get too deep into that. There’s a section, we talked about it. But basically this is where you’re going to separate those signatures and remove them from that transaction. That block that you’re going to add it to, basically it’s going to increase essentially the number of transactions you could fit into that specific block size. Now sharding, in case you’re not familiar with sharding, is an interesting approach where you’re going to split up essentially the processing between different nodes. And this is done a little differently than in a typical blockchain, but it actually could work and definitely very efficient in some cases. And this is done in some databases as well.
Google, some of the Google’s databases support this as well. You could also use what’s called an off chain. Now, an off chain is where you’re going to have a channel and that channel, instead of like performing that transaction on the main blockchain, on the main network, for example, you’re going to do this off of the main network. Now, this can provide other benefits. For example, instead of having 100 nodes, let’s say process the transaction, you might have four. And if you can reduce some of that performance overhead, that’s great. But also too, it could also improve privacy as well and improve security in some cases as well, increasing the box size. So when you fork, you go from like one meg to four meg or eight meg. Like in the case of bitcoin cash, that really did scale the block size significantly when they did that fork. And that increased basically the transaction size that could occur, but also the number of transactions that could be placed into a block as well.
Okay, well, go ahead into some of the practice questions, see how you do. But remember, we have sharding, we have forks, we have seguet, we have basically scaling and other manners such as horizontal. We know that blockchains scale horizontally. But when we have a peer to peer network, what does that do? That induces some performance issues. So we may want to perform an off channel again, maybe go off chain or create a channel, whatever makes sense. So there’s a lot of ways to look at performance and increase that architecture. But the main real point here to appreciate is that blockchains really do not scale and they were not really designed for performance, for high number of transactions per second. Again, there’s differences between a client server architecture, a traditional database versus auction. Let’s move on.