Deploy a Hyperledger Blockchain network in AWS | Qasim Shah | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Deploy a Hyperledger Blockchain network in AWS

teacher avatar Qasim Shah, Digitization and marketing expert

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

16 Lessons (2h 9m)
    • 1. Introduction

    • 2. Creating VPC

    • 3. Creating key pair and security groups

    • 4. Creating roles and policies

    • 5. Using cloudformation to build a HyperLedger Network

    • 6. Monitoring using Hyperledger Explorer

    • 7. Exploring CLI Container

    • 8. Creating a GoLang Chaincode

    • 9. Install and Instantiate Chaincode

    • 10. Invoking Transactions and running queries

    • 11. Hyperledger Fabric

    • 12. Introduction to Hyperledger

    • 13. Membership service providers

    • 14. What is an identity

    • 15. What is blockchain

    • 16. What makes up a blockchain

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

With the popularity of Blockchain growing, AWS has recently launched a new service which allows organisations to launch a blockchain network in a seamless fashion while leveraging the global architecture of AWS.

According to the census, it is found that only 0.5% of the world’s population are using Blockchain today, but 50% or 3.77 billion people use the internet, so there is an opportunity to walk ahead of the world and learn Blockchain. All you have to do is: 

  • Gather useful resources and exercise them efficiently

  • Learn Blockchain related skills

  • Study the working of the technology

  • Apply your knowledge in building decentralized applications

So, if you prefer to walk with the development of the world now is your chance to get started with 'Deploy a Hyperledger Blockchain network in AWS' - A one of its kind course!

In this course, you'll learn and practice:

  1. What is a blockchain

  2. How does Hyperledger fit into blockchain

  3. What are the different components of a blockchain

  4. How does AWS offer the blockchain technology

  5. Building a blockchain network in AWS

  6. Understand  best practices, and much more....  

You will also get complete resources, toolkit, and code where applicable with this course! We've built this course with our Team ClayDesk of industry recognized developers and consultants to bring you the best of everything!

So, if you would like to:

- start your freelancing career and consult companies, this course is for you

- gain marketable skills as an IT expert and professional, this course is for you

- This course is not designed for advanced level students

...this Hyperledger course is exactly what you need, and more. (You’ll even get a certification of completion)

See what our students say “It is such a solid course that covers all important areas of machine learning, and I now know hoe to predict future products based on their features. Simply awesome!.” - Alex Neuman

“This is such an awesome course. I loved every bit of it – Wonderful learning experience!”  Ankit Goring.

Join thousands of other students and share valuable experience

Why take this course?

As an enterprise architect consulting with global companies, technology evangelist, and brand innovator, I have designed, created, and implemented enterprise level projects, I am excited to share my knowledge and transfer skills to my students. 

Enroll now in Deploy a Hyperledger Blockchain network in AWS'  today and revolutionize your learning. Stay at the cutting edge of blockchain technology —and enjoy bigger, brighter opportunities with learning the newest blockchain technology - Hyperledger.

Qasim Shah

Meet Your Teacher

Teacher Profile Image

Qasim Shah

Digitization and marketing expert


Technology evangelist. Software Engineer. DevOps Expert.

From building digital products, digitizing customer experience for buyers and users to building vertical and horizontal digital offerings utilizing Artificial Intelligence, the passion that I bring to an organization coupled with being a dedicated, self-motivated, technical, and dynamic professional is reflective of my experience, knowledge, skills, and abilities acquired during the past 18 years. With technical certifications from AWS along with MCSE, CCNA and MCP, I have been able to accelerate value generation through innovation and digitization to realize robust profitable growth for both established and new business propositions on a global scale   

