Introduction to Blockchain and the Hyperledger Project
-
Upload
manuel-garcia -
Category
Internet
-
view
3.619 -
download
1
Transcript of Introduction to Blockchain and the Hyperledger Project
![Page 1: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/1.jpg)
@rmgarciap
Manuel GarciaDirector of Operations @ Altoros
#HyperledgerArg
![Page 2: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/2.jpg)
@rmgarciap
Agenda
❏ Blockchain
❏ Brief History & Intro❏ Key Conpects❏ When?❏ Use cases
❏ Hyperledger Project
❏ What? Why?❏ Introduction❏ Current status❏ Architecture❏ Demo?
![Page 3: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/3.jpg)
@rmgarciap
Cheating?Lazy?
Kind of..
https://goo.gl/euIaVd
Awesome video(till 3’)
![Page 4: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/4.jpg)
@rmgarciap
Key Concepts1. Bye bye Trusted Third Parties2. Fully distributed unique “public” ledger3. Transactions mathematically verified and persisted (time-stamped)4. Consensus
Shared single source of truth
![Page 5: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/5.jpg)
@rmgarciap
● Peer-to-Peer distributed ledger● Robust● Multi purpose● Open by design● Permissioned● Transactional
Blockchain
An operating system for interactions
![Page 6: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/6.jpg)
@rmgarciap
Blockchain - Interaction
When you want public records of something that happened at some
point in time that is verifiable and not in the control of any one entity
![Page 7: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/7.jpg)
@rmgarciap
Blockchain - Game changer
![Page 8: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/8.jpg)
@rmgarciap
Blockchain - Use Cases
● Of course: cryptocurrency● Proof of ownership (physical and digital assets)● Smart Contracts● Financial transactions● Certificates● Proof of authenticity, existance● Decentralized patient records● Voting
![Page 9: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/9.jpg)
@rmgarciap
Just a few
startups
![Page 10: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/10.jpg)
@rmgarciap
![Page 11: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/11.jpg)
@rmgarciap
"As with any early-stage, highly-complex technology that demonstrates the ability to change the way we live our lives and conduct business, blockchain demands a cross-industry, open source collaboration to advance the technology for all."
— Jim Zemlin, Executive Director, Linux Foundation
Why Hyperledger?
![Page 12: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/12.jpg)
@rmgarciap
![Page 13: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/13.jpg)
@rmgarciap
Why Hyperledger?
● Apache License 2.0● Increasing demand for permissioned blockchain● Some users/use cases require validating or non-validating nodes to be
controlled or sometimes just sponsored by select whitelisted organizations● Many network operators want transactors on network to obtain an identity
from an issuing authority service on the network● Need for private networks, as well as public networks.● Performance / Scalability ● World of many networks… performance & scalability
![Page 14: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/14.jpg)
@rmgarciap
![Page 15: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/15.jpg)
@rmgarciap
MembershipIdentity, privacy and auditability of
blockchain participants
Blockchain | TransactionsDistributed transaction ledger
whereby the ledger is updated by
consensus (pluggable?)
Chain-Code“Smart Contracts”, provide ability to
run business logic against the
blockchain
API, SDKs, CLIsGives us the ability to
programmatically control the
blockchain network
![Page 16: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/16.jpg)
@rmgarciap
What is chaincode?
Chaincode is a piece of code that lets you interact with a network's shared ledger. Whenever you 'invoke' a transaction on the network, you are effectively calling a function in a piece of chaincode that reads and writes values to the ledger.
![Page 17: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/17.jpg)
@rmgarciap
Hyperledger: Architecture
![Page 18: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/18.jpg)
@rmgarciap
Permissioned - Multi peer
![Page 19: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/19.jpg)
@rmgarciap
6 Proposed Code Contributions
● IBM: Go
● Digital Assets: Java
● Blockstream: C++
● Ripple:C++
● JP Morgan: Haskel
● Intel: Python
![Page 20: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/20.jpg)
@rmgarciap
Hyperledger - Current Status
![Page 21: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/21.jpg)
@rmgarciap
Time for a Demo?
![Page 22: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/22.jpg)
@rmgarciap
Fast Demo: PaaS
http://www.ibm.com/blockchain/for_developers.html
1. https://github.com/ibm-blockchain/marbles
2.
3. http://manu-marbles-demo.mybluemix.net
4. https://obc-service-broker-prod.mybluemix.
net/v2/monitor
![Page 23: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/23.jpg)
@rmgarciap
Marbles App
![Page 24: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/24.jpg)
@rmgarciap
Hard Demo: local1. Setting up the development environment
https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devenv.md
2. 3 Hyperledger peers 3. Deploy distributed app4. Deploy the “chain-code”5. Execute a few transactions
![Page 25: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/25.jpg)
@rmgarciap
2525
VP 0VM
$vagrant ssh$ ip add | grep docker3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default inet 172.17.0.1/16 scope global docker0$ docker run --rm -it hyperledger-peer # export OPENCHAIN_VM_ENDPOINT=http://172.17.0.1:4243# export OPENCHAIN_PEER_ID=vp0# export OPENCHAIN_PEER_ADDRESSAUTODETECT=true# ./peer peer
![Page 26: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/26.jpg)
@rmgarciap
2626
VP 0VM
VP 1VM
vagrant sshdocker run --rm -it hyperledger-peer export OPENCHAIN_PEER_ID=vp1export OPENCHAIN_PEER_ADDRESSAUTODETECT=trueexport OPENCHAIN_PEER_DISCOVERY_ROOTNODE=172.17.0.2:30303 ./peer peer
![Page 27: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/27.jpg)
@rmgarciap
2727
1. VP1 sends DISC_HELLO message to its root discovery node (VP0)2. VP0 replies with DISC_HELLO3. Nodes start “chatting”
a. Periodically sending DISC_GET_PEERS (asks to share active connections)b. Each node should reply with DISC_PEERS (list of connections)
4. After node receives new connections it starts chatting with them
![Page 28: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/28.jpg)
@rmgarciap
2828
VP 0VM
VP 2VM
APP
VP 1VM
CLI
Chaincode
![Page 29: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/29.jpg)
@rmgarciap
2929
vagrant sshcd $GOPATH/src/github.com/hyperledger/fabric/peerCORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'
Will return ChainCode_ID to be used in further steps
![Page 30: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/30.jpg)
@rmgarciap
3030
VP 1VM
APP
VP 3VM
APP
VP 2VM
APP
CLI
App source
![Page 31: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/31.jpg)
@rmgarciap
3131
cd $GOPATH/src/github.com/hyperledger/fabric/peerCORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode invoke -n ChainCode_ID -c '{"Function": "invoke", "Args": ["a", "b", "10"]}'
CORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode query -l golang -n ChainCode_ID -c '{"Function": "query", "Args": ["a"]}'
![Page 32: Introduction to Blockchain and the Hyperledger Project](https://reader031.fdocuments.net/reader031/viewer/2022022412/58f9b326760da3da068bd2f0/html5/thumbnails/32.jpg)
@rmgarciap
Hyperledger: Roadmap