Presentation is loading. Please wait.

Presentation is loading. Please wait.

Swagatika (Jazz) Sarangi

Similar presentations


Presentation on theme: "Swagatika (Jazz) Sarangi"— Presentation transcript:

1 Swagatika (Jazz) Sarangi
Why Solidity is Solid – Basic of Ethereum, Smart Contracts, and Blockchain

2 Swagatika (Jazz) Sarangi
Where I am at: PASS Summit SQL Saturday(s) Oregon <–>Seattle <–> San Jose Swagatika (Jazz) Sarangi Sr. Business Systems Analyst, EPIQ /sarangiswagatika @gatorjazz12

3 Sponsors

4 Blockchain and Solidity
Don’t get intimidated by words like… Distributed Byzantine Fault Tolerance (NEO) Byzantine Fault Tolerance Proof of Work Smart Contract Proof of Stake Practical Byzantine Fault Tolerance (Tendermint) Hyperledger

5 Session Content: This session will include:
Real-time use cases that describes the demand for introducing Blockchain in a traditional data warehouse system that facilitates ‘data management’ (Starts at slide #6) Blockchain for off-chain and on-chain Data Governance (Starts at slide #9) A model that captures data on a “Point-to-Point” basis than in a centralized repository (Starts at slide #11) Basics of “Smart Contracts” and anything that is provided in the abstract under my session information section. [DEMO] (Starts at slide #12)

6 McKesson’s Blockchain Pilot 1:
Original ‘Drugs Supply Chain Securities Act’(DSCSA) Tx data Hosted in McKesson’s cloud network Global Tracking Identification Number(GTIN) is the Primary key Manufacturer On-prem data Product Identifier Information (PII) is the Primary key Distributor Original Purchase data Customers’ protected Master Data (‘ last 4 digits of SSN + Phone Number’ is the Primary key) Customer

7 2 Minimum Viable Product(s) from Pilot 1:
Locate original DSCSA transaction data, by reconciling customer’s PII data with GTIN. Distributor confirms that PII corresponds with Manufacturer’s assigned data. Distributor does it by querying GTIN on the DSCSA’s lookup directory.

8 McKesson’s Blockchain Pilot 2 – Unit Level Traceability:
Original ‘Drugs Supply Chain Securities Act’(DSCSA) Tx data Hosted in McKesson’s cloud network Global Tracking Identification Number(GTIN) is the P. key Manufacturer On-prem data Product Identifier Information (PII) is the P. key Distributor Original Purchase data Customers’ protected Master Data Customer

9 Governance – “Data Vs On-Chain/Off-Chain”

10 On-Chain and Off-Chain Governance:
In on-chain governance rules are hardcoded into the blockchain protocol. Off-chain governance can be seen as a decision-making that first takes place on a social level and is afterwards being actively encoded into the protocol by the developers. In On-chain governance system, all the approvals stays intact with the system history. In off-chain governance systems forks are currently used to erase undesirable on-chain actions of the past.  Higher enforcement, reduces transaction speed. Medium enforcement, increases transaction speed Byzantine Fault Tolerance (BFT) score is higher. Byzantine Fault Tolerance (BFT) score is comparatively lower.

11 DEMO Visual Blockchain Demo: You can access it here:

12 Interfacing with Ethereum Network:
In this demo, we will create a library on ‘Metamask’ (Ethereum client library). This library will allow us to send money, store data, deploy contracts etc. It is used by developers to create application. People who do not want to program but consume, there are 2 great solutions available in the market. Consumers/Front-end Users can use: Metamask – this is a browser extension that allows people to interact (You can install Metamask google chrome extension) Mist Browser – It is in an early phase.

13 What is MetaMask: MetaMask is an Ethereum browser and a wallet. MetaMask allows one to interact ‘Smart Contracts’ without downloading any blockchain software. By creating MetaMask account, you will create your own wallet, where you can deposit and send Ether to other people. Download it here:

14 What happened at Metamask:
Click ‘submit’ button at Rinkeby after pasting the token from personal website. -> Address sent to backend server -> Backend server used web3 library to create a ‘transaction’ object. Backend server waited for transaction to be confirmed -> Backend server sent success message back to the browser. Nonce = Transaction Time

15 DEMO Let’s create a Smart Contract…

16 Creating our first ‘Smart Contract’:
We created a ‘Contract’ or a ‘Class’. We then created a function with the same name as the ‘Class’. And that defines this function as a ‘Constructor function’ – these types of functions are automatically called whenever we deploy the contract. An instance of our ‘Inbox’ contract will automatically be created when we pass the parameter of the function.

17 Difference between ‘Metamask’ and ‘Smart Contract’ account:
Metamask Account Smart Contract Account Created at the front-end with a business user. Created at the back-end with a developer. Can be accessed across all networks, such as Ropsten, Koven or Rinkeby etc. Have to deploy the code individually across all networks for this account to be accessed. It is network specific. External account Internal account. Needs google chrome extension Does not need any UI extension. And can be created inside visual studio.

18 Bits and pieces of a Smart Contract:
nonce How many times the sender has sent a transaction To (This blank means we are creating a new contract. This blank field creates a new contract.) data Compiled bytecode of the contract value Amount of ‘Wei’ to send to the target audience gasPrice Amount of ‘Wei’ to send to the target address startGas/gasLimit Unit of gas that this transaction can consume v Cryptographic pieces of data that can be used to generate the senders account address. Generated from the sender’s private key. r s

19 How many times the sender has sent a transaction
Bits and pieces of a Metamask: nonce How many times the sender has sent a transaction to Address of the account this money is going to data Compiled bytecode of the contract value Amount of ‘Wei’ to send to the target audience gasPrice Amount of ‘Wei’ to send to the target address startGas/gasLimit Unit of gas that this transaction can consume v Cryptographic pieces of data that can be used to generate the senders account address. Generated from the sender’s private key. r s

20 How much Gas it would cost me to run operations on Ethereum network:

21 More ‘gas’ terms: gasPrice
Amount of Wei the sender is willing to pay per unit gas to get this transaction processed startGas/gasLimit Unit of gas that this transaction can consume NOTE: We also have to spend some amount of gas to ‘store the data on Blockchain’.

22 Requesting additional Free Ether:

23 References: Rinkeby-Faucet: Anders Blockchain: Solidity coding platform: Ethereum converter: Udemy course: Gas price: Mnemonic Code Converter: Get more Ether than what Rinkeby provides? - Faucet.rinkeby.io (Can request upto ether.)

24 Session Evaluation: Your feedbacks are precious to me…


Download ppt "Swagatika (Jazz) Sarangi"

Similar presentations


Ads by Google