***DriveNet demo script*** **PART 1: Basic Demo** Hello, my name is Matt Lucas from the IBM Blockchain Technical Solution Acceleration team. In this video I'm going to show you the DriveNet blockchain network. DriveNet is a freely available, public test network for learning and evaluating IBM Blockchain Platform. Using just a web browser, we're going to discover and register with the network and use an application to conduct some blockchain transactions and see the results. We're then going to dive into the technology, and look behind the scenes at the smart contract and application source, and then at the ledger and Hyperledger Fabric network components - all using the IBM Blockchain Platform tools. The purpose of the demo is to show off the power of blockchain networks and, of course - the IBM Blockchain Platform. Let's start by looking at the DriveNet business network. DriveNet tracks the ownership of cars between users of this network. It consists of a connected set of small car dealers and owners, whose role is taken up by arbitrary users joining the network - that'll be us. There is also a regulator role who, in this scenario, ensures adherence to rules and also countersigns transactions. Here, this role happens to be played by IBM. So let's start our demonstration by bringing up a web browser and going to fabnetworks.org. There are lots of blockchain networks out there and discovery can be a problem. To help with this, we're going to use a registry- like a shop window for services. FabNetworks is a registry of Hyperledger Fabric blockchains, and provides features such as automated onboarding. You can browse this site at your leisure, but for now let's click on 'DriveNet' to find out more information about it. Here you can see some details about this network - for example, when it was created, and some technical information. If we scroll down you can see we're presented with an option to join this network. Joining this network simply requires a valid email address. I'm going to type in an email address into the text field here and click on Go. This starts the onboarding process. We'll now be sent an email that contains a token; this is simply to ensure that our email address is active. If I refresh my email client I now see that I have received the email, and there is the token. I'm going to copy that token and paste it back into the website to confirm my registration. Once my token has been validated you'll see that I'm now presented with a set of login credentials for the DriveNet network. Notice that they are in three sections: application details, developer details and administration details. We'll revisit the developer and administration sections later on, but for now let's focus on the application details. If I click on the Application hyperlink, it will launch the DriveNet application in a new tab, and I can log on to it using the supplied userid and password. Now I'm presented with the main DriveNet application. You can see that there are two main sections - cars assigned to me (that's currently empty because I've only just joined), and 'Network cars' which shows all the other cars on this shared network. Let's start by creating a car. Here I am prompted to enter the details of the car record I am creating. Most of these fields are free-format text. The ID needs to be unique on the network and must conform to the style presented here. The application has selected a unique ID for us, which we can keep or change. We'll leave the owner of the vehicle as our ID for now. We now click on submit and that will issue a blockchain transaction to create a new car record. When that transaction completes, notice how the car is now shown in the list of cars assigned to us. We'll now demonstrate us transferring ownership of that car to another user. To do this, I'm bringing up another browser window that is logged on as a different user of the network - pre-registered to save time. Notice how the user ID in the top right of this new window is different. Also notice that, currently, they have no cars assigned. If I select our first user's newly created car, it will show us the details of it, including the ownership history, which the provenance of blockchain enables us to do. It also presents us with some actions we can do to the car, including changing its owner. I'm now going to change the owner of the car to be our second user. When I click on submit, a new blockchain transaction is invoked, which changes the status of the car to 'Awaiting new owner'. We now need the second owner to confirm the transfer. If I refresh our second user's application, you can see that the car shows up and it has a status of 'Pending your confirmation'. We'll get them to select the car, and in the actions menu choose the 'Confirm Ownership' option. Once more this submits a blockchain transaction; this time, completing the transfer of the car to the second user. Of course, if I refresh the first user's application, the car is no longer listed, and if I were to search for and attempt to modify it, they are prevented from doing so. Notice that the action menu no longer appears for them. In this first part of this demonstration, I have joined the DriveNet test network and run some blockchain transactions. Now let's look in more detail at the technology behind this demo, starting with the smart contract and application. **PART 2: Development** We're back on the Drivenet credentials screen on FabNetworks.org, and are now going to look at the developer details section. First notice that there are links to two GitHub repositories - one for the application source and one for the smart contract. To begin with, let's copy the URL for the application source. If we switch to our VSCode editor, we can grab the source directly. We'll click on 'Clone Repository' and paste the URL. We select a location to clone to, and wait while the source is downloaded. Straight away you can see the source appears for the drivenet application. You might want to check out the parts of the source that submit transactions to DriveNet. For example, here you can see all the actions we can do to the car records; this is where the smart contract transactions are submitted, via a small helper class. Now let's look at the smart contract itself. DriveNet uses an enhanced version of the fabcar smart contract. Going back to fabnetworks.org we can copy the URL for the smart contract's repository, and again clone it using VS Code. We can add to our existing workspace by selecting the Git Clone option from the Command Palette, and again pasting the URL. The entry point for the smart contract's transactions is contained in fabcar.ts - look here to understand the different transactions you can submit on the network. Here for example, is the entry point for the transaction to create a car record. You can test these transactions out directly in VSCode using the IBM Blockchain Platform VS Code extension, and even use it to develop your own custom client applications. If you use the enrolment ID, password and gateway file from the developer details section of fabnetworks.org, you can create the wallet and gateway you need to do this. The instructions are contained in the 'Joining a network' tutorials that are part of the IBM Blockchain Platform VS Code extension. Once you're set up, you can browse the available transactions on the DriveNet smart contract and run them against the live network, just like we did in the application. Or you can create your own applications - again, the tutorials tell you how to do this. Now we've looked at the DriveNet developer assets and tools, let's take a moment to look at the administration side, and learn about the underlying blockchain network, its components and how to browse the ledger. **PART 3: Administration** Let's see how the technical blockchain network maps to the business network we described earlier. The Hyperledger Fabric network consists of three organisations. Firstly, there is a Community Org, that's the organization to which we joined, and that has a peer that holds our copy of the ledger, and a CA, which gave us our enrolment information. Secondly, there's an IBM Org, which also has a peer and CA. Finally there's an ordering org, which manages the Fabric ordering service. All transactions submitted to the network are countersigned by peers in both the community org and IBM Org. The use of a community org for joiners is a common pattern in blockchain networks, because it allows smaller participants to onboard without the cost of standing up new infrastructure. Let's look at the Administration details section back on FabNetworks.org. It contains a URL, userid and password, which allows us to log on to an instance of the IBM Blockchain Platform web console for the drivenet network. I've opened a browser tab at this URL and am now pasting in the credentials as supplied. Once this has completed and I'm logged in, I am then shown the main IBM Blockchain Platform web console view. Notice the icons down the left hand side that give us access to the administrative features of the platform. To begin with, let's look at the nodes of the network. As we're a member of Community Org, we don't see the IBM Org's nodes, but we do have visibility of our community peer and CA. Now because we're not a full administrator of the community org, we are limited in what we can do - we can't create peers or deploy smart contracts, for example - but the console still allows us browse the network and complete basic tasks. We can dive into these nodes to find out how they're configured, and also to do simple actions such as completing our enrolment. The IBM Blockchain Platform web console also allows us to browse the blockchain, which we can access through the Channels icon. If we select the 'drivenet' channel we can see the blocks that form the blockchain and even drill into the transactions and transaction detail. Here we can see one of our transactions from earlier. This concludes our demonstration of the DriveNet network. To try things out for yourself, head on over to fabnetworks.org to get started. Thanks for listening, and have fun!