Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is A blockchain? B. RAMAMURTHY ©2019, ALL RIGHTS RESERVED

Similar presentations


Presentation on theme: "What is A blockchain? B. RAMAMURTHY ©2019, ALL RIGHTS RESERVED"— Presentation transcript:

1 What is A blockchain? B. RAMAMURTHY ©2019, ALL RIGHTS RESERVED
TEACHING PROFESSOR COMPUTER SCIENCE AND ENGINEERING DIRECTOR, BLOCKCHAIN THINKLAB PROGRAM DIRECTOR, DATA-INTENSIVE COMPUTING PROGRAM

2 Topics for today What is a blockchain? What are different types of blockchain? Blockchain node and network of nodes Ethereum stack ( You want to develop blockchain application): Here is where you start. Develop smart contract on web IDE Remix Plan your Lab1: Digital democracy – Digital balloting

3 Evolution of computing systems
Personal computing systems

4 Decentralized Systems
Let’s define decentralized systems. Is a type of distributed system. Then what is special about this system: it allows peer-to-peer transactions of digital assets among unknown participants. These participants operate beyond the boundaries of trust. Example: traditional trusted system: the university, you are all known participants. How did become known? Your credentials were verified and validated and you were admitted into the system. Participants can join and leave as they wish. Can you do that in an university system? You may but it is not common, or is not intended. Distributed system Decentralized System

5 What is a blockchain? What does it do?
Blockchain helps implement a decentralized system. Blockchain is a Distributed immutable ledger (record) Infrastructure for transactions  block blockchain (what and how it is recorded) Protocol for the network (rules for operation and recording) What does it accomplish with these? It implements a trust layer enabling peer-to-peer operation of participants Shifts trust intermediation from major organizations to software methods Addresses gaps and issues with existing distributed systems Smart contracts (SC) SC is executable code on blockchain Addition of SC in Ethereum made the blockchain more useful You can go beyond cryptocurrency transfer What worked for crypto should work for code?

6 Beyond Bitcoin Hundreds of different digital currencies have emerged since the advent of the Bitcoin. Significant innovations such as smart contract has opened up broader applications for the Blockchain technology. Private and permissioned Blockchain allow for controlled access to the Blockchain enabling many business models.

7 Classes of Blockchain With the addition of code execution comes the serious consideration about the public access to the Blockchain. Hence the classification of public, private and permissioned Blockchain based on access limits. We have been watching the Bitcoin Blockchain continuously operational since its inception; all supported by its “public” participants. Thus Bitcoin is a fantastic example of a “public” Blockchain class.

8 Types of Blockchain TYPE2 : Currency + Business logic
TYPE3 : Only Business Logic TYPE1: Only Cryptocurrency Smart contract Ethereum Virtual Machine (EVM) E.g. Bitcoin deals only with currency E.g. Hyperledger has only business logic. consortium of technology companies: Tools, services E.g. Ethereum has Ether coins Smart contract code execution framework

9 Public Blockchain Bitcoin Blockchain is a public Blockchain. Anybody can join and leave as they wish. Transactions, blocks and the Blockchain are publicly observable even though participants are anonymous. It is open source. You can create a new coin/digital currency by modifying the Bitcoin code. Wallet applications provide basic interface to transfer value through the Bitcoin Blockchain.

10 Private Blockchain Memebership is limited and fixed.
Access to the Blockchain is limited to only to selected participants. For example, within an organization. This restriction helps in simplifying the normal operations such as block creation and consensus model.

11 Permissioned Blockchain
Permissioned Blockchain is also called Consortium Blockchain. It is meant for a consortium of collaborating parties to transact on a Blockchain for ease of governance, provenance, accountability and may be autonomous operation using smart contract. For example, consortium of all automobile companies or healthcare organizations. It has the benefits of a public chain with allowing only users with “permission” collaborate and transact.

12 Ethereum blockchain We will work with Ethereum blockchain that introduced the concept of code execution on blockchain. It was designed around 2013 but became widely available in 2016. I started looking into it in 2016, seriously working on projects in 2017. Coursera courses were launched in 2017. Book blockchain in action in (ongoing project)

13 So you want to develop BC applications?
Lets do that. For any type of application development look at the stack. For web application -- web stack (LAMP, MEAN etc.) For enterprise application -- enterprise stack For mobile application -- mobile stack For BC application -- BC stack or Dapp stack Got the idea. This is enable you to gather the right team, technologies, and tools.

14 Bitcoin vs Ethereum Stack

15 Ethereum stack and node
Note: Today during lecture we will look at smart contract design.

16 A network of nodes

17 Lets solve a problem: simple counter
Problem statement: Counters are very versatile and useful device. It could be a part of a decentralized application. For example: population counter; birth and death entry. You cannot get any more decentralized than this. Step 1: Use case (Unified Modeling Language) diagram. Identify user and operations and supporting operations. Step 2: Using the use case and the problem statement as guidance, identify, user, digital assets and transactions. Step 3: Design the “contract” diagram (derivative of “class” diagram) Step 4: Implement the contract in a blockchain-specific language. In our case, we will use Solidity and Ethereum blockchain. Ethereum Metropolis—Constantinople to be exact. Step 5: Test it using a web-IDE call Remix.

18 Step 1: Use case diagram Use draw.io or starML or other
tools to creat a similar one for your lab1. Can you do it for your documentation?

19 Step 2: Identify user, assets and transactions
Users: Actors in any Dapp Digital or other assets: counter value (type depends on the value: if it is student score: 8-bit, it is world population 256-bit, yes BC works on a 256-bit integer processor.) Transactions: create, initialize (set), increment, decrement, get (to view)

20 Step 3: Obtain contract diagram

21 Step 4: Code it in Solidity
pragma solidity >= 4.0 <6.0; // imagine a big integer counter that the whole world could share contract Counter { uint storedData; function initialize (uint x) public { storedData = x; } function get() view public returns (uint) { return storedData; function increment (uint n) public { storedData = storedData + n; return; function decrement (uint n) public { storedData = storedData - n; } }

22 Step 5: Test it in Remix IDE (old version)

23 Summary We learned an approach to design, implement and test a smart contract. This is just a start. This is to show an approach that you can use for all your labs in this course and others. There are many more elements to this, we will add throughout the semester. This is the base: make sure it is 100% strong, no cracks: that is, you understand it well.

24 Lab 1 Theme : Digital democracy
Lets apply these concepts to Lab1. Lab 1: Digital democracy --representative democracy --direct democracy --deliberative democracy --Think about juries in court --stock holders voting on issues --For Information gathering -- Many blockchain have been build around this: Augur, Aragon, .. What others?


Download ppt "What is A blockchain? B. RAMAMURTHY ©2019, ALL RIGHTS RESERVED"

Similar presentations


Ads by Google