SlideShare a Scribd company logo
1 of 77
Download to read offline
1
IBM Watson & Cloud Platform
Technical Service Professional
Yunho Maeng 맹윤호Blockchain : Hyperledger Fabric
블록체인을
활용하여 투명하게
구호기금 관리하기
2
Prerequisite for development environment
3
http://ibm.biz/1808busan
$ git clone https://github.com/yunho0130/global-citizen
Download repository
URL for hands-on
4
Setting development environment
For Windows User: Install VirtualBox (Recommended)
https://www.virtualbox.org/wiki/Downloads
5
Setting development environment
For Windows User: Install Ubuntu 16.04 server(Recommended)
http://releases.ubuntu.com/16.04/
6
NVM: Node Version Manager
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Install NVM
7
NVM: Node Version Manager
$ nvm install 8
Install Node v8
$ which node $ node -v
8
NVM: Node Version Manager
$ npm install -g composer-cli@0.19.5
Install Composer CLI
9
Overview : Hyperledger Fabric & IBM
10
Hyperledger Project
https://gerrit.hyperledger.org/r/#/admin/projects/
11
IBM Blockchain Platform
IBM Blockchain Platform (IBM, 2017)
12
Making blockchain real for business with over 400 engagements
Trade Finance Pre and Post Trade Complex Risk Coverage
Identity/ Know your customer (KYC) Unlisted Securities/ Private Equity Funds Loyalty Program
Medicated Health Data Exchange Fraud/ Compliance Registry Distributed Energy/ Carbon Credit
Supply Chain Food Safety Provenance/ Traceability
many more at www.ibm.biz/BlockRef
13
Hyperledger Members
Premier General
Associate
Source: https://www.hyperledger.org/members
Updated 15 November 2017
General
14
IBM Blockchain Platform : Why IBM?
IBM LinuxOne Architecture for Blockchain (IBM, 2018)
IBM® 솔루션은 하드웨어
에서부터 상위 계층까지
보안을 통합하여 블록체
인 네트워크를 무단 액세
스로부터 안전하게 보호
합니다.
15
Introduction Hyperledger Fabric
https://youtu.be/lD9KAnkZUjU
How it Works: Blockchain
16
Introduction Hyperledger Fabric
https://youtu.be/IgNfoQQ5Reg
IBM Blockchain Car Lease Demo
17
Private vs Public Blockchain
18
Public Blockchain vs Private Blockchain
https://remix.ethereum.org
Ethereum Solidity: Smart contract
19
Public Blockchain vs Private Blockchain
https://remix.ethereum.org
Ethereum Solidity: Smart contract
20
Public Blockchain vs Private Blockchain
https://etherscan.io/
Ethereum Solidity: Smart contract
21
Public Blockchain vs Private Blockchain
https://etherscan.io/tx/0xcf3da48fdbdffde2811c98c291f80957030f3e2520b38f2271c8b260ac886c38
Ethereum Solidity: Smart contract
22
Public Blockchain vs Private Blockchain
Hyperledger Fabric: Chaincode
- Access Control (.acl), Deploy Changes
http://composer-playground.mybluemix.net/
23
Public Blockchain vs Private Blockchain
Hyperledger Composer: Historian Record
24
Hyperledger Fabric ICO?
Utility Token vs Security Token
Utility Token Security Token
• There is no crypto currency in Hyperledger Fabric Project
• However, you can create utility token. (Not necessary)
25
Why Private Blockchain?
Only TPS(Transactions Per Second)?
DAG (Wikipedia, 2018)Ethereum Plasma Network (Buterin, 2017)
• There are too many projects to increase TPS on public blockchain.
• Ethererum Plasama Network, Sharding, DAG(Directed Acyclic Graph)
26
Why Private Blockchain?
Data Governance & Permission control
• How to run data business on public blockchain?
• How about GDPR? If some of your customers were European?
27
Off-chian : Why we have to consider off-chain model
28
Global Citizen :
Management of donation for philanthropy
29
IBM BaaS : Blockchain as a Service
2018-07-31 Update! Starter Plan support Hyperledger Fabric V1.1
(Formerly V0.6)
30
Create blockchain service via IBM Cloud
https://console.bluemix.net/developer/blockchain/dashboard
31
IBM BaaS : Blockchain as a Service
Starter Plan offer the $500 credit per account using BaaS
https://www.ibm.com/blogs/blockchain/2018/06/by-developers-for-developers-the-ibm-blockchain-platform-starter-plan/
32
IBM BaaS : Blockchain as a Service
Price plan (Monthly based)
33
Build Your First Network (BYFN) : Local
https://github.com/jgkong/BlockchainNetwork-CompositeJourney/blob/jgkong-korean/README-ko.md
If you have issue on IBM Cloud Account, try following tutorial
34
Global Citizen with IBM BaaS
https://github.com/yunho0130/global-citizen/blob/master/README-ko.md
35
Global Citizen with IBM BaaS
https://developer.ibm.com/kr/?post_type=pnext_journey&p=16191&preview=true
36
Global Citizen with IBM BaaS
https://developer.ibm.com/kr/?post_type=pnext_journey&p=16191&preview=true
Flow
37
Global Citizen: Composer model
38
Global Citizen: Composer REST API
39
Understanding Hyperledger Fabric
40
Hyperledger Fabric V1.1
Hyperledger Fabric protocol (Sousa, 2017)
41
Hyperledger Fabric V1.1
Hyperledger Fabric: Smartcontract (IBM, 2018)
42
Hyperledger Fabric V1.1
A Fabric network with federated MSPs and running multiple (Androulaki, 2018)
- gossip: 이벤트를 성공했는지
실패했는지를 체크할 수 있는
event listener와 같은 역할
- MSP: Membership Service
Provider
- Privacy through Channel:
네트워크간에도 참여자를
제한할 수 있는 채널 방식.
43
Hyperledger Fabric : Smart contract
44
Summary of a Hyperledger Fabric Block
- txPayload=<operation, metadata>: 작업operation에 대한 argument나 데이터.
45
Hyperledger Composer
https://hyperledger.github.io/composer/latest/introduction/introduction
46
How Composer Maps to Fabric Chaincode
– Each Business Network is deployed to its own chaincode container
– Container contains a static piece of Go chaincode that starts a Javascript virtual machine
running transaction processors
– Browse these containers to view diagnostic information (docker logs)
– Embedded chaincode is not a Composer external interface
Composer
Client
Fabric
Client
Composer
Chaincode
(Go)
Composer
Runtime (JS)
End-User
Code
(JS)
Fabric
Shim
(Go)
Duktape JS VM
Hyperledger Fabric Peer
Events
47
Technical Deep dive into Consensus
48
Sample transaction: Step 1/7 – Propose transaction
Application proposes transaction
Endorsement policy:
• “E0, E1 and E2 must sign”
• (P3, P4 are not part of the policy)
Client application submits a transaction
proposal for Smart Contract A. It must
target the required peers {E0, E1, E2}
E0
E1
E2
Client
Application
SDK
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
Key:
Hyperledger Fabric Network
Ordering-Service
O
O O
OP
P4P3
A
B
A
B
A
B
A
D
Endorse Order Validate
49
Sample transaction: Step 2/7 – Execute proposal
Endorsers Execute Proposals
E0, E1 & E2 will each execute the
proposed transaction. None of these
executions will update the ledger
Each execution will capture the set of
Read and Written data, called RW sets,
which will now flow in the fabric.
Transactions can be signed & encrypted
Key:
Hyperledger Fabric Network
Ordering-Service
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
O
O O
O
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Client
Application
SDK
Endorse Order Validate
50
Sample transaction: Step 3/7 – Proposal Response
Application receives responses
RW sets are asynchronously returned to
application
The RW sets are signed by each
endorser, and also includes each record
version number
(This information will be checked much
later in the consensus process)
Key:
Hyperledger Fabric Network
Ordering-Service
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
O
O O
O
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Client
Application
SDK
Endorse Order Validate
51
Sample transaction: Step 4/7 – Order Transaction
Responses submitted for ordering
Application submits responses as a
transaction to be ordered.
Ordering happens across the fabric in
parallel with transactions submitted by
other applications
(other applications)
Key:
Hyperledger Fabric Network
Ordering-Service
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
O
O O
O
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Client
Application
SDK
Endorse Order Validate
52
Sample transaction: Step 5/7 – Deliver Transaction
Hyperledger Fabric Network
Ordering-Service
Orderer delivers to committing peers
Ordering service collects transactions
into proposed blocks for distribution to
committing peers. Peers can deliver to
other peers in a hierarchy (not shown)
Different ordering algorithms available:
• SOLO (Single node, development)
• Kafka (Crash fault tolerance)
O
O O
O
*
Key:
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Client
Application
SDK
Endorse Order Validate
53
Sample transaction: Step 6/7 – Validate Transaction
Hyperledger Fabric Network
Ordering-Service
Committing peers validate transactions
Every committing peer validates against
the endorsement policy. Also check RW
sets are still valid for current world state
Validated transactions are applied to the
world state and retained on the ledger
Invalid transactions are also retained on
the ledger but do not update world state
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
Key:
O
O O
O
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Client
Application
SDK
* * *
*
*
Endorse Order Validate
54
Sample transaction: Step 7/7 – Notify Transaction
Client
Application SDK
Hyperledger Fabric Network
Ordering-Service
Committing peers notify applications
Applications can register to be notified
when transactions succeed or fail, and
when blocks are added to the ledger
Applications will be notified by each
peer to which they are connected!
!
!
!
! !
Key:
Endorser Ledger
Committing
Peer
Application
Ordering Node
Smart Contract
(Chaincode)
Endorsement
Policy
O
O O
O
E0
E1
E2
P
P4P3
A
B
A
B
A
B
A
D
Endorse Order Validate
55
Assets, Participants and Transactions
Vehicle Vehicle
Listing AuctioneerMember
Place Offer
Close Bidding
Transaction
Processors
56
The blockchain developer
Ledger
…
Blockchain
Developer
D
f(abc);
Smart
Contract
Blockchain developers’ primary interests are…
They should NOT have to care about operational concerns, such as:
Peers Consensus
…and how they interact with the ledger and other systems of record:
Systems
IntegrationEvents
!
Traditional
Data Sources
Traditional
Processing
Platforms
Application
X Security
- Developer: 비즈니스 로직과 어플리케이션 만드는 사람.
57
The blockchain operator
Blockchain
Operator
O
Blockchain operators’ primarily interests are in the deployment
and operation of part of the blockchain:
They should NOT have to care about development concerns, such as:
Application code Smart contract code
Peers Consensus
ü
Security
X
- Operator: 네트워크 자체를 운영하고 관리하는 사람.
58
Summary of Key Roles
Blockchain
Developer
D
Blockchain
Operator
O
Peers Consensus
ü
Security
Systems
IntegrationEvents
!
Ledger
…
Traditional Data
Sources
Traditional
Processing
Platforms
f(abc);
Smart
Contract
Application
Blockchain
Architect
A
Business
concerns
$
Design
Tradeoffs
59
Workflow (NSC -> BSC -> End User)
Network
Service
Consumer
End user
End-User
Identity
issues
Connection
profile
creates
refers toBusiness
Service
Consumer
Identity
issues
Business
Network
Card
(Connection profile +
Business Service
customizes and
deploys
Hyperledger Fabric
Peer
Chaincode container Ledger
…
Asset
Registry
Participant
Registry
Transaction
Registry
Identity
Registry
packages
Business
Network
Archive
Smart Contract Logic
Business
Service
Consumer
connects
hosts
Business Logic
REST
Interface
Business App
Integration
Logic
60
Hyperledger Fabric v1.2 and next version
61
New! Hyperledger Fabric v1.2
•Private Data Collections: A way to
keep certain data/transactions
confidential among a subset of
channel members. We also have an
architecture document on this topic
which can be found here.
•Service Discovery: Discover network
services dynamically, including
orderers, peers, chaincode, and
endorsement policies, to simplify
client applications.
•Access control: How to configure
which client identities can interact
with peer functions on a per channel
basis.
•Pluggable endorsement and
validation: Utilize pluggable
endorsement and validation logic per
chaincode.
https://hyperledger-fabric.readthedocs.io/en/release-1.2/whatsnew.html
62
Consensus Mechanism
Hyperledger Fabric Next version?: RAFT
State transition of participant peers (Ha, 2017)Official document of Hyperledger fabric v1.2 (Hyperledger
Foundation, 2018)
63
Consensus Mechanism
Summary of the single-decree Paxos consensus
protocol(Ongaro, 2014)
Paxos Algorithm : To understand the RAFT
Common patterns for using a single replicated state
machine(Ongaro, 2014)
64
Consensus Mechanism
Process for dynamic configuration of participant peers (Ha, 2017)
Hyperledger Fabric Next version?: RAFT
65
Consensus Mechanism
RAFT Algorithm Summary (Ongaro, 2014)
Hyperledger Fabric Next version?: RAFT
66
Consensus Mechanism
RAFT Algorithm Summary (Ongaro, 2014)
67
Save the world with your code!
Make your idea into reality
68
Writing whitepaper & Making actual product! Right Now
You don’t need to wait the main net launching or don’t lose your way to build DApp!
You can use your familiar language with SDK!
Chaincode (smart contracts) in Go or Node.js, Java,
SDKs in Node.js, Java, Go, REST and Python(Hyperledger
wiki,2018).
69
Blockchain Use-Case Template
Description of the Business Problem: 비즈니스 문제
List of Participants / Roles: 참가자 리스트와 역할 Description of Transactions: 트랜잭션에 대해 기술
Blockchain MVP Use Case Description: 최소기능제품MVP의 사용 예시
Types of Assets and Description: 자산의 유형
70
Writing whitepaper & Making actual product! Right Now
http://composer-playground.mybluemix.net/login?ref=web-%24default#deploy
Group Name / DOC ID / Month XX, 2018 / © 2018 IBM Corporation 71
72
Register Call for code
73
Register Call for code
74
IBM Blockchain Foundation Developer Badge
https://www.coursera.org/learn/ibm-blockchain-essentials-for-developers
https://www.youracclaim.com/user/yunho-maeng
75
Awesome Blockchain Kor : More examples
https://github.com/yunho0130/awesome-blockchain-kor
76
References
1. Androulaki, E., Barger, A., Bortnikov, V., Cachin, C., Christidis, K., De Caro, A., ... & Muralidharan, S. (2018, April). Hyperledger fabric: a distributed
operating system for permissioned blockchains. In Proceedings of the Thirteenth EuroSys Conference (p. 30). ACM.
2. Hyperledger Foundation(2017) Fabric official release note v1.1 : Architecture Explained, https://hyperledger-fabric.readthedocs.io/en/release-1.1/arch-
deep-dive.html
3. Hyperledger wiki (2018) Hyperledger Fabric: Key Characteristics, https://wiki.hyperledger.org/projects/Fabric
4. Ongaro, D. (2014). Consensus: Bridging theory and practice (Doctoral dissertation, Stanford University). https://purl.stanford.edu/qr033xr6097
5. Poon, J., & Buterin, V. (2017). Plasma: Scalable autonomous smart contracts. White paper.
6. Sousa, J., Bessani, A., & Vukolić, M. (2017). A byzantine fault-tolerant ordering service for the hyperledger fabric blockchain platform. arXiv preprint
arXiv:1709.06921.
7. Yeoun-Ui Ha, Jae-Hwan Jin, & Myung-Joon Lee. (2017). Raft-D: A Consensus Algorithm for Dynamic Configuration of Participant Peers. Asia-pacific
Journal of Multimedia Services Convergent with Art, Vol 7, 267-277, http://www.sersc.org/journals/AJMAHS/vol7_no2_2017/27.pdf
8. IBM (2017.11) IBM 블록체인 플랫폼 기술개요 (Kr-whitepaper-external), https://www-01.ibm.com/common/ssi/cgi-
bin/ssialias?htmlfid=00013800KRKO
9. IBM (2018.02) 블록체인-IBM Systems 관점에서 본 효용 가치와 실행 시스템, https://www-01.ibm.com/common/ssi/cgi-
bin/ssialias?htmlfid=LUS12348KRKO
10. IBM (2018) LinuxONE 블록체인 보안 인포그래픽, https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?htmlfid=LU912346KRKO
11. IBM(2018), SPRI FORUM: 하이퍼레저 패브릭 구조 및 주요 구축사례
77
IBM Watson & Cloud Platform
Technical Service Professional
Yunho Maeng 맹윤호
yunhomaeng@kr.ibm.com
Blockchain : Hyperledger Fabric
Q & A

More Related Content

What's hot

가상화 기술과 컨테이너 기술의 차이점과 기대 효과
가상화 기술과 컨테이너 기술의 차이점과 기대 효과가상화 기술과 컨테이너 기술의 차이점과 기대 효과
가상화 기술과 컨테이너 기술의 차이점과 기대 효과
Opennaru, inc.
 

What's hot (20)

Event source 학습 내용 공유
Event source 학습 내용 공유Event source 학습 내용 공유
Event source 학습 내용 공유
 
1909 Hyperledger Besu(a.k.a pantheon) Overview
1909 Hyperledger Besu(a.k.a pantheon) Overview1909 Hyperledger Besu(a.k.a pantheon) Overview
1909 Hyperledger Besu(a.k.a pantheon) Overview
 
HyperLedger Fabric V2.5.pdf
HyperLedger Fabric V2.5.pdfHyperLedger Fabric V2.5.pdf
HyperLedger Fabric V2.5.pdf
 
From Zero to Docker
From Zero to DockerFrom Zero to Docker
From Zero to Docker
 
무정지&무점검 서버 개발과 운영 사례
무정지&무점검 서버 개발과 운영 사례무정지&무점검 서버 개발과 운영 사례
무정지&무점검 서버 개발과 운영 사례
 
[NDC2017 : 박준철] Python 게임 서버 안녕하십니까 - 몬스터 슈퍼리그 게임 서버
[NDC2017 : 박준철] Python 게임 서버 안녕하십니까 - 몬스터 슈퍼리그 게임 서버[NDC2017 : 박준철] Python 게임 서버 안녕하십니까 - 몬스터 슈퍼리그 게임 서버
[NDC2017 : 박준철] Python 게임 서버 안녕하십니까 - 몬스터 슈퍼리그 게임 서버
 
Docker + Kubernetes를 이용한 빌드 서버 가상화 사례
Docker + Kubernetes를 이용한 빌드 서버 가상화 사례Docker + Kubernetes를 이용한 빌드 서버 가상화 사례
Docker + Kubernetes를 이용한 빌드 서버 가상화 사례
 
Understanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger TechnologyUnderstanding Blockchain: Distributed Ledger Technology
Understanding Blockchain: Distributed Ledger Technology
 
Hyperledger fabric 20180528
Hyperledger fabric 20180528Hyperledger fabric 20180528
Hyperledger fabric 20180528
 
JSON Web Tokens
JSON Web TokensJSON Web Tokens
JSON Web Tokens
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
 
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
 
Getting started with quorum -101
Getting started with quorum -101  Getting started with quorum -101
Getting started with quorum -101
 
Open infradays 2019_msa_k8s
Open infradays 2019_msa_k8sOpen infradays 2019_msa_k8s
Open infradays 2019_msa_k8s
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기
 
Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계Spring integration을 통해_살펴본_메시징_세계
Spring integration을 통해_살펴본_메시징_세계
 
Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - Clavent
 
빠르게훓어보는 Node.js와 Vert.x
빠르게훓어보는 Node.js와 Vert.x빠르게훓어보는 Node.js와 Vert.x
빠르게훓어보는 Node.js와 Vert.x
 
Getting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureGetting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: Azure
 
가상화 기술과 컨테이너 기술의 차이점과 기대 효과
가상화 기술과 컨테이너 기술의 차이점과 기대 효과가상화 기술과 컨테이너 기술의 차이점과 기대 효과
가상화 기술과 컨테이너 기술의 차이점과 기대 효과
 

Similar to [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발

Similar to [Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발 (20)

Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
Hyperledger Fabric and Tools
Hyperledger Fabric and ToolsHyperledger Fabric and Tools
Hyperledger Fabric and Tools
 
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
Dejan Podgorsek - Is Hyperledger Fabric secure enough for your Business?
 
Hyperledger
HyperledgerHyperledger
Hyperledger
 
Hyperledger community update February 2018
Hyperledger  community update   February 2018Hyperledger  community update   February 2018
Hyperledger community update February 2018
 
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
 
Hyperledger Composer architecture
Hyperledger Composer architectureHyperledger Composer architecture
Hyperledger Composer architecture
 
BlockchainLAB Hackathon
BlockchainLAB HackathonBlockchainLAB Hackathon
BlockchainLAB Hackathon
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Hyperledger community update 201805
Hyperledger community update 201805Hyperledger community update 201805
Hyperledger community update 201805
 
Quant Overledger for Mobility, IOT and Automotive sectors - MOBI 20190220 v1
Quant Overledger for Mobility, IOT and Automotive sectors - MOBI 20190220 v1Quant Overledger for Mobility, IOT and Automotive sectors - MOBI 20190220 v1
Quant Overledger for Mobility, IOT and Automotive sectors - MOBI 20190220 v1
 
Bezant platform_20181212
Bezant platform_20181212Bezant platform_20181212
Bezant platform_20181212
 
Iot in-production
Iot in-productionIot in-production
Iot in-production
 
Hyperledger Fabric & Composer
Hyperledger Fabric & Composer Hyperledger Fabric & Composer
Hyperledger Fabric & Composer
 
Wwc developing hyperledger applications v4
Wwc  developing hyperledger applications v4Wwc  developing hyperledger applications v4
Wwc developing hyperledger applications v4
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDK
 
IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1IBM presents: Hyperledger Fabric Hands On Workshop - part 1
IBM presents: Hyperledger Fabric Hands On Workshop - part 1
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

[Call for code] IBM 블록체인을 활용하여 투명하게 구호기금 관리하기 - Hyperledger Fabric v1.1 by 맹개발

  • 1. 1 IBM Watson & Cloud Platform Technical Service Professional Yunho Maeng 맹윤호Blockchain : Hyperledger Fabric 블록체인을 활용하여 투명하게 구호기금 관리하기
  • 3. 3 http://ibm.biz/1808busan $ git clone https://github.com/yunho0130/global-citizen Download repository URL for hands-on
  • 4. 4 Setting development environment For Windows User: Install VirtualBox (Recommended) https://www.virtualbox.org/wiki/Downloads
  • 5. 5 Setting development environment For Windows User: Install Ubuntu 16.04 server(Recommended) http://releases.ubuntu.com/16.04/
  • 6. 6 NVM: Node Version Manager $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash Install NVM
  • 7. 7 NVM: Node Version Manager $ nvm install 8 Install Node v8 $ which node $ node -v
  • 8. 8 NVM: Node Version Manager $ npm install -g composer-cli@0.19.5 Install Composer CLI
  • 11. 11 IBM Blockchain Platform IBM Blockchain Platform (IBM, 2017)
  • 12. 12 Making blockchain real for business with over 400 engagements Trade Finance Pre and Post Trade Complex Risk Coverage Identity/ Know your customer (KYC) Unlisted Securities/ Private Equity Funds Loyalty Program Medicated Health Data Exchange Fraud/ Compliance Registry Distributed Energy/ Carbon Credit Supply Chain Food Safety Provenance/ Traceability many more at www.ibm.biz/BlockRef
  • 13. 13 Hyperledger Members Premier General Associate Source: https://www.hyperledger.org/members Updated 15 November 2017 General
  • 14. 14 IBM Blockchain Platform : Why IBM? IBM LinuxOne Architecture for Blockchain (IBM, 2018) IBM® 솔루션은 하드웨어 에서부터 상위 계층까지 보안을 통합하여 블록체 인 네트워크를 무단 액세 스로부터 안전하게 보호 합니다.
  • 17. 17 Private vs Public Blockchain
  • 18. 18 Public Blockchain vs Private Blockchain https://remix.ethereum.org Ethereum Solidity: Smart contract
  • 19. 19 Public Blockchain vs Private Blockchain https://remix.ethereum.org Ethereum Solidity: Smart contract
  • 20. 20 Public Blockchain vs Private Blockchain https://etherscan.io/ Ethereum Solidity: Smart contract
  • 21. 21 Public Blockchain vs Private Blockchain https://etherscan.io/tx/0xcf3da48fdbdffde2811c98c291f80957030f3e2520b38f2271c8b260ac886c38 Ethereum Solidity: Smart contract
  • 22. 22 Public Blockchain vs Private Blockchain Hyperledger Fabric: Chaincode - Access Control (.acl), Deploy Changes http://composer-playground.mybluemix.net/
  • 23. 23 Public Blockchain vs Private Blockchain Hyperledger Composer: Historian Record
  • 24. 24 Hyperledger Fabric ICO? Utility Token vs Security Token Utility Token Security Token • There is no crypto currency in Hyperledger Fabric Project • However, you can create utility token. (Not necessary)
  • 25. 25 Why Private Blockchain? Only TPS(Transactions Per Second)? DAG (Wikipedia, 2018)Ethereum Plasma Network (Buterin, 2017) • There are too many projects to increase TPS on public blockchain. • Ethererum Plasama Network, Sharding, DAG(Directed Acyclic Graph)
  • 26. 26 Why Private Blockchain? Data Governance & Permission control • How to run data business on public blockchain? • How about GDPR? If some of your customers were European?
  • 27. 27 Off-chian : Why we have to consider off-chain model
  • 28. 28 Global Citizen : Management of donation for philanthropy
  • 29. 29 IBM BaaS : Blockchain as a Service 2018-07-31 Update! Starter Plan support Hyperledger Fabric V1.1 (Formerly V0.6)
  • 30. 30 Create blockchain service via IBM Cloud https://console.bluemix.net/developer/blockchain/dashboard
  • 31. 31 IBM BaaS : Blockchain as a Service Starter Plan offer the $500 credit per account using BaaS https://www.ibm.com/blogs/blockchain/2018/06/by-developers-for-developers-the-ibm-blockchain-platform-starter-plan/
  • 32. 32 IBM BaaS : Blockchain as a Service Price plan (Monthly based)
  • 33. 33 Build Your First Network (BYFN) : Local https://github.com/jgkong/BlockchainNetwork-CompositeJourney/blob/jgkong-korean/README-ko.md If you have issue on IBM Cloud Account, try following tutorial
  • 34. 34 Global Citizen with IBM BaaS https://github.com/yunho0130/global-citizen/blob/master/README-ko.md
  • 35. 35 Global Citizen with IBM BaaS https://developer.ibm.com/kr/?post_type=pnext_journey&p=16191&preview=true
  • 36. 36 Global Citizen with IBM BaaS https://developer.ibm.com/kr/?post_type=pnext_journey&p=16191&preview=true Flow
  • 40. 40 Hyperledger Fabric V1.1 Hyperledger Fabric protocol (Sousa, 2017)
  • 41. 41 Hyperledger Fabric V1.1 Hyperledger Fabric: Smartcontract (IBM, 2018)
  • 42. 42 Hyperledger Fabric V1.1 A Fabric network with federated MSPs and running multiple (Androulaki, 2018) - gossip: 이벤트를 성공했는지 실패했는지를 체크할 수 있는 event listener와 같은 역할 - MSP: Membership Service Provider - Privacy through Channel: 네트워크간에도 참여자를 제한할 수 있는 채널 방식.
  • 43. 43 Hyperledger Fabric : Smart contract
  • 44. 44 Summary of a Hyperledger Fabric Block - txPayload=<operation, metadata>: 작업operation에 대한 argument나 데이터.
  • 46. 46 How Composer Maps to Fabric Chaincode – Each Business Network is deployed to its own chaincode container – Container contains a static piece of Go chaincode that starts a Javascript virtual machine running transaction processors – Browse these containers to view diagnostic information (docker logs) – Embedded chaincode is not a Composer external interface Composer Client Fabric Client Composer Chaincode (Go) Composer Runtime (JS) End-User Code (JS) Fabric Shim (Go) Duktape JS VM Hyperledger Fabric Peer Events
  • 47. 47 Technical Deep dive into Consensus
  • 48. 48 Sample transaction: Step 1/7 – Propose transaction Application proposes transaction Endorsement policy: • “E0, E1 and E2 must sign” • (P3, P4 are not part of the policy) Client application submits a transaction proposal for Smart Contract A. It must target the required peers {E0, E1, E2} E0 E1 E2 Client Application SDK Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy Key: Hyperledger Fabric Network Ordering-Service O O O OP P4P3 A B A B A B A D Endorse Order Validate
  • 49. 49 Sample transaction: Step 2/7 – Execute proposal Endorsers Execute Proposals E0, E1 & E2 will each execute the proposed transaction. None of these executions will update the ledger Each execution will capture the set of Read and Written data, called RW sets, which will now flow in the fabric. Transactions can be signed & encrypted Key: Hyperledger Fabric Network Ordering-Service Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy O O O O E0 E1 E2 P P4P3 A B A B A B A D Client Application SDK Endorse Order Validate
  • 50. 50 Sample transaction: Step 3/7 – Proposal Response Application receives responses RW sets are asynchronously returned to application The RW sets are signed by each endorser, and also includes each record version number (This information will be checked much later in the consensus process) Key: Hyperledger Fabric Network Ordering-Service Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy O O O O E0 E1 E2 P P4P3 A B A B A B A D Client Application SDK Endorse Order Validate
  • 51. 51 Sample transaction: Step 4/7 – Order Transaction Responses submitted for ordering Application submits responses as a transaction to be ordered. Ordering happens across the fabric in parallel with transactions submitted by other applications (other applications) Key: Hyperledger Fabric Network Ordering-Service Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy O O O O E0 E1 E2 P P4P3 A B A B A B A D Client Application SDK Endorse Order Validate
  • 52. 52 Sample transaction: Step 5/7 – Deliver Transaction Hyperledger Fabric Network Ordering-Service Orderer delivers to committing peers Ordering service collects transactions into proposed blocks for distribution to committing peers. Peers can deliver to other peers in a hierarchy (not shown) Different ordering algorithms available: • SOLO (Single node, development) • Kafka (Crash fault tolerance) O O O O * Key: Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy E0 E1 E2 P P4P3 A B A B A B A D Client Application SDK Endorse Order Validate
  • 53. 53 Sample transaction: Step 6/7 – Validate Transaction Hyperledger Fabric Network Ordering-Service Committing peers validate transactions Every committing peer validates against the endorsement policy. Also check RW sets are still valid for current world state Validated transactions are applied to the world state and retained on the ledger Invalid transactions are also retained on the ledger but do not update world state Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy Key: O O O O E0 E1 E2 P P4P3 A B A B A B A D Client Application SDK * * * * * Endorse Order Validate
  • 54. 54 Sample transaction: Step 7/7 – Notify Transaction Client Application SDK Hyperledger Fabric Network Ordering-Service Committing peers notify applications Applications can register to be notified when transactions succeed or fail, and when blocks are added to the ledger Applications will be notified by each peer to which they are connected! ! ! ! ! ! Key: Endorser Ledger Committing Peer Application Ordering Node Smart Contract (Chaincode) Endorsement Policy O O O O E0 E1 E2 P P4P3 A B A B A B A D Endorse Order Validate
  • 55. 55 Assets, Participants and Transactions Vehicle Vehicle Listing AuctioneerMember Place Offer Close Bidding Transaction Processors
  • 56. 56 The blockchain developer Ledger … Blockchain Developer D f(abc); Smart Contract Blockchain developers’ primary interests are… They should NOT have to care about operational concerns, such as: Peers Consensus …and how they interact with the ledger and other systems of record: Systems IntegrationEvents ! Traditional Data Sources Traditional Processing Platforms Application X Security - Developer: 비즈니스 로직과 어플리케이션 만드는 사람.
  • 57. 57 The blockchain operator Blockchain Operator O Blockchain operators’ primarily interests are in the deployment and operation of part of the blockchain: They should NOT have to care about development concerns, such as: Application code Smart contract code Peers Consensus ü Security X - Operator: 네트워크 자체를 운영하고 관리하는 사람.
  • 58. 58 Summary of Key Roles Blockchain Developer D Blockchain Operator O Peers Consensus ü Security Systems IntegrationEvents ! Ledger … Traditional Data Sources Traditional Processing Platforms f(abc); Smart Contract Application Blockchain Architect A Business concerns $ Design Tradeoffs
  • 59. 59 Workflow (NSC -> BSC -> End User) Network Service Consumer End user End-User Identity issues Connection profile creates refers toBusiness Service Consumer Identity issues Business Network Card (Connection profile + Business Service customizes and deploys Hyperledger Fabric Peer Chaincode container Ledger … Asset Registry Participant Registry Transaction Registry Identity Registry packages Business Network Archive Smart Contract Logic Business Service Consumer connects hosts Business Logic REST Interface Business App Integration Logic
  • 60. 60 Hyperledger Fabric v1.2 and next version
  • 61. 61 New! Hyperledger Fabric v1.2 •Private Data Collections: A way to keep certain data/transactions confidential among a subset of channel members. We also have an architecture document on this topic which can be found here. •Service Discovery: Discover network services dynamically, including orderers, peers, chaincode, and endorsement policies, to simplify client applications. •Access control: How to configure which client identities can interact with peer functions on a per channel basis. •Pluggable endorsement and validation: Utilize pluggable endorsement and validation logic per chaincode. https://hyperledger-fabric.readthedocs.io/en/release-1.2/whatsnew.html
  • 62. 62 Consensus Mechanism Hyperledger Fabric Next version?: RAFT State transition of participant peers (Ha, 2017)Official document of Hyperledger fabric v1.2 (Hyperledger Foundation, 2018)
  • 63. 63 Consensus Mechanism Summary of the single-decree Paxos consensus protocol(Ongaro, 2014) Paxos Algorithm : To understand the RAFT Common patterns for using a single replicated state machine(Ongaro, 2014)
  • 64. 64 Consensus Mechanism Process for dynamic configuration of participant peers (Ha, 2017) Hyperledger Fabric Next version?: RAFT
  • 65. 65 Consensus Mechanism RAFT Algorithm Summary (Ongaro, 2014) Hyperledger Fabric Next version?: RAFT
  • 66. 66 Consensus Mechanism RAFT Algorithm Summary (Ongaro, 2014)
  • 67. 67 Save the world with your code! Make your idea into reality
  • 68. 68 Writing whitepaper & Making actual product! Right Now You don’t need to wait the main net launching or don’t lose your way to build DApp! You can use your familiar language with SDK! Chaincode (smart contracts) in Go or Node.js, Java, SDKs in Node.js, Java, Go, REST and Python(Hyperledger wiki,2018).
  • 69. 69 Blockchain Use-Case Template Description of the Business Problem: 비즈니스 문제 List of Participants / Roles: 참가자 리스트와 역할 Description of Transactions: 트랜잭션에 대해 기술 Blockchain MVP Use Case Description: 최소기능제품MVP의 사용 예시 Types of Assets and Description: 자산의 유형
  • 70. 70 Writing whitepaper & Making actual product! Right Now http://composer-playground.mybluemix.net/login?ref=web-%24default#deploy
  • 71. Group Name / DOC ID / Month XX, 2018 / © 2018 IBM Corporation 71
  • 74. 74 IBM Blockchain Foundation Developer Badge https://www.coursera.org/learn/ibm-blockchain-essentials-for-developers https://www.youracclaim.com/user/yunho-maeng
  • 75. 75 Awesome Blockchain Kor : More examples https://github.com/yunho0130/awesome-blockchain-kor
  • 76. 76 References 1. Androulaki, E., Barger, A., Bortnikov, V., Cachin, C., Christidis, K., De Caro, A., ... & Muralidharan, S. (2018, April). Hyperledger fabric: a distributed operating system for permissioned blockchains. In Proceedings of the Thirteenth EuroSys Conference (p. 30). ACM. 2. Hyperledger Foundation(2017) Fabric official release note v1.1 : Architecture Explained, https://hyperledger-fabric.readthedocs.io/en/release-1.1/arch- deep-dive.html 3. Hyperledger wiki (2018) Hyperledger Fabric: Key Characteristics, https://wiki.hyperledger.org/projects/Fabric 4. Ongaro, D. (2014). Consensus: Bridging theory and practice (Doctoral dissertation, Stanford University). https://purl.stanford.edu/qr033xr6097 5. Poon, J., & Buterin, V. (2017). Plasma: Scalable autonomous smart contracts. White paper. 6. Sousa, J., Bessani, A., & Vukolić, M. (2017). A byzantine fault-tolerant ordering service for the hyperledger fabric blockchain platform. arXiv preprint arXiv:1709.06921. 7. Yeoun-Ui Ha, Jae-Hwan Jin, & Myung-Joon Lee. (2017). Raft-D: A Consensus Algorithm for Dynamic Configuration of Participant Peers. Asia-pacific Journal of Multimedia Services Convergent with Art, Vol 7, 267-277, http://www.sersc.org/journals/AJMAHS/vol7_no2_2017/27.pdf 8. IBM (2017.11) IBM 블록체인 플랫폼 기술개요 (Kr-whitepaper-external), https://www-01.ibm.com/common/ssi/cgi- bin/ssialias?htmlfid=00013800KRKO 9. IBM (2018.02) 블록체인-IBM Systems 관점에서 본 효용 가치와 실행 시스템, https://www-01.ibm.com/common/ssi/cgi- bin/ssialias?htmlfid=LUS12348KRKO 10. IBM (2018) LinuxONE 블록체인 보안 인포그래픽, https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?htmlfid=LU912346KRKO 11. IBM(2018), SPRI FORUM: 하이퍼레저 패브릭 구조 및 주요 구축사례
  • 77. 77 IBM Watson & Cloud Platform Technical Service Professional Yunho Maeng 맹윤호 yunhomaeng@kr.ibm.com Blockchain : Hyperledger Fabric Q & A