As an enterprise architect consulting with global com... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Introduction: technology is moving at a real fast pace and you're still committed to the acute code of Java. They're not living in the current world. Change is a rule of life, so take a step ahead and move into a revolutionary new world where block chain technology is one of the leading technologies of the world. Surely will take some time to learn how the technology works, but it's the technology of the future. Hi, everybody. Welcome to building block chains with hyper ledger fabric and composer. My name is Kasim Pasha, and I've been involved in the world of artificial intelligence for a course of time. Now, working with enterprise organizations across the globe and digitizing their operations, I've been able to utilize my skills to empower organizations by using the benefits of AI, including Black Jake. Now PWC, a large consulting firm, did a recent survey with leading organizations across the globe, and a whopping 84% of the respondents said they're involved with Blockchain in one form or another, and now is the time to get involved with this technology. According to another research on Lee, half a percent of the population is using Blockchain, but the interest that is, about 50% are using the Internet due to the popularity of Bitcoin. Blockchain has witnessed a great boom in the past few years, and this is the perfect force for you to get started in learning Blockchain and specifically learning through the use of hyper ledger. Now they're two men from's in black. Check it William and Hyper lecture. Let me walk you through the brief course agenda. So atrium is the most widely used because Bitcoin is based on this particular platform. But as you will see, hyper Ledger is gaining momentum in today's Blockchain technology because it is being adopted by organizations and not just crypto currencies. So if you were in a business environment, Piper Ledger is the way to go now. During the duration of this course, we're going to look at what our block chains and give you a solid introduction to the technology to the components and what makes the technology work. Next part of our course agenda is that we'll take a look at the hyper leisure and the framework it offers. On top of the block chain technology. We look at the tools that are available for us to create black 10 networks and how simple it is to create a basic Blockchain application. Now demonstrate that all hands on lastly, as a bonus, have included for you guys a riel demonstration on how we can deploy Blockchain application into the real world by using Blockchain technology provided by Microsoft or through Microsoft Azure. So by the end of this course, you'll be comfortable with Blockchain technology as it is done through the hyper ledger framework. And most importantly, you will know how to deploy an application into the real world using technology. So the time to learn Blockchain is now and the time to learning who hyper ledger is just the beginning. So be at the forefront of the Blockchain wave and capitalize on your knowledge. Increase your skill set. I value your feedback. You have any questions? I'll be delighted to answer and walk you through this new technology. So what are you waiting for? Click on the enroll button now and I will see you in class musically. 2. Creating VPC: Hi, everybody. And welcome to this tutorial on a virtual private clouds or be PCs. So in this exercise we're going to do is will create a non default we PC with a single summit. And just as a reminder, sub nets enable us to group instances based on our security and operational needs. So there's two different types of sub minute. There's a public sub net which is accessible by the Internet or a private sub net, which is accessible only within that BPC. So after doing that will create a security group for our instance that allows traffic only through specific ports. We're lost on Amazon s will launch an easy two instance into our sub net and associate an elastic I p address with that instance which will allow our instance access the Internet. So first and foremost, we're going to go ahead and create our VPC. Let's navigate to Rvp C section and from our VPC dashboard, we're going to launch the VPC wizard and here we have several options. In order to launch BBC's, we can launch it with a single sub net begin out of BBC's with public and private sub nets looking EVP sees with public and private suddenness and hardware VPN access or with private Submit Onley and Hardware VP and Access and the hardware. VPN basically allows us to connect our on prime network onto the VPC hosted by AWS, so we'll stick with the single sub net. Let's give this vpc your name and up here. It mentions on I p before C i. D. R or a sitter block. Now this is a bit outside The scope of the Cloud Practitioners exam will need to know about this in the solutions architect course and exam. So this is basically gives us a number of I P addresses that were able to use in binary format and a troll. There's 65,531 I P addresses available, so if you want to limit the number of I P addresses that are allocated to the subject, we can do that through the city Availability zone gives us a choice of where we want to create this instance in Based on the region, which I'm currently in London, we'll just leave it as no preference. We can also additionally give this sub net a name if we will have multiple subjects is always good to differentiate between private and public ones. So the service endpoint it's in the service endpoint section. We can select a sub net in which to create a VPC endpoint to Amazon s three in the same region. Here, we can either allow dynamodb or s three. We can limit the amount of access that these that these services will have to this VPC or customized access and the custom. One will just have to use either this Jason editor or we can use a policy creation tool. So what is enabled? Deanna's host names one set the yes, it ensures that instances that are launched into our VPC receive a DNS host name and the hardware tendency option enables us to select whether instances launched into the VPC are run on a shared or dedicated hardware. Just keep in mind that if you select dedicated tendency, it incurs additional costs. We'll go ahead and click on create BPC. So if we're going to our BBC's, we see there are two VP sees the one that we just created and the default one that's created when we launched our first easy to instance so now that we have Rvp created, let's go ahead and create a security group. And if you remember, Security Group basically acts as a firewall virtual firewall to control the traffic Fourth associate ID instances. So for a security group, we need to add inbound rules to control incoming traffic to the instance and out barn rules to control the outgoing traffic from the instance. Now BBC does come with the default security group. Any instance not associated with another security group during launch is automatically associated with the default security group of the VPC. So let's go ahead and navigate to our security groups section and security. Well, we're gonna create a security group, and here we're going to slide the idea of the VPC that we just created and create the security group. So here you can see the security group that we just created. Once we selected on the bottom, you can see a description, and here's where we can specify the inbound rules and the out bond rules. So the inbound rules that's go and click on edit. We're gonna add a rule. And here are all of the rules that we can add. So let's go ahead and allow http traffic and the source is basically the zero Dodger communes from anywhere. And let's also add in an https. And if you guys can see it automatically detects the default ports for both http and https now that we have rvp see created, we have a security group associated with it. Let's associate or let's add instances to this VPC. So if we go back to our dashboard before we collected before we selected Launcher VPC visited. So let's go ahead and select launch Easy. Two instances. Well, just select the default instance that we've created in the previous lesson. So here is where we can select the vpc that we want this to be associated with. If you guys remember the last one that we created was associated with the default PPC because we only had one. Now that we have the other vpc created, we can associate this instant with this vpc and here also if we had multiple suddenness that would show here But since we only have one only one to showing up. And here is where we can associate security groups with this instance. So here we need to create a new scared a group or select an existing security group. We want to select an existing one because recall we just created this one Previously. We'll associate this instance with this security group, and here it's defines what the security group allows allows both East TTP and https traffic inbound and outbound. Once we have that instance, Launch would go back to our VPC dashboard and attaching elastic I p to that instance, and an elastic I. Peters is basically a static i p before address designed for dynamic cloud computing. So in at so an elastic I P addresses associated with our AWS account, and with that, we can mask the failure of an instance or software by rapidly remapping the address to one other instance in our account. And just keep in mind that the elastic I P address is a public I. P v four address, which is reachable from the Internet. So if we were to associate an elastic, I appears with instance that we just created it will allow http and https traffic from the Internet to reach this instance brisket. Now the instances accessible from the Internet with yet elastic I p address being associated with it. So those are the steps that we we need to do in order to create a custom vpc. But it's a few things to keep in mind and security. We have both a network access control list or nah, KAL and security groups now a network access control list are applicable at the summit level. So any instance in the sub MIT with unassociated nickel will follow the rules off the national. The security groups, as we saw, have to be associated with a specific instance. By default. Our default we PC will have a default Mackel, which will allow all traffic both inbound and outbound. So we want to restrict access at the seven it level. It's always good practice to create a custom network access control list. Also, keep in mind that network X control list are stateless. Unlike security groups, which are state full. So in a security group, let's say if you had an inbound rule for Port 80 it's automatically allowed out meaning out bond rule for that particular port need not be explicitly added. But for the network access control list, you need to specifically provide an explicit inbound and outbound rule. Lastly, and security groups, we cannot deny a traffic from a particular instance. By default, everything is denied. We can set rules on Lee to allow, whereas any network access control s weaken set rules both to allow and to deny in the peering connections is where we can do vpc peering. If you want to connect to a WSB PC's together, we can accomplish that. True peering the Net gateways allowed to submit. Let's say, if you have a private and public sudden it they will access the Internet through a net gateway or network address. Translation. Gateway and the Endpoints and Endpoint Services allow applications to connect instances in the VPC. 3. Creating key pair and security groups: hi, everybody, and welcome to the second step in creating and launching our hyper larger network. So we're already done creating our BBC and this lesson we're gonna go ahead and create our security group and our keeper. I'm gonna go ahead and navigate to the easy to a section or the sea to dashboard and on the left hand side will see an option for key pairs are just for your reference. The key pairs are required when we're gonna be ssh ing into our A C two instance and configure our Blockchain network because that is you got since I already have one created that I was testing out with. I'm gonna go ahead and click on Create in you pair. I'm gonna give it a unique name just so I can keep it differentiated that I'm using this for the Blockchain network on a gold. Go ahead and click on creating or what's going to do is going to download the key pair for me onto my PC and just make sure that it is kept in a safe place because we will be utilizing this key pair when we're connecting into are easy to instance and configuring Are Blockchain network in after that? Then I'm gonna go ahead and go into the security groups because we will, because we'll need to create a security group to allow certain protocols toe be available in our CC Twin stirs going to give this security group a unique name just so I can keep it identified as being used for the Blockchain network. For the description. Weaken again. It's just for your reference in terms of identifying what the security group is going to be used for. For the VPC again, we're going to selected VPC. We just created in the previous lesson to make sure that the security group is being applied to that. Go and click on create No. One thing that we need to do is obviously we need to allow certain protocols in certain traffic to be able to come in to this easy to instance, into this VPC because it is a publicly facing VPC, I'm gonna go ahead and select the security group I just created on the bottom. I guess he's several tabs that we're able to customize our security group. So what I want to do is I want to allow inbound traffic. So I'm gonna click on the inbound and right now the table is empty. So I'm going to go ahead and click on edit and allows certain protocols or certain types of traffic to be able to be allowed into the VPC networking essentially to our A c two instance. Now, we're mainly going to be working through ssh! Trying to make sure the first thing I want to do is allow as this h traffic Teoh into this vpc from the public domain. So in the type, I'm gonna go ahead and find S S H and the SNC. The protocol is by default a TCP, and the default port it uses is Port 22 in terms of source now I can identify either my i p a custom I p or any i p address. And if you guys notice wants us like my i p, it will automatically determine what is my I P address that is currently assigned to my machine. And anywhere is obviously which is not something you guys want to do it allow anybody to connect into easy to instance. But if I do my i p, it will identify the current I, Peters has assigned to my machine that you're logged into AWS with. I will only allow access age into the VPC from your specific I P address, which is, for security purposes, highly recommended. Because if anybody can access age into your A C twin since they can basically use it to do anything that they want, I'm gonna go ahead and click on Add this S S H rule And I also want to add a customer TCP for port 80 80 because when we go out through, the rest of lessons will be connecting through Port 80 80 on to our A c two instance to monitor our hyper legend network. Want to make sure that I'll I allow both of this traffic into the easy to instance from my current machine, which I'm working with, which I'm logging to AWS with? If we don't do that by default, it does block all traffic so you won't be able to connect into your easy to instance, especially a publicly facing one which is assigned to a specific VPC. So we have to make sure that we create the security group in allow both of those types of traffic because if you don't allow the TCP, then we won't be able to monitor our Blockchain network. Once I do that, I'm gonna go and quickly click on Save. And as you guys can see on the bottom, it has added both those roles or allow both off this type of traffic into this VPC from the public domain. For the second step, the told me things that want to do is we wanna go and create that keep their there all hours to assess it into the instance and then obviously allow the traffic off Both ssh and the TCP port 80 80. 4. Creating roles and policies: everybody. So at this point time we have a VPC created. We have our security group created, and we also have a keys. The next step before launching our hyper other template, is creating policies and rolls. So that's what we're going to go ahead and do. Policy is basically what holds the set off permissions that the rule allows. We're going to use the role to give the easy to instance that's gonna host are hyper ledger that's gonna always or hyper ledger access to other AWS services that it might need to use now, in order to create roles and attach policies to those roles, we're gonna go ahead. Do is go is navigate to our I am, which is identity and access management link from the services menu and on the left hand aside, you guys can see that there's an option for policies. We're gonna go ahead and click on the policies. Policy on AWS is basically a set of permissions and permissions. Make up a policy policies air then associated with roles, and those roles are what we assigned to specific resource is such as easy to instances. So I'm gonna go ahead and create a new policy, and this will take us to the policy editor. Now we can specify the contents are far policy about using a nice visual editor, Or we can use a simple Jason. No, it depends on your preference. You can use a visual editor or Jason. I'm not Gordon and use Jason Option and specified policies using that. Now, keep in mind if you do use a Jason, you have to follow the formatting and specifications that Jason allows us. If you're not familiar with the Jason Formatting and the specs, then I would suggest taking with the visual editor for most of your policies. The permissions that make up this specific policy are also available in a W. You can always copy and paste from from there also, or you can use your own. If you take a look at the Jason Policy, you can see that it grants permissions to the CCR, which is the elastic container registry, which which is gonna hold Steve Docker containers, which we're going to use to provisioned the fabric network. Now the permissions also give the instance access to ask three buckets Now, once you have the policy set up we're gonna go ahead and click on their view button, and this will take us to the page where we can specify I name for our policies as we can keep it differentiated. And if you scroll to the bottom, you can see the summary of the permissions that are associated with this policy. Once we're happy with that, we're gonna go and click on create and then we can see that are easy to policy or for the fabric has been created. And the next step is going to be to create a role that is associated with this specific policy. Now, an AWS role is basically a set of policies on. Then, like I mentioned, policies are the ones that contain permissions, which is what we just assigned. So gonna click on rules on the left hand side and we're gonna click on, create a role, and we're going to create a brand new rule here. And we need to specify what kind of service will use this role. And for us, it's going to be an easy two instance. Now, if you're married forever, that are Blockchain template is going to spin up a single easy to instance that's gonna hold the containers for hosting the nose off our fabric network. I'm gonna go and click next, and this will take us to where I can set up permissions that are going to associate it with this role and permissions are specified as policies, and we can use the search to search for a specific policies that we want to grant and which is we're going to serve the policy that we just created. Don't you do that when I go and click on next and will take us to a page where we can review the role that we just set up to make sure we're happy with it, and then we can go ahead and click on finish, others going to create a new rule for us. And then you can also see all the details by our this robot clicking. By clicking on it, you can see what is specifically associated with it, what is linked with it, And one thing that you want to do is in the summary. You want to make sure you copy the instance profile RN and keep it in a safe place because we're going to need this when we're provisioning are hyper alleged network. And when we're provisioning, our template will need to refer to this air. And because it will need to use a role to spin up that easy to instance and granted permissions to make sure you copy this air and in a note peb and because we will use it for our upcoming A lab. There's so you don't have to go back and find it all over again. So that's it, eh? So just to recap, what we basically did is we created a role and to create a policy and we attested toe are easy to instance. Now just keep in mind that we need to do this in order for the high profile template, which we're going to be spending up to have sufficient permissions to interact with. The resource is within AWS 5. Using cloudformation to build a HyperLedger Network: Hi, everybody. And welcome to this lesson on provisioning are for a type of letter. Fabric network through aws is claw information stack. So in this demonstration, we're going to use the blocking template created using the AWS Cloud formacion, which is provided by AWS in order provisioned nodes in our hyper larger fabric network. Now, in order to get Stehr started, I'm gonna go ahead and navigate to aws dot amazon dot com slash Blockchain now. Ah, very good thing about AWS is is they have provided us templates a claw information template to provision our entire hyper ledger fabric network, which has made a life a lot easier and a lot simpler in order to get our network up and running, I guess. And see this page gives a basic overview about the different products. Ah, block seem that LBS has started to offer and is going to offer in the in the upcoming future. What we are interested in is the AWS Blockchain templates. Once we go want to get into the blocked in top plays give this page gives and basic overview about what Blockchain templates are and the two main ones that are offered by AWS . At this point, time are one for Ethereum and one for the hyper leisure fabric. And for the purposes of this course in this demonstration, what we are interested in is the high privilege of fabric one. And here gives a business or view off how the templates basically work you. We choose a template, we choose our platform and then we go ahead and build our networks. We're gonna go ahead and click on get started with a Blockchain template and take us to a page where you can select our templates which ones you want to use. Like I mentioned, the two ones are ethereum, or high poser fabric. And on the bottom of that list, the different regions that currently offers the hyper older fabric Blockchain templates. Right now there are three regions that are it's offered in northern Virginia, Ohio and Oregon. And if you remember the VPC that I created in one of the prettiest lessons, I made sure that it was hosted in northern Virginia. Do you want to make sure that the VPC and the subject that you guys create are hosted in one of these three regions? Because if they're hosted in another region, you will have issues launching your hyper laser Blockchain template. So I'm gonna go and click on the Northern Virginia tow launch the Cloud Formacion stack of this American configure, our hyper legend network. Now, a stack on it'll be a simply refers to a logical group of resource is on the AWS cloud that you can administer together. So at the very top, we can see that there's some basic information about the template on description of the fabric network that were going to build for the rest of this course. Now we're gonna go ahead and start filling out some of the basic information. We require a name for the stack. After I give ah, basic name, we're gonna move on to configuring the specific parameters off our fabric network are the first is the name of the Public Channel on our fabric network. Now, by default, it's called my channel. You can refer to another name and if you are going to be using this for a production environment, you want to make sure that you use it. You use something meaningful that will help identify this public channel on the fabric network. But I'm just gonna go ahead and leave it by default to my channel. I'm actually gets and see that there's three different organizations that are created as part of this fabric network. Now let's see if this network is associated with a set of companies. You might want to have a domain name for this consortium or the set of companies, and that's what you specify and then in terms of the organization. So if high protein fiber network is to be used within different teams or different departments and your organizations, you will specify the organization domain name here, such as Qasim dot com or amazon dot com. Now the network will automatically be imprisoned with three piers from three different organizations, and you can specify the names of the organizations and this text box that you guys see or Guan two and three now by default there, named or Guan to 13 week and specify your own specific names here. Now the names will represent the sub domains for each organization, for example, or guan dot amazon dot com Or, as you guys see here organ dot example dot com of these three, but dont means will form pure nodes off Ah, High brother Fabric network. I was his girl on down. You can specify the idea of the VPC to which are a C two is going to be connected. And this is going to be the VPC that we created in one of the previous labs before we go on to easy to the sub net that associated with that bpc And again, this is the sudden that we also created and made sure we allow it a couple of protocols, the S S H and the TCP port 80 et into the suddenness. You want to make sure that we specify both of those here specifically and not the default ones. Now, this is a case between central run the containers forming the nodes off our fabric at work . So this is the to set the idea of the network that will have created area earlier. And this is the security group that we just created in the previous lab. And here is the air end that I asked you to copy on keeping your node pants. You want to make sure that because we paste that same air and for the sea to instance, profile this way it will have the specific access and specific permissions to access. The different resource is within the AWS network. And here's some of the other parameters in terms off the hardware or the type of easy to instance, we want a launch. I'm gonna go ahead and just keep it the default, which is in the free tier. But you can choose specific instances depending on how intensive off work you are going to be doing with this specific. Easy to instance, here's a couple of different template versions. The version one or you want to use the latest We're gonna go. It's like the latest because, ah, in case they made AWS amazing changes or updates, we want to make sure that we use the latest version for our fabric template. And the last thing that we do is we acknowledge some of the resource is, and the required capabilities for this formation stack that is going to be utilizing the I am resource is and it's going to be using the resource is within your AWS account. You want to make sure that we acknowledge that before we go ahead and launch it just to make sure that you are aware that certain resources will be spun up, such as an easy to instance, which, if you're not in every tear, will start incurring charges. So once we go ahead and specify all this, we're going to go ahead and click on Create Stack. I just keep in mind that the question of a stack might take a few minutes. Um, so we can go ahead and grab a cup of coffee or a cup of tea, Um, and wait for it to finish. You can watch the logs to see how are things progressing. Click on the link to view the additional log events that come in and you'll see how the stacks are being provisioned and are being created because you can click on the refresh and we'll take you through the progress off. What's going on if it's currently in progress. If is currently in created, the different events different resource is, and the different outputs, all of them will be populated on. Once this stack, the stack creation is complete, and the template just takes you through the claw information template. If you guys want to go ahead and brush through it. You can see all of the different resources that are part of this cloud formation template now defining Clark Krishna places. Ah, the outside the scope of this course, But you are also able to customize your own cloud. Formacion templates, tow launch. Any resource within AWS or an entire network in AWS can belongs to a confirmation template . So this hyper ledger one that's been created by 80 BS does exactly that, but specifically to launching a hyper ledger fabric network in an easy to instance. So essentially they have automated an entire task of launching a hyper alleged network for us in terms off quoting it. And all we have to do is click a few buttons and the entire network will be launched for us automatically. So it's as simple as that. Just wait for a few minutes for it to complete, and there you have it. We have are the first hyper ledge or our first hyper leisure fabric network, launched in AWS 6. Monitoring using Hyperledger Explorer: Not that our fabric network on a club for information template has launched and provisioned our network altogether. You guys can see everything has been completed. We can use the hyper let's explore to view the current status off our network. Now, this is basically a monitoring tools that allows you to view the blocks and transaction transactions on the network. At this point in time, I wants me and I want you observe the log messages. You can see that the formation is complete and want to do that. If you click on the output section, it's going to hold certain pieces of information and key value pairs that resulted from the creation of the stack. Now there's several different ones. Several compares available in the output sections. The one that we are concerned with is the U. R L. For our hyper ledger. Explorer. Explorer is basically a browser based application that allows you to visualize parts of your network, your Blockchain network, the transactions that have been executed, the blocks that have been created and so on. So we're gonna go ahead and click on the U R L to launch the Explorer A Z goods could see that the Explorer is running on Port 80 80 of the EEC two instance. And if you remember, this is one of the Pacific ports that we allowed when we created the security groups. If you did not allow this port, this clicking on this link will not work for you. So you have to make sure that this is why we allowed that specific Lincoln. I'm trying to bring everything together for you just to make you aware off wide those prerequisites steps are required in order to launch the hyper alleged network. Now this is the Explorer, the high projects poorer and by default, it's gonna open up to into the main dashboard that gives you the basic information about your Blockchain network. You can see it there. Three nodes in the network which refer to the or the three org's when we're creating the stack and three per appears belong to the tree from organizations and in essence, three blocks have been created. You can also see that there are four transactions that have been created are that have been conducted for this high policy network of these blocks, and transactions were added as we provisioned the network if you And if you see on the bottom, you can see the few graphs that contain some analytics or some basic analytics at this point in time for your network. And obviously, as you use the network, these analytics will be populated with more meaningful information. Now blocks per hour, the blocks permitted. As you can see, everything is basically empty, since nothing's been done other than provisioning on this specific network. There's also a pie chart you guys can see on the right hand of the screen, which shows you how many transactions have been initiated and executed by each organization in the network. Then you can also see the first few blocks that were added when this network was was provisioned. There's also a paragraph and all other information that gives you a basic overview about your Blockchain network. Now, if you click on the network on the top, you can see that each of the piers air connected to the other two and you see that the names of the piers here now they all have a prefix off Pier zero, and the peers belong to either either one of those three organizations now the request. You, Earl off to the right of each pier gives you the port numbers at which each periods listening and they're either 70518051 or 9051 And if you click on the blocks stack on the top to view the blocks that make up the block chain, you can see that we're exploring the Hyperloop Explorer, and additional block has been added. And if you click on the transactions tab, you'll see all the transactions that have been executed so far. And you see if the network itself has executed four transactions on the public Network, which is referred to as my channel because I left it as the default and there is no creator or transaction idea associated with with any of these transactions. So there we have it. Um, this is basically the hyper let's explore that we can use to monitor the basics off the Blockchain network in terms of what's going on, what transaction I've been conducted and who have there been conducted with 7. Exploring CLI Container: Hi, everybody. And welcome to this lesson on connecting to our A C two instances and never getting our hyper litter fabric network. When we looked at the Explorer, we launched our fabric networks. Let's go ahead and connect to our easy to instance and start working with our hyper your fabric network. Now I'm working on a Windows PC. So in order to at this age into the A C two instance, which is Lennox based, I need to use something called Party. And in order to do that, the first thing I need to do is get information regarding my easy to instance. And I can do that through the easy to instance Dashboard, If I click on the sea to instance name and Afro click on Connect, it'll give me some information about my easy to instance. Once I do that, I'm gonna go ahead and launched the windows Pretty. I'm gonna go ahead and click This are saved. This session for future use is just so I don't have to put in all of the information all over again. Now I want to do is in the data part of the user. Name is easy to death. Usually that you guys can see everything before the at sign is the user name. If I click on the authentication in the s S h, I'm gonna want to browse for the keep that I downloaded in one of the previous lessons. If you guys remember, one of the wrecks was creating a keep and via remember, I told you to save it in a safe place. So this is where we specify that specific keep their and almost I Peters, you guys can see that it is the name of the or the domain name off. The easy to instance that I highlighted for you on there. I want to have all the information I can connect an ssh into my easy to instance, Let me just increase the font size. So you guys are able to see what I'm doing in the different commands that I'm running in this command prompt. And there we go. You guys conceive from the command product. I'm currently logged into my easy to instance in AWS as easy to user. And then that is the I P address of the easy to instance. So let's run the command to explore a instance to see what's going on. And as you can see, there are two or directories here, one that contains the example chain code for the hyper leather fabric. And then we have the hyper ledger Basic network. Now that the main director that we're going to work more than the one we are interested in . So let's go ahead and take a look at that a little bit further. We're gonna run the L s command on the hyper ledger Basic network folder that's gonna show us what this or what is within this specific folder And what artifacts are in there now, as you guys going to be one of the folders you have is doctor composed, which contains the A m O file for all of the containers that were set up for hyper ledger fabric network that was launched to the cult claw information template. And if you run the command again to view the files which are within the doctor composed director, you can see that there are a number off, um oh, files and templates that are available now these Air Yemen files that are used by AWS in order to provisioned the Blockchain network with the three pierce and order note and the rest of the containers. So we're gonna go ahead and CD into this directory and so we can work with these GMO files that we have to perform a little bit off a fix here, which is, um, something that has been overlooked by AWS at this point time because again, this is a brand new service which is offered by AWS and burn template, which is created by AWS someone the Yemen Finals has a space that we need to go out and delete. Now, the C amel file is what AWS used by default in order to bring up the containers in a fabric network. So it's the doctor composed as C L. I am a foul on. We can view all the containers that there's, um, a file created by using the docker compose compose P s command. Here we see that this Yemen file created seven running processes. The state of all these processes are up indicating that they're all running. The first these processes is a CLI or the command line interface that we're gonna use to connect to our client. Well, then I have the fabric explore running on Port 80 80 and this the container running hypos Explorer that we just connected to In our previous lesson, we can see that the fabric Explorer DB runs the post. Corey SQL. We have the container running the order note on the order nor belongs to the channel domain as a whole, which is example that calm dooming because if you remember, I left it as default. But if you are in a production environment, you want to have this as your own domain name. Now we have the three peer nodes belonging to each of the organizations that were set up. The 12 and three on all of these sub domains are an example dot com. Now, this is what we had configured when we set up the Blockchain template figure. Remember the stack. So let's go ahead and fix that specific type O and the specific bug that is, within Monday cli containers, which makes it a little on user and unusable. It will cause problems a little bit later on, so if you don't fix it and you run into problems, you'll know why. So we'll use the nano text editor editor to open up the docker compose C L I m o file. I'm gonna go ahead and scroll on down to the line that says the core Pierre MSP config path . No, this is an environment variable that's been configured. Not wrongly, but there's just a space in between that we need to get rid off. I want to go ahead and delete this space and we click on control. Retyped control. X guys conceal. Ask if you want to save this. Yeah, move file. We're gonna go and click on yes, and keep the name the same by clicking on Enter. No, what we want What? We wanted to bring up the container for our command line interfaces using the docker image for it. And that's why I guess he has specified the image tag is equal to latest. That's our environment. Variable. The doctor composed command will retrieve the latest images for each of the containers that we're bringing up using. The doctor composed other containers for the piers and orders work. This finances is the only one that we knew. We need to use the latest latest version off, so we need to create the c l or recreate the CIA container should say so. We specify the doctor composed dash if specified the name of the yamma file Which again, if you remember, is the docker compose? See Ally and make sure that you guys when you saved it and you kept the name the same if you named it differently make sure you specify that here and the up up commander case that you want to recreate the container the D indicates that we want to run this command in the background. Now we don't want to recreate any of the other containers, so it is going to leave this one here and click on Enter and we're going to see this message indicating that are CLI recreation has been complete. Now, once that's done, we're ready to log into our cli container on. We're going to use the docker compose exact command which connects us to the container running our command line interface and executes the bash cell in the cli container from within the from within this container, which is basically a client application for our fabric network. Lets see are some environment variables. Now we're explicitly interested in those environment environment variables which have the term Pierre within them. Now, the export Command which will list all of the environment variables from within those very variables were interested in those that have the pure word and want to filter out those environment variables which contained the term TLS. If you guys look at the variables, the biscuit tell you that the default peer to which the command line interface client application will connect is or Gwen Pierre I want to run the pier command from this cli utility appear that it will reference is the organ one and we can change this to be a different period by updating the values and the environment. Variables. Let's go ahead and weaken. Type out exit and exit back to our main shell command prompt for are easy to instance and outer far doctor container. So this is basically just you guys familiar with a Dr Container that was set up on how we need to just modify one of those yamma files to get rid of the space. And if you want to go ahead and change the or one peer toe or two or or three or whatever name you define when we set up the stack, we are also able to able to do that by changing some of these environment variables. 8. Creating a GoLang Chaincode: everybody. And welcome to this lesson on creating our first chain code in our high pills or fabric network. Now I'm going to be using the Golan programming language and familiarize or help you learn The Golan language is a bit outside of the scope of this course. So I'm assuming you guys are familiar with gold Lang or some of the concepts. If you're not Ah, that's okay. Also, we can just copy and paste the code in there, but I'll take you through the all of the lines in their help. Explain what you're about, what this chain code does and what it's used for. And it's also available online on the get have repository for you guys use the multiple chain cause that are available, and the main programming languages that are used are either going or node Js Oh depends on which program language you're familiar with you can use to write your chain code. So again, like I mentioned, the one that I'll be using specifically for this demonstration and for this course is this going coat. So we're going to write a chain Cote to set up a, uh, vehicle registry specifically for cars where we can change the ownership of cars from one person to another, and we can keep a record of who the original owner was and so on. So the first thing we're going to do is set of functions within the chain called Devil allows to create new vehicles and then quarry those details of the specific vehicle. So what we want to be able to do is set up a vehicle within the bloc, shame to let their want to have inventory off a new vehicle. I want to make sure I get that logged in along with the order is I want to be able to query that vehicle, and I also want to be able to change the ownership of that vehicle on all of that. I want to keep track off within my Blockchain network, and essentially, this is what this chain court allows us to do. The first thing that we need to do within the Golding is set up some import statement for the libraries that we need, so we're going to first import the including Jason Library on. That's going to allow us to store our car details in the Jason format and ledger. The format library is used for formatting our output statements. Now it contains specifically the print function, and we're also going like I mentioned, use some off the chain called specific libraries from Get Hub Directly. Now the S H I am or a shim package supplies AP eyes, which we use to access certain variables within our chain coat. And it also access is the current state off our Red Street are far Vehicle Registry Ledger and additionally, it's also going toe. Allow us access the allows X to the transactions that is to be executed along with all of the arguments needed to execute the transaction. Additionally, were also important appear package that's going to structure the responses once we import everything. Now we're ready to set up the structure which represents our vehicle registry. Now go allows us to attach functions to any data, types and functions to struck's. So that's what we're going to do here now. Go doesn't explicitly have any specific classes, but it allows functions to be attached to types known as receivers for the function. So the i n. I. T. And invoke functions from the chain code interface will be attached to the car registries trucked and again that's going to act as a receiver. Additionally, we're going to set up another struck, which will have the fields and hold. The basic information about the car on the car. Struck will contain the make the color and so on of the specific vehicle. We're also going to serialize this in the Jason format on the value in this field, be written out with a key make with a lower case M. The car struck contains other string fields with information as well, such as the model, the color like I mentioned and most importantly, the owner of the car, which is what we're going to be using. Let's say the car changes ownership and yes and see ah, we can scroll on down the rest of this chain code to help you familiarize yourselves with what's going on. But the basic just if it is, what we're doing is creating a simple car registry program in which we can and put in cars . Let's say we were put in a command. We specify the specific information for the car, such as the make the model, the color and the owner. It'll save that into the Blockchain. We can also query those records within that Blockchain to see if that car exists and who the owner is. And then, lastly, we can change the ownership off that vehicle from person A to person B. So essentially, that's what this chain code is doing. I'm not going to get into any more of the details in terms of the Gold Lang, because that will get a bit outside of the scope of this course. Um, but just for your reference, this is essentially what this chain court is doing. And you can also write any change that you want and go lying or no, Jess, depending on you know, whichever ones you or your organization are using or are comfortable with that that's basically the crux of the Shane code. We're gonna go ahead and completes his chin cord. We're going to save this as a car registry dot go and save it on our A C. Two instance 9. Install and Instantiate Chaincode: everybody. So now that we have our chain code created and saved on are easy to Winston's. Now we're going to install. And instead, she ate our chain called on appear node in the fabric network. We're going to then use the chain called to query the current state of ledger and and walk a few transactions. And then finally, go ahead and monitor those transactions to the Blockchain Explorer So you guys can see I'm already logged into our my easy to instance Through s s H I already installed this chain called on appear node. We want to copy the chain court file onto a directory in the cli container, which will, which is what we were going to do using the Doctor CP Command CP standing for a copy, obviously. Now we're gonna specify the file name that we want to copy, over which is the car registry dot Go. And if you save it as anything else, just make sure you specify that here and make sure it's the prefixes. Cli colon. Now, what this is going to indicate is that the container into which we want to copy this chain court is the command line interface and within the interface, the chain court should live under the Goal Path Source directory. Now, in order to communicate with the pier on the fabric network, we're going to use the doctor Exactamente log into our command line interface. And once we log into the container, we're going to execute the bash cell. I want you do that. You can see that the command prompt changes which lets you know that you successfully logged in. We're gonna go ahead and head over to the director where we copied our our chain called file had ensured that it actually there and that it was copied properly. We don't we don't want to go ahead and try to. Instead, she ate something where the copy didn't work or the file was in the wrong directory and so on. So it's always good practice to make sure that want to copy it over just to verify that it's copied all the way. It is copied correctly. Once you wear for that, let's go ahead and navigate back to our sub folder where we were before and one for their that. This is where we're going to execute the command to install this chain code on appear in our hyper leisure fabric network. If you remember from the poorest lesson when we explored the CLI container, all the variables pointed toward one. So if you left that as default, this is where they're pointing to. If you change that, just make sure you remember where you change the two others or going to war and three or whatever name you have specified. So when you use the pier chain called install commanding or install a tanker and appear the organ, Pierre is what's going to be chosen by default. Now we use the dash and to specify the name of our chain court smart contract and we call it, I'm gonna call it my DAP. Now we can specify a specific version for this change code using the Dash V flag. As you can see, this is version one point. Oh, but you can also specify a different version if one is available, and then we can specify the path to the chain quote file where it resides. I want to read Hunter. This is going to install the chain code in the or Guan Pierre Node, and you can see from the from the messages here that the chain called uses the default E s E C and V sec. Now, this is a default endorsement system chain code and the validation system Chain coat has three e s c and the V s C. Now, this busy means that any any peer from the organization can endorse the transaction. And V A C C Miska stays at all piers on the network will validate and commit transactions executed using this specific chain cord. Now, once we've been installed, we're gonna go ahead and check to see the installed chain cause using the pier Kinkel list installed command And this was then this should, if it's done, probably show that the my dad version one has been successfully installed on the organ one peer. So what we've done up to this point is we've installed our chain coat, but we also need to instance she ate our chain called also because simply installing it is not enough in the Highbridge or fabric environment now before. Instead, she ating it. You need to set up a transport layer security, or TLS on our network, which will encrypt all of the messages that the peer nodes exchange with the order. Ah, and just keep in mind that I mean, the main point off a Blockchain network is security. So you wanna make sure it is as secure as possible and a century? This is what this transport layer security Command is doing. So once we do that now, right to run the pier command used in Stan, she ate our chain coat. We're gonna call the pier chain called Inst Enshi eight. And we're gonna explicitly inst enshi eight are specific chain called which we created the dash old flag points to the order on our network, which is again a docker container named order dot example dot com or whatever dot com you specified. And it is available on port 7050 What you had entered the chain court is now going to be in Stan sheeted. So now we have installed a chain court and we have also inst enshi ated the chain court. Now, if we head back over to our AWS console and into our hyper allergic exporter and if you've closed that, you can go ahead and go back into the cloud formation and into the outputs and you can find that hyperlink explorer you are. They're gonna go ahead and click on the URL or bring up the APP Rose Explorer and just click on Refresh. If you're already there and and then once you're there, the first thing you'll notice is that one additional block has been added to the transaction to now there are there should be four blocks and five transactions. And if you head over to the block stab, You noticed that a new block has been added corresponding to the transaction I d. And this was the first transaction of that was instance she ated using our chain coat. And if you click on the transactions tell, you will see that the additional transaction listed here as well. And this time there is a specific time stamp with the specific transaction I d. So here, basically what we've done is we've installed our chain code. We've in Stan Shih ated our chain code on Weaken Monitor that using our hyper ledger explorer 10. Invoking Transactions and running queries: already. And welcome to this. Ah, demonstration on invoking transactions and running quarries on our fabric network. So in the previous lesson, what we did is where we installed our chain code. We Instead, she ate our chain court and we confirmed it through the hyper ledger Explorer. So now we're going to run and execute some transactions and quarries within our high pleasure fabric and also monitor them in the Explorer to see how it's reflected when we are monitoring our high pressure fabric network in terms of administration. So we're going. What we're going to do is use the appear chain called Involved command from the command line interface. And if you remember when we were in, for instance, she ating the chain code, We specify the order that will order the transaction and then in encryption that we're going to uses TLS using that certificate file ordered order underscore C eight. Now we're gonna invoke his transaction on the Public Channel on the application that will execute is my d app. After that, I want to specify the details of this transaction by using the dash C flag on the first of the arguments that want to specify is a create car method next as the car Zahra one, which is going to the unique identify for this car. And since it is a unique identifier, we're going to specify this as a key for our state database. And what remains is basically the rest of the details of the car, such as, you know, what type of make it is the model, the color and most importantly, who is the owner of the specific car. Now, once we execute this transaction and it's been done successfully, this is a transaction that updated the state off our Blockchain network and AIM New block should have been added. So now we're gonna run a command to query this the legis state to ensure that it was actually done. So let's keep in mind that when you run a query, it's not really running a transactions. When you're running a query. No new blocks should be added to the blotchy network, and the state of the Blockchain network is not going to be updated when you're simply quarrying it. It's only updated when you're changing it or adding to the Blockchain network, and since we're running quarries is going to run the pH in court Quarry Command rather than the invoke command. Because invoke is what's going to update the Blockchain network on the quarry just keeps the state the same. Everything else in terms of the court, we're going to keep it the same. And then, as you can see, the results include the details of the car, which we just entered in before in terms of the Make model and the owner. So now we have our first transaction done. We've added a vehicle into our car registry database, and we've assigned an owner to it. So let's say if somebody comes in and they buy that vehicle, we want to go ahead and change the ownership off that car. So let's run and other invoked transaction where we change the car owner transaction. Now, unlike the quarry, this is going toe up late, the lit update, the Blockchain and the state off our database, and then or do that, we're going to call the Invoke Jane called method. We're going to specify the order Nord. We're going to specify the TLS and obviously the main identify, which is the cars. They're a one room or to change the owner of that to somebody else. I want to do that now. It's had successful, but we want to just verify us. We're gonna run another query to check whether the owner of the car as indeed been changed . And then we can see that finally, it indeed has been changed. Tonight belongs to another person. So now what we've done is we've rent to transactions and we've ran to separate Cory's. So let's see how that updated the status off our Blockchain network. If we navigate back into our hyper ledger explorer now, if you don't have it open, you guys can again go ahead and open it up through the cloud formations deck. If you already have it open from the periods lesson, let's click on Refresh, and it will refresh them, not the number off blocks. Before, we had four blocks and now is against NC. We have six blocks, so two blocks have been added because we conducted two different invoke statements and remember like I mentioned queries do not add blocks. Even though we ran four separate statements on Lee, two blocks have been added. That's because we only issued to invoke statements which is what updates the state off our Blockchain or state off our ledger. If you go ahead and going over to the blocks that we can see that the total that the total number we have is six, and the transaction's basically show us the total number of transactions that we have. Let's go ahead and just run another credit transactions. So now we have one car in our database. Let's go ahead and create a new car and this identify unique identify a logically will just name this car zero to and add this into our database. Run in the Invoke Command. Once is added successfully, let's go ahead and run that same quarry again to get the details off the second car and just like we did for the first car, let's go ahead and change the owner of the second car. Also now, once we do that, let's to go ahead and go back into our hyper Legend Explorer browser. And if you click on Refresh, you guys can see that additional blocks and transactions have been added. So there you have it. This is basically a very simple Blockchain network that we created and were able to monitor through the hyper ledger network in the Hypo the Temple. It has been provided by AWS, and the main thing about this is the chain code, which again we created a very simple chan cordis in Golan, which is basically a car posit Ori system. But you are able to change. And instance she ate any type of chain called that you want in terms of what type of transactions that you guys want to do or what type of network or application that you guys want to use. But the essential the grown works off. It stays the same in terms of the resource is and how it's done states the same. But what you do changes based on the different business environment. So you can basically take this and implanted into a production environment based on your on specific chain. Called that you can write Ah, and in those specific languages. But how you invoke them, how you Instead she ate them. How you get them into production stays the same. The only thing that would always the change is what the chain could specifically is and what it does, but you're able to use it, you're able to install it. You're able to instance she ate it. And then, most importantly, you're able to view and monitor the progress off your Blockchain that recusing the hyper ledger Explorer. 11. Hyperledger Fabric: Hi, everybody, and welcome to this lesson on hyper leisure fabric. So let's go and look at what is hyper leisure fabric. It's basically an open source Blockchain framework that was built to mitigate many of the concerns and issues that people had raised around. Ethereum platform, which again is another platform that's used to build Blockchain networks, has defined as one that's used for enterprise grade permissions and in enterprise contexts . So in other words, it's used for large organizations and large network, primarily used to build private Blockchain networks where all of the nodes and the participating networks are known and verified. Now they might not necessarily trust each other, but the identity of every note is known. That is the main characteristic off a hyper larger fabric network now some characteristics of fabric network, which make them suitable for organizations. First of all, all networks are permission in nature, which means that unknown piers cannot participate in the network. But you are able to set private channels between participants if required, and will dig a little bit deeper into those private channels a little later on. Secondly, transactions are not arbitrarily mind by participants. They're committed with low latency and high throughput verification and commitment are performed by dedicated peers or dedicated notes. It all does a modular design in terms off the format of the leisure data they have. Something called membership service Providers was determined what nodes can participate as well as the consensus a lager of them that will be used. And all of this is plug herbal and configurable based on your business use case Now, just to give you a quick overview about what I mean by permission. Now, as you guys can see from this graphic, it gives you a good overview in terms of permission, less versus permission and private versus public. It gives good or view in terms of the pros and cons off each where one. You have high anonymity low validators as compared to low anonymity and high validators. So it just depends on your business use case, which one you're trying to work with. What is more important to you in terms of the applications that you'll be using and you live building upon will determine what type of Blockchain network you'll be using, whether it's permission door, UN permission and the hyper ledger fabric that this course is based upon Is Permission Network so hard? Do permissions work? Let's talk a little bit about this because they're critical for any Blockchain network that's used for enterprises. Like I mentioned, all participating nodes in this Blockchain network have to be verified. And no, this is done from using something called the Membership Service Provider, or MSP. Participating nose in the fabric network have to have a unique digital i d. Now that's created by using the public key infrastructure, which is something that MSP is use. Everybody has a public channel with a shared ledger, which all nodes have access to. In addition, like I mentioned in Approves Lied, you are able to set up a private channel between two or more notes for private communication. Essentially, each node can be responsible for and working with multiple ledgers at one time were there is one main shared ledger, but they can have multiple private channels and multiple private ledgers that they can be working on at one point in time. Not keep in mind that the piers and their identification are known and verified, but they need not trust one another. Fabric still allows the execution of transactions would trust less consensus. Piers want to become part off the hyper leisure fabric have to be verified by the MSP on this network. And again, that's done by using our public key infrastructure. So you have a public and private key pair in order, associate a unique digital identity with each pier. Private signature is used to sign transactions so that the transactions can be verified as having a resonated from a particular known peer. So let's look at how transaction flows in a fabric network. So going back to more of the main characteristics that I just described of pipe religion fabric is that transactions have little agency and high throughput, which is perfect for enterprise grade applications, not transactions or also known as smart. Contracts in Hye Plaza fabric are implemented using chain cold. A chain code is a self contained program that runs on fabric and satisfies. A standard interface is typically used to implement smart contracts or transactions. Essentially, gene code is a program written using a programming language. Now, fabric does not have its own domain specific language. Instead, Chan code can be implemented using no Js or Java can cause. Also executed on a fabric network and a self contained program, meaning it maintains its own private state that could be updated when the transactions are executed. Now, if you've worked with theory and before Chan Cord is equivalent to smart contracts, it contains the corner up logic off agreements between participants. Transactions on a fabric follow a slightly different life cycle as compared with other Blockchain frameworks. In order to achieve the high throughput and low latency. The first phase is the execute face. This is where the Chan code for the smart contract is executed and all of the transactions within the bloc can be executed in parallel as well. Execution is performed by something called endorsing Pierce once transactions have been executed and endorsed there, then passed on to an ordering service. The ordering service is responsible for arranging all of these transactions in some order, after which there passed onto validating piers. Each pier on the network validates the transaction before committing them to the leisure. The validating phases where transactions are verified ensured that they can be applied to the latest state off. The legend validating peers help check for issues such as double spending, ensuring the same asset is not sent to multiple participants. At the same time, we have the client at which can either be a command line interface or a software program that's responsible for interacting with peers on the Blockchain network, that executing chain coat the client apple, interact with, appear on the Blockchain network and submit a proposal. This proposal comprises of transactions, which are then executed by only a few peers on the network. These air, called endorsing Piers and endorsing peers, will execute the transactions most likely in parallel and send back endorsed transactions to the client app. Now here's where the fabric is a bit different from ethereum. Executing transactions is done only by a few endorsing peers in parallel piers who endorse are chosen by an endorsement policy. That is something that you can configure based on your use case. Endorsing peers who execute the transaction have access to chain code directly, which means you can pick and choose your endorsing piers with care and just keep in mind that execution does not update the state off. The ledger off your Blockchain network endorsement policy is something that you specify for your chain called Application for example, you might say that you have a specific list that must endorse, or there must be a majority of peers that must endorse. Or there must be at least end number that must indoors and the and number depend on your network and be 5 10 15 21,000 and again, that depends on the scale off her network. So this endorsement policy is something that you can configure based on your network and based on your business use case and the type of transaction that will be occurring. Once the endorsed transactions have been sent back to the client app, it will then pass thes endorsed transactions, torn, ordering service or order nodes on the real world. There isn't just one application intractable the Blockchain network. Most likely there'll be small tipple client APS, and all of these will be passing on their endorsed transactions to the order notes. The ordering service doesn't really care about the validity of the transaction. It's only job is to assemble all transactions in some sort of serial order. This is the order in which the transactions will be committed to the shared ledger off the Blockchain network on the fabric network. There'll be specific notes that are designated as ordered and these a responsible for ordering transactions. Now these nodes might follow a different methodology for ordering now if you fall. If you follow solo, there's just one order. Nord was determined. The order. If you use something like the CAFTA service or the practical Byzantine fault tolerant service to order transaction, it might be a bit different. And if you guys are not familiar with CAFTA or the practical Byzantine fault tolerance, I suggest I suggest you dig a little bit more deeper toe. Understand what these terms mean, what the's technologies mean. The description and to go into in depth of these technologies is a bit outside the scope of this course. But just keep in mind that all indoors transactions would use one of these technologies. The committed peers are those responsible for validating the transactions that have been ordered and endorsed committing piers Also update the state of the ledger. All peers which have access to the shared ledger are essentially committing peers, and they apply the transaction to the private ledger copy. But before they apply the transaction, they need to ensure that the that the transaction have been endorsed correctly based on the endorsement policy which you specified. Committing piers also need to verify that all of the transactions in the set of transaction received are valid, and on the latest version of the ledger, they need to access the latest version, apply the transaction and see whether they're valid and committing. Peers have the power to invalidate transactions if individual transactions are found invalid. Maybe they're trying to transfer an asset that the center doesn't own, or maybe those transactions have double spending. These transactions will then be marked as invalid, and the block will be written out to the ledger. Now the piers on the fabric network have a clear separation of duties and function. Endorsing peers are different from ordering peers who are different from committing piers. This is what allows fabric networks achieve the high throughput and low Layton See, and this is what makes fabric networks and fabric transactions more deterministic and more suitable for enterprise contexts and less suitable for crypto current. Let's quickly take a look at assets and ledgers as it pertains to the hyper leisure fabric network. No assets in the fabric and be anything off monetary value that can be exchanged something . The Sanderson's toe a recipient Ledgers are basically the Blockchain itself. Blockchain represents the current state of past sets and all the all the transactions that have been performing using those assets. Assets in a fabric network can be tangible or intangible. They're modeled in the form of key value pairs. These pairs represent the current state of the asset, and the assets are stored in the state database and you can update individual feels often asset by updating the corresponding key value pair. The distributed ledger is made up of two components. You have the world here, the World Database and the Transaction Ledger. The World database contains the current state of all assets that is represented using the fabric network, Whereas the transaction ledger contains all of the state changes which involved one or more of these assets. No one transactions are committed to the ledger. The Committing Piers update the world database representing the latest date of each asset as well as a record as well as record the changes in the transaction ledger. So thank you for joining me on this lesson on giving you a overview off hyper larger fabric does. I hope you guys got a good Oreo off Howard. Transactions flow within the hyper ledger network the difference and how permission networks work and how it's able to achieve the low late INSEE and high throughput in its transactions. And most importantly, it's best suited for enterprise grade applications. 12. Introduction to Hyperledger: Hi, everybody, and welcome to this lesson on hyper ledger. So when we talk about Blockchain, it's a wonder talk or Blockchain technology as a whole, the framework that's most widely used and more on most familiar to everybody's ethereum because that's the one that's used for Bitcoin. But high pledge of frameworks are gaining popularity very quickly amongst a lot of users. Sunday's lesson will look at what century is hyper ledger. We'll talk about a collaborative project that it entails, and we'll look at the different frameworks and tools that hyper ledger offers. So what is hyper ledger? Essentially, Hyper ledger, according to its own website, isn't is an open source collaborative effort created to advance cross industry Blockchain Technologies. It's a global collaboration hosted by the Linux Foundation, including organization leaders from finance banking i O. T. Supply chain manufacturing technology and someone. So it's not a single framework. It's not a Cryptocurrency, and it's and it's not a single company, basically a collaborative framework that offered and developed by the Linux Foundation, to be used in the Blockchain technology as a whole. Not simply put, high pillagers is essentially an umbrella project off open source Blockchain platforms and tools toe work with Blockchain technology. The Learning Foundation started the Heiple as a project back in 2015 and it became a collaborative umbrella project containing many blocking frameworks. It brings together developers who are experts in the Blockchain technology that come from various industries. So the really understand how to use the Blockchain technology specific to their industry. And I think of hype, alleges a project where communities off software developers and companies from different industries come together, coordinate and built Blockchain frameworks and tools to be used across the High Plaza Project. As far as a Blockchain is concerned, there's no one size fits. All different industries have different requirements from the Blockchain, which means it requires different frameworks for different use cases such as finance i o. T. Manufacturing and so on. The developers working on the hyper leisure open source are specialists in their industries , and they build Blockchain and tools Pacific to their use case because that's what they understand well, and that's what they know how to do well. Now there are over 100 different companies that essentially part off the hyper alleged project, so it was a huge Global Collaborative project. The high blood offers an umbrella off Blockchain framers that you can pick and choose based on your use case. As you see here, it offers five main framers say you can use to build your enterprise applications. There's a high polyester fabric, which is an enterprise grade permission to framework with low latency and high throughput of transactions, and all nodes participating in the fabric network are known and identified. So at this point in time, fabric is probably the most widely used and stable out of the hyper ledger framework. You specifically to mitigate many of the concerns our own earthy um, it's a permission list platform, which uses a very computational intensive proof of work a longer than for consensus, which we talked about consensus in the previous module. Next is a sawtooth platform, which not this platform is used on large networks and for fast conversions of contents is a long rhythms. It has a clear separation off system and APP development, which makes buildings decentralized APs a lot easier. It's specifically targeted for large enterprises because it has modular design that allow users to choose transaction processing rules, permanent permission ing and consensus a longer them based on their use. Kate maybe also Arrojo, which is a fast and performance Blockchain network with a focus on building, perhaps for mobile use cases. There's also the borough, which, which is a modular Blockchain client. It's developed on a special version off Ethereum Virtual Machines or E V M for short. Then we have Indy, which is which specializes in identity management. It provides tools, libraries and reusable components to construct independent digital identities for participants of the network. So those are the basic frameworks that are offered by hyper Ledger. Along with his framer Come a bunch of tools that we can use to develop our maps and make our lives but easier Now I'll just talk about a few of from that that we will look at and throughout the duration of this course. 1st 1 is the composer, which offers a U I based development tools to make developing Blockchain APs lot easier. It's basically a G Y interface, click and goal where you can fill out forms in a very easy to use ur interface to model resource is transactions and participants in your network it uses the hyper ledger fabric as the execution run time to build decentralized APS. Then we have the cello, which offers deployment as a service facility to make it easier for you to create, manage and terminate Blockchain networks. It's a commander on either on a cloud or on your local network or local data center. And lastly, the Caliber, which offers a Siris of benchmark tests that allow you to measure the performance of a specific Blockchain implementation. It's a set of pre defined use cases that caliber will run against your Blockchain network to test its performance. So all of these tools coming in very handy when you're developing a Blockchain network or when you're developing APS hosted on a Blockchain network, they've made life a lot easier for us. So thank you for joining me on this on this Oreo off what hyper leisure technology is and how it came about. I hope you guys got a good Oreo off the different frameworks and tools that hyper ledger has to offer. So let's go ahead and look at how we can implement and develop APS using hyper ledger 13. Membership service providers: Hi, everybody. And welcome to this lesson on looking at membership serious providers. So no one attitudes to go through what identities are. We look at PK eyes, so now we have to see how the identities could be used to represent the nose or members of a Blockchain network. And this is where a membership service provider or MSP, comes into play. It identifies which route certificate authorities and which intermediate certificate authorities are trusted to define members of a trusted domain. The power often MSP, goes beyond just listing who another participant is. And MSP can actually identify specific rules. And actor might play either within the scope of an organization that I must be represents and sets the basis for defining access privileges in the context of a Blockchain network. So let's look at a little bit more detail of what MSP czar, especially an organization, is a managed group of members. This could be something as big as an international corporation or something as small as ah Mahn Pasha. What's most important about organization is that they manage their members under a single MSP. The exclusive relationship between organization and its MSP makes it sensible to name the MSP after the organization, a convention you'll find adopted most of the time. For example, on organization that might be called Organization, one would likely have Emma Speed is called or dash MSP one, as you guys can see on there. In some cases, an organisation may require multiple membership groups, for example, where channels are used to perform very different business functions between them. In these cases, if you have multiple M sp's, you would need them. Name them accordingly, depending on which business function they're responsible for on or position is often divided up into multiple organization units, each of which has a set of responsibilities. For example, in opposition might have a manufacturing division that might have a distribution division that might have a logistics division and so on. So, in a C A issue certificates the organizational units field in the certificate specifies the line of business. With the identity belongs, I will look, we're going to see a little bit later on how these units can be helpful to control. Parts of an organization were considered to be members of a Blockchain network, for example, only identities from, let's Say, the manufacturing unit might be able to access channel, whereas a distribution unit might not be able to access the channel. Finally, though, this is a slight misuse off the organization units. They can sometimes be used by different organizations in a consortium to distinguish each other in such type of cases, the different organizations use the same route. See A and intermediate C is for the sheen of trust. But assigned the unit field identify members of each organization is not how they're meant to be used. But organizations sometimes also used them like that. So you so you might come across that even in your organization or an organization that you're working for. So there's two different appearances of Hamas peas in a Blockchain network. Yeah, the Configuration channel was referred to US Channel I Miss P's and then look and locally on a nodes premise, which is a local MSP. The local on this piece of defined for clients and for notes, knowed local MSP is to find the permissions for that note. For example, who the Pier Edmunds are the local MSP ease off the off? The users allow the users site authenticate itself in its transaction as a member of a channel or as owner off a specific role in the system. Now every note and user must have a local. I must be defined as it defines who has admin privileges and so on. In contrast, Channel Emma's Peas defined administrative and participatory rights at the channel level. Every organization participating in a channel must have and must be defined for it. Piers and orders on a channel will all share the same view off a channel, MSP, and will therefore be ableto correctly authenticate the channel participants. This means that if an organization wishes to join a channel, an MSP incorporating the chain of trust for the organization's members would need to be included in the channel configuration. Otherwise, the identities will reject it. But the key difference between local and channel Emma's piece is not how they function. Both turn identities into roles, but their actual scope. One is local, whereas one is organization wide. A split between channel and look I'm a speed reflects the need of organizations administer their local resource is such as pure or journals, and the channel resource is such as ledgers is more contracts. It's helpful to think of these MSP XYZ being at different levels with Emma's peas are higher level relating to network administration concerns. While the lower level handles identity for administration of private resources. Emma's Pisa mandatory at every level of administration and they must be defined for the network channel Pierre Order and users. It's very important for a channel to maintain the AMA's peas of its members. Separately, a channel provides private communication between a particular set of organizations, which in turn have admin control child policies interrupted In the context of that channels , I must be defined who has the ability to participate in certain action on the channel. So there's no necessary relationship between the permission toe administrate a channel and the ability to administrate the network configuration channel. So you've seen the most important element of us. Often. MSP are the specifications of the route for intermediate CS that are used to establish and actors or knows membership in the organization. There are more elements that are used in conjunction with these two to assist with the functions, other nine elements to an MSP. It's easiest to think of these elements in a directory structure where MSP s name is a root folder name of the supple, the representing the different elements of the configuration. For example, of the root C. A's. This has a list off self signed certificates of Root. C is trusted by the organization represented by this MSP. And as you might have guessed, this is the most important folder. But because it identifies the C. A's, you also have the organizational units listed in there. You have Administrator, which contains the list of identities that define the actors, will have the role of admin on the network. Yes, importantly, have revoked certificates of you if you guys remember from the identities, lessen the revoke certificates are very important toe. Identify rogue notes on the network or rogue agents on the network you have. The Nord identity was contains the identity of the North, which again is a cryptographic material that, in combination peaky, I allows a note authenticate itself and its messages. You have the key stores which store the private keys. Alec TLS, Rosie A. Contains a list off self signed certificate off route. See is trusted by the organization for TLS communication on an example, the tales communication would be one appear needs to connect toe on order so it can receive leisure updates. And the same goes for the TL TLS Intermediate See ace. So if we got a good grasp of how a membership so hopefully got a good grasp of how membership service Breuder's work and in conjunction with the identities lesson that proceeded this you should have a good grasp of how they both worked together on how both of them are is sen show for a Blockchain network to operate properly. 14. What is an identity: Hi, everybody. And welcome to this lesson on defining what we mean by identity, as referred to in the Blockchain network. So different actors in the blocks in network that we looked at or we are going to look at, depending on which lessons you have gone through, include peers, orders, client application administrators and each of these actors. Active elements Insider, Outsider network able to consume services have a digital identity in the form of a digital certificate. Thes identities really matter because they determine the exact permissions over resource is an access to information that actors have in a Blockchain network and by design, Blockchain networks are meant to be secure and anonymous, or these identities play ah, important role in that aspect. Now let's take a look at a simple scenario to help explain the use of identity. So imagine you visit a supermarket to buy some groceries. Remember the check out you. Most luckily, remember the sign that says a Visa MasterCard Diners Club Amex card are accepted here. If you try to pay with a different card, it doesn't matter whether the card is authentic or not. It will not be accepted. It only accepts Visa, MasterCard and Diners Club, and you try to use an American Express card. It will not work even though it's a valid card, because having a valid credit card is not enough. It must also be accepted by the store and public key infrastructures and membership service providers work together in the same way a PK provides a list of identities and an MSP says , and an MSP says, Which of these are members off a given organization that participates in the network? Peaky, I certificate authorities and I must peas provide a similar combination off functionalities . Ah, Peake EI is essentially card provider. It dispenses many different types off verifiable identities Had an MSP, on the other hand, is like a list of car providers accepted by the store determining which identities are trusted for in store payment. Let's dig a little bit deeper into these details. So what R P care eyes or public key infrastructures there miss the collection off Internet technologies that provide secure communications in a network. It's peaky eyes that put the S in https. Although Blockchain network is more than a communications network, it relies on this peaky as standard ensure secure communication between various participants in the network and ensure that the message posted on the block chains are properly authenticated is therefore important to understand basics of PK I and why MSP zehr important. Other four key elements toe a public key infrastructure. We have digital certificates. We have public and private keys. We have certificate authorities and we have certificate revocation lists. Let's go ahead and take a look at each one of these four in little bit more detail. So digital certificate is basically a document which holds a set of attributes relating to the holder of the certificate. The most common type is the X 509 standard. So, for example, and now a certificate is very similar to a government issued identification card. It provides information about the person which can be used to prove facts about the most important thing about all these attributes that air captured is that they can be recorded using a mathematical technique called cryptography so that tampering will invalidate the certificate. This cryptographic allows a person to present their certificate to others to prove their identities so long as the other party trusts the certificate issue are known as a certificate authority. As long as the difficult authority keeps certain cryptographic information securely, anyone reading the certificate can be sure that the information about this person has not been tampered with. How does authentication work to ensure that the person is would claim to be the authentication and message integrity are both important concepts. Authentication requires that parties who exchange messages are a short of the identity for message to have integrity. It means that it should not have been modified during its transmission. Traditional authentication mechanisms rely on digital signatures that, as the name suggests a law party to Disney, sign the messages. They also provide guarantees on the integrity of the sign message, not technics. Not technically speaking. Digital signature magnetism require East Party toe hold to cryptographic Lee connected Keys Ah, public key that is made widely available and acts as authentication anchor and a private key that is used to produce digital signatures on messages. Recipients of digitally signed messages can verify the origin and integrity off a received message by checking the attached signature is valid under the public key off the expected center of a unique relationship between a private key and the respective publicly is the cryptographic magic that makes secure communication possible. The unique mathematical relationship between the keys can be used to produce a signature on a message that only the corresponding public he can match, and only on the same message. This is how you can ensure that the message has not been tampered with and prove the person's identity. In order for all of this toe work, we have to have a trusted and verified certificate authority. Now see a Zara Common part of security protocols. And I'm sure you guys have heard of some of the more popular ones such a semantic or did you search or go Daddy? And so on? A certificate can be widely disseminated as they don't include either the actors nor the CIA's private keys. As such to can be used as anchor of trust for authenticating messages. The sea is also have a certificate, which to make widely available. This is known as a public certificate. This allows the consumers of identities issued by given see A to verify them by checking. The certificate could only have been generated by that public key in a Blockchain setting. Every actor who wishes to interact with the network needs and identity. And in the setting, you might say that Warner Morsi is can used to define the member off in organizations From a digital perspective, Dossiers basically have two different versions. We have roots C A's and we have intermediate CS. Because Route see ace organizations that the semantic have to securely distribute hundreds of millions off certificate to Internet users make sense to spread this process out across what are called intermediate certificate authorities. These have their certificates issued by the route or another intermediate authority along establishment off a chain of trust. This ability to track back to the roots see a not only allows a function of C A to scale while providing security. It also allows organizations that consume certificates to use intermediate C A's with confidence if it intermediate see is compromised. On the other hand, there will be much smaller exposure as compared to for route See A is compromised. No revocation lists are very important and also very easy to understand. Their basically just a list of references to certificates the see a nose to be revoked for one reason or another. For example, if we're going to a store. The revocation list will know the list of stolen credit cards off. Any one of those is used, the personal automatically identified when 1/3 party wants to verify and other party's identity. It forced checks the C A's revocation list to make sure that the certificate has not been revoked. Aware Fire A verifier does not have to check their educational list, but if they don't they run the risk of accepting compromised identity. Now certificate being revoked is very different from a certificate that's expiring. Revote revoked certificates have not expired. They are, by the very measure off, fully valid certificate that their habit they have been revoked for one reason or another. And that conversation gets pretty in depth and out of the scope of this lesson. Just know that there's a difference between a revoke certificate and an expired certificate . Now you've seen how PK I can provide verifiable identities to a chain of trust. The next step is to see how these identities can be used to represent the trusted members off a Blockchain network, and that's where a membership service provider, or MSP, comes into play. It identify the parties who are members of a given organization in a Blockchain network 15. What is blockchain: Hi, everybody. And welcome to this lesson on looking at what is Blockchain. First, let's go ahead and try to define what we mean by Blockchain. And if you guys Google Blockchain, you'll get a number of different meanings and descriptions off what people think. Blockchain actually is now. The one I found out to be the best came in a book titled Blockchain Revolution back in 2016 and they described Blockchain as an incorruptible digital ledger off economic transactions that can be programmed to record not just financial transactions but virtually everything off value. So it can also be thought of as an encrypted database of agreements that are entered into the agreements that are stored in a Blockchain, our contractual clauses and terms and conditions that haven't agreed to by a number of parties. The terms and clauses are recorded as transactions in these agreements. Ah Blockchain is essentially alleged because thes transactions are entered into the Blockchain ledger and that serves as a bookkeeping structure for these agreements. Now, the beauty of this technology is that once thes transactions have been recorded, neither party can rewrite the terms. No terms can be modified easily. Transactions are there for immutable, irreversible and incorruptible and most important of all, they are verified before being added to the Blockchain. A lot of us are most likely familiar with Bitcoins, especially in 2018 when there was a big rise and fall in the Bitcoin and the Bitcoin price is a lot of us became familiar or at least heard about Bitcoin. I even know this course is not about Bitcoin itself. I think it's important that we have some idea about it to differentiate it from Blockchain . Ah, Bitcoin is broadly used as a Cryptocurrency, and that's something that only exists in the digital realm. There is no physical Bitcoin like we have physical money on our physical money is something that we keep in a bank account, and we trust our bank to make sure that they keep a secure ledger or the incoming and outgoing value so they keep track of the money you're putting in and the money you're taking out. Banks are part of a large global network where transactions can be done between banks and currencies can be exchanged With Bitcoin, there is no central system as well. Look at later we look at digital ledgers and how Blockchain works. There's no bank. There's no way to revert transactions once they're done. All transactions are transparent and can be fully anonymous. The underlying technology that enables this is called Blockchain, and that's what we're going to focus on in this course. Now let's talk about briefly about the history of Blockchain and how it came about now in motion off crypto currency motion off Secure blocks or cryptographic Lee Secure Chain of Blocks was actually described back in 1989 by somebody called Stuart Haber. But the first recognized work on decentralized digital currency on using similar technology came in 1997. But it took almost 10 years after that until Blockchain, until a blocking concept was getting mature and published by somebody known as Satoshi Nakamoto in 2000 and six or 2000 and eight. No, Satoshi is actually considered to be the founder of Bitcoin, but the issue is that nobody actually knows who start where she actually is because they are still anonymous, even to the state. Nobody knows whether they're a person, whether they're an organization or who they are. They have decided to stay anonymous since its beginning that many interesting theories about who they actually are that kind of adds ah, bit of enchantment and mysticism about Bitcoin and its underlying technology. Let's go ahead and raise forward to today, and Blockchain is actually hitting mainstream. We have a lot of early adopters off Blockchain in many different industries. Lots of large organisations such as IBM and Microsoft and Fujitsu and Apple are adopting the Blockchain technology within their own organizations and also looking to deploy Blockchain into the mainstream corporate world. Now some of the characteristics are blocked in that you guys see in the bottom. First of all, it's you can think of it as globally unique or a global singleton. And if you know how, Singleton's work for a program you can think of Blockchain objects as a global singleton instance is the Blockchain is natively. Object oriented were cold and data reside together. However, objects are securely separated from each other. They're virtually unstoppable. There's no one control over a Blockchain. It can't be stopped, and it cannot have a central point of failure. Blockchain, by its very nature, is meant to be accessible to everyone and everywhere and most important of all, its verifiable. Everyone that has access to the Blockchain convey verify every single transaction from the beginning off the block chain. This enables everyone to audit everything that had ever been done to a Blockchain. So now that you have a quick history and a quick overview about Blockchain and we've differentiated from Bitcoin, let's see how the technology actually works as a quick or, you know, you know, this is a very detailed process, but I'm just going to give you a quick overview to give you a good understanding of how the Blockchain actually works. So essentially begins with someone doing a single or a group of transactions. A transaction is typically sending data in the form of a contract where you're exchanging tangible or intangible goods, and depending on the Blockchain implementation you're using, it can also involve Cryptocurrency being sent from one account to another. The transactions are sent to large peer, a peer network of computers. These air generally distributed across the globe. Each computer is referred to as a note, and they all have a copy of the existing data or the existing legend. The transaction is then executed invalidity based on appreciate contracts and scripts, and we'll look at the different ways that we can execute transactions a little later on when we discuss hyper ledger. Now this ensures that all nodes execute using the same set of rules and same set of log rhythms. When the transactions were executed, the result is added to the Blockchain, and since this has done it each node, you would have to literally compromise every single node in the chain in order to compromise the transaction. When Boone transactions in the Blockchain, there's some aspects that are absolutely necessary for toe. Have the carrots restricts, I previously mentioned. First of all, all transactions are atomic. This means that the full operation run or nothing at all. So let's say you have some type of monetary transaction in this transaction, you'd have to ensure that both the credit and debit functions occur properly. If either one of those functions failed, the whole transaction fails. Secondly, transactions run independently of each other, so no two operations can interact or interfere that with each other. It has to be inspect herbal. Every single method called that comes to Blockchain comes with the actual address to the caller. This gives unique possibility for securing an audit and auditing solutions on a very, very wide scale. And this is what makes Blockchain unique. And and lastly, Blockchain objects are permanent. The cold foreign object can never be changed, and you can never delete an object. Externally, the only way to remove an object from a block from a Blockchain is that if its program to remove itself in one ways that's done is through hashing. No hashing, simply stated, is a function that takes some input data and create some output. Data in layman's terms is basically to execute a mathematical longer them that creates a result with a given length, regardless off the input. Given the result, off a hashing function is called the hatch, and you can think of them as digital fingerprints. Hashing is a one way function mean the functional always returned, the same result given the same input. But you can never regenerate the input based on the result off the hashing lager them. Let me give you a simple example. Let's say that we have a simple hashing lager them that takes any number between zero and 45 isn't input Ah, logger them, then double the number and round to the nearest 10. This means that if you put five, you'll get the hashing result of 10. The same will be true if you put 12 or three, but if you put nine, the hash result will be 20. The length of the result will always be two digits, even if you give a single digit input. If you run the log a rhythm several times in the same input, you always get the same result. But you would not be able to figure out what the input waas. A lot of times hashing is used in data forensics. When organizations are doing forensic activity and doing audits off there, internal networks, the use hashing technology one making images of databases or images off hard drives ensure that image that's taken is stays the same. For one, it's access. And a lot of times when you're in legal cases that involve digital information, hashing is used to ensure that evidence has not been tampered with. Now, very common hashing longer than use with Blockchain is called S H A to 56. It's one of the several checks, Um hashing logarithms and it will produce a long text ring as a result. S A J is a family of hashing a log rhythms The number following the name lets you know the complexity of the implementation just to give you an example when we run the text through on s a G 2 to 6 a longer than we get a long string that you can see here As a result. When I typed in my name Kassam, you guys didn't see the long hash off. My name are very common. Used for hashing is one storing passwords in a database. If you start the password and clear text in your database, your usage might be at risk if you're databases hacked and the hacker gets access to the table. However, if the password is store is a hash, the hacker will have a very hard time figuring out what the actual passer it is. They will then need to compare the passers with known hashed results where the input is known less well because hash longer than was always give the same results given the same input and always give a fixed length off the result they are also ideal to verify the consistency off large amounts of data. If you put the entire Wikipedia, the website, through a hashing algorithm and save the resulting hash, you could easily figure out if someone had changed anything on that website. Even a single comma or a single period would change the hash result. Lastly, other benefit is that you don't need to store the original data to see if anything has changed. All you need to store is the initial hash. Hashing logarithms are also used in countless areas of modern security, where the need for consistency is high. Now, since we're talking about hashing, want to briefly give you or you about something called the Miracle Tree LaMarca trees. Fundamentally, our data structure trees were each non leaf note is a hash off its representative child nodes. The leave note are the lowest tier of notes in the tree. That might sound difficult, but but if you guys look at the image, it will make it a little bit easier. Notice how the non leaf nodes or branches represented by hash 00 and 01 on the left side are hashes off the respective Children L one and L two further notice how hash zero is a hash off. It's concentrated Children branches hash 00 and 01 The example you see is the most common and simple form off a miracle tree known as a binary miracle tree. As you can see, there is a top hash that is the hash of the entire tree. Known as the root. Essentially, market Merkle trees are a data structure that can take and number of hashes and represented with a single hash. The structure of the tree allows for efficient mapping off arbitrarily large amounts of data and enables easy identification of where changes in that data occur. This concept enables Merkel proofs with which someone can verify that the hashing of data is consistent all the way up the tree and in the correct position, without having to actually look at the entire set of hashes. Instead, they can verify the data chunk is consistent with the root hash, but only checking a small subset of the hashes rather than entire data set. This becomes very useful when the Blockchain becomes fairly long, where you don't necessarily have to check the entire block chain for consistence you can check a small subset of the chain to ensure that nothing has been changed. Are the most important benefits of the Merkel tree structure is ability to authenticate arbitrarily large sets of data to a similar hashing mechanism that is used to verify a much smaller amount. The tree is advantages for distributing large sets of data into manageable, smaller parts where the barrier for verification of integrity it's substantially reduced despite the overall larger data size. And again, Blockchain uses this as its primary stores off authenticating hashes Just due to his very nature were the chains can get fairly large since involved Global network. No, we talk about Blockchain. Let's look at what we mean with the block in. Blockchain actually means a block consists of data and its resulting hash for go ahead and change any data in the block. The hash will change and the block will be invalid. It also includes a nonce, which is input to the hashing allow algorithm that would result in the first part of the hash to be something pre defined, like a set of zeros like the non stick I see on the screen is 431189 Now, whenever we change anything, we will need to rerun the hashing law birth. Um, until we figure out which nonce to set, this is called Mining the block. Now let's see what happens when we have a chain of blocks. Now, when we're looking at a chain the block the subsequent block contains ah block number meaning which order it has in the Blockchain. Ah, block ultimas contains a time stamp, but the most important aspect of the block is the hash that it includes. And as you guys can see, Block number four contains the hash of the previous block, and block number five contains a hash of block number four and each previous hash is used to generate their own hash. This means that if you alter any off the value in any of the blocks you will book, you will literally break all of the blocks in the chain. This is also the Merkel tree I mentioned earlier comes in to use. The only way to fix a blocking will then be the mind all of the blocks after the changed block and make the non Stashes all over and Blockchain redistribute redistribute a chain of blocks toe last number of computers. This means that the chain exists in multiple locations at one point in time, and depending on implementation or using, it could be literally millions off computers. This means that we could easily figure out if something has changed. Even if one of the chains has been remind, the resulting hashes would be different from one chain on the Blockchain works in a way where the chain that has the most work put into it minds. The altar chain would then be rejected by the distributive Blockchain and removed data stored in the Blockchain is generally available to everyone that has access to the chain. This gives some challenges, but it will also lead you to think about security in some application. It's not a problem that everyone has access to everything, but in most cases you want limited control. They're basically two ways to handle this. The first is obfuscation, obfuscation. Biscuit means to make the data relevant only to those who know its meaning. One double. This is what Bitcoins with the address of any account. It's a long string of letters and numbers. No one in the chain knows who the addresses physically connected to, and they don't need to. But everyone knows every transaction going between the different account addresses. This is how you stand on Imus. As long as you don't share a connection to your account address, there's no way anybody can figure out who you actually are. But the bomb are with drying on. Lian artifice, Cation is that you always run the risk off someone making the connection due to a bridge in the system, controlling the keys and connect the data to deal with this blotchy news is encryption. When you encrypt a message or the transaction payload, you apply a two way lager of them to the message in a way that can Onley be dick or did. If you know the password or pass phrase, this is where blocked in uses the public key infrastructure to use private and public keys . Let me is the data can be available to everyone, but only those who have the keys and the cryptic message can make sense of it. And there many different encryption, a log rhythms that come with hashing and most of them are continually evolving to make sure that nobody has breached them. Now that we have a good overview about the technical aspects of Blockchain, let's talk about, well, it's currently being used. I like I mentioned. The current most broad use of Blockchain is with digital currencies and cryptocurrencies like Bitcoin because of the fact that anonymous transactions can be trusted just as much as they can with any bank this opens up, why'd range of new ways to deal with global transactions? Additionally, a small revolution that has been going on for some time and picking up pace now is called I O. T. Or Our Internet of things. Well, this is literally where small smart devices use the Internet without human intervention. Right now, there are many more devices using the Internet than humans. With using Blockchain, these devices can suddenly do trustworthy transaction securely. For example, your washing machine could order detergent for you when it notices that is getting empty. Certifications is also is also a great use of Blockchain certification. Bodies could use certifications to products or organizations in a tamper free and fully transparent way. Secure sharing of data is another example. Given the nature of Blockchain, you could insert encrypted information into it and make sure that only those you allow can access the information. This could be used for gap with medical information or medical devices. Hospitals in the world could have instant access to your medical folder one needed, and you would be able to track everyone that has tried to access your information. And there are many more examples of how organizations can use Blockchain within their own private networks, along with utilizing it with public networks and consumers. This is just a start off a new era in technology and the way to do things, and luckily, Bitcoin has allowed Blockchain to come into the mainstream. But now is the time where organizations are adopting the use of this technology within their own networks. And pretty soon it will be in the mainstream where this technology is used for your day to day transactions. Thank you for watching this lesson on and on a broad or you about Blockchain. I hope you guys got a good overview off what Blockchain is, what the term means and how we can differentiate Blockchain from Bitcoin and the different uses that this technology has 16. What makes up a blockchain: Hi, everybody. And welcome to this lesson on looking at the different components off a Blockchain. Now, as discussed, Blockchain is essentially allowing transactions were recorded in a shared or distributed ledger rather than having a centralized leisure, which is how things used to work. So now let's look at what are the different components off off Blockchain and how it enables the use of a distributed ledger. So we're gonna look at three different things in this lesson. Look at transactions, smart contracts and consensus. A log rhythms. These are the basic building blocks that power the Blockchain network. Transactions in the world of Blockchain could be thought off as a message, which is sent from a center to a recipient, which transfers something over value to the other. It can be in a form of currency, which a lot of your familiar with cryptocurrencies, such as Bitcoin, or any tangible or intangible asset, for example, in terms of a tangible asset, it can be a vehicle. It can be a house. It could be anything that's tangible or intangible. Assets such as intellectual property and transactions can be logically thought of as being made up of three components you have the recipient, you have the signature of the centre and the other value of the assets to send. Any transaction that has been executed has to be recorded in a permanent manner. And the distributed ledger. Since the letter exists with all nodes, these transactions made to be verified and reflected amongst all nodes when we use Blockchain technology. These transactions are the contractual clauses that make up the agreements. They're executed with something called smart contracts. Smart contracts are essentially the cold that runs in orderto execute transactions. All Blockchain framework used smart contract mechanism to allow common contractual clauses to be specified, verified or enforced, even in the absence of trust between parties and in the absence off 1/3 party. No Wikipedia specifically defined smart contracts as a computer protocol intended to digital, facilitate, verify or enforce the negotiation off performance of a contract. They allow the performance of credible transaction without third parties, and they're trackable and irreversible. The implementation of a smart contract is essentially a software program. This is the program that's executed on a Blockchain network to add entries into the shared distributed ledger. This program is written in a domain specific language. Such a solidity when you're using ethereum or in a high level language such as JavaScript. Smart contracts encompass all of the details that have been agreed to by the participating parties. No, no, no in a Blockchain network and update their own copy off the distributed ledger in a unilateral way. Now this means that there has to be some mechanism which should be used to determine what entries get added to the share ledger. And one. The way this is done is through something called consensus. A longer them's no Blockchain technology explicitly avoids the use of trusted third parties . All participants in the contracts and agreements essentially don't trust one another, which means verification of transactions need Tito adhere to a carefully designed a longer objective of a consensus. A longer them is to ensure that there's agreement amongst all peers as to what transactions are valid and what should be added to the distributed ledger, not transactions in a distributed ledger have to be verified before they become part of the permanent record, which means you need to verify the identification of the center or the initiator of the transaction. You also need to make sure that that the transaction has not been modified after initiation and confirmed that the center actually owns the asset that are being transferred over, whether their tangible assets or intangible assets. All of these steps are required to validate transaction and add the transaction to the Blockchain network. Now all of these steps to validate a transaction and add the transaction to the Blockchain network are part of the consensus. A log rhythm. All of the nodes in the Blockchain have to agree upon what transaction should be added and the exact ordering off the transaction as well. Now there are many different consensus logarithms that exist out there, and they're different based on the framework that you work with. So, for example, a theory amuses the proof of work a log rhythm while hyper leisure Sawtooth uses the proof of elapsed time which will look at a little later on and so on. My once the nodes in a Blockchain network reach consensus as to the transaction that form part of the permanent ledger. And as to the order of these transactions, that air then added to the distributed ledger and become part the permit ledger that cannot be changed. So how? Blockchain frameworks ensure that one that the transaction once added are permanent and incorruptible. So let's quickly look at implementation details off a block. Shame No, let's first look at the block in Blockchain stands for Blockchain is basically a growing list of records called blocks which are linked to each other. Cryptographic Lee. All of these transactions that are recorded on the Blockchain network are in the form of blocks. Ah block is a set of verified transactions in some order where the order has been determined by the consensus a longer than that is used. All transactions recorded in the distributed ledger in the form of blocks and each block are linked to the next block containing the next set of transactions. Of the link between this blocks again is a cryptographic link. Many cannot be tampered with very easily. A chain of the link blocks make up the distributed ledger, which is where the term Blockchain comes from. Now the cryptographic link is set up using cash in technology which ensures incorruptibility of the transactions within the certain block and the Blockchain network as a whole. So essentially each block in the Blockchain has a hash, which is the hash of all of the transactions. Within that block, changing the order or contents of any of the blocks will change the hash. Each block in the Blockchain contains the hash of the previous block. In that change, not this cryptographic link is set up using hashing technology, which ensures incorruptibility of the transactions within the certain block and the blocking of the whole. So each block in the Blockchain as a hash, which is a hash off all of the transactions within the bloc. Ah, change in the order or contents of any of these blocks will change the hash. Now. Each block in the Blockchain contains the hash of the previous block in that chain. Now, if you notice that the hash of the first block is present within the second block, and it's used to generate the second blocks hash, the hash of the second block is then also within the third, and that's used to generate the third blocks Hash. The first block in any Blockchain is called the Genesis block because it doesn't contain any previous hashes, and this hash is a cryptographic link that ensures that the transactions added to the Blockchain are immutable and irreversible. Transaction data in that block can't be altered after the fact. Any change in the hash value off a particular block requires altering all subsequent blocks on all distributed ledgers across all nodes in the network. This can become extremely complicated and is nearly impossible to do on closing. A Blockchain network uses transaction hashes and cryptographic linking off blocks within the network in order to ensure that any transaction recorded in this manner are verified, their permanent and they can't be changed after the fact. This is what essentially makes Blockchain networks so secure and almost unhappy able at this point in time. Thank you for watching this lesson on giving go a quick overview about the different components off a Blockchain. Now let's go ahead and get into hyper ledger and see what it has to offer