SlideShare a Scribd company logo
1 of 22
Hyperledger Fabric – v2.0
Alpha
FabToken Overview & Hands-On
Lab
Hyperledger Korea User Group
2
엔터프라이즈 블록체인 - Token
3
• R3 Corda – Tokens SDK
• JP Morgan Quorum – JPM Coin
- https://www.jpmorgan.com/global/news/digital-coin-payments
• Hyperledger Fabric v2 – FabToken
- Token Management Enablement in Hyperledger Fabric
 http://bit.ly/2KvVKb4
- Token (base support) - Support Issue, Transfer, and Redeem Token Operations
 https://jira.hyperledger.org/browse/FAB-11144
- Using FabToken
 https://hyperledger-fabric.readthedocs.io/en/latest/token/FabToken.html
FabToken
4
• Hyperledger Fabric v2.0
- https://github.com/hyperledger/fabric/tree/master/token
• Token Management System
• Unspent Transaction Output (UTXO) 모델
• 합의, 검증을 위해 Orderer, Peer 사용
• 토큰 생성, 관리를 위해 체인코드를 사용하지 않음.(Endorsement Policy X)
• s송/수신자 식별 – MSP
• Token Lifecycle: Issue, Transfer, Redeem, List
Unspent Transaction Output (UTXO)
5출처 - https://codechain.readthedocs.io/en/latest/transactions.html
Hyperledger Fabric – UTXO
6
• 패브릭에서는 상태(State)는 Key-Value 형태로 저장
Key : Namespace + TokenPrefix + Owner + TransactionId + Index
Value: Quantity
• Unspent Transaction(Output)은 Ledger(State DB)에 저장되고
Spent Transaction(Input)은 Ledger(State DB)에서 삭제됨.
Hyperledger Fabric – UTXO Transaction
7
Org1
100
IN OUT
Org1
100
IN OUT
Org1
50
Org2
50
Tx #1 Tx #2
{Org1-Tx#1, 100}
Issue to Org1(100) Transfer Org1 to Org2(50)
{Org1-Tx#2, 50}
{Org2-Tx#2-1, 50}
{Org1-Tx#1, 100}
Redeem from Org2(20)
Tx #3
Org2
50
IN OUT
Org2
30
20
{Org1-Tx#1, 100}
{Org1-Tx#2, 50}
{Org2-Tx#2-1, 50}
{Org2-Tx#3, 30}
{Tx#3-1, 20}
Token Transaction Flow
8
Client Prover Peer
① Request
(Issue,Transfer,Redeem)
② TokenTransaction
③ Envelope
④ Block
Peer
(Committer)
Validation(VSCC)
Commit(Simulation)
Prover Peer
9
• 연산(computation) 실행…
• 비밀정보 유지…
• 트랜잭션 상태, 토큰 몰록 질의 대응…
• 토큰 발행 및 전송 시 검증
- TokenTransaction 생성
Token Lifecycle
10
• Issue
• List
• Transfer
• Reedem
Token Lifecycle – issue (계속)
11
• 채널 내 허가 받은 MSP에 의해 토큰 생성
- IssuingPolicy : v2.0 alpha 버전에서는 ANY로 설정됨.
• 속성
- Owner: MSP
- Type: 토큰 이름. 예> FabCoin, HLKUGCoin,…
- Quantity
Token Lifecycle - issue
12
• SDK (node.js)
const tokenclient = client.newTokenClient(mychannel);
const txId = client.newTransactionID();
const param = {
owner: user1.getIdentity().serialize(),
type: 'USD',
quantity: '500',
};
const issueRequest = {
params: [param],
txId: txId,
};
const result = await tokenClient.issue(issueRequest);
Token Lifecycle – list (계속)
13
• Unspent 토큰에 대해 질의
- 권한: 토큰 소유자 MSP
• 질의 결과 값
- TokenID: 트랜잭션 ID, 인덱스
- Type: 토큰 이름. 예> FabCoin, HLKUGCoin,…
- Quantity
Token Lifecycle - list
14
• SDK (node.js)
const user1Tokenclient = client1.newTokenClient(mychannel);
const mytokens = await user1TokenClient.list();
for (const token of tokens) {
// get token.id, token.type, and token.quantity
// token.id will be used for transfer and redeem
}
Token Lifecycle – transfer (계속)
15
• 토크 전달, 토큰 소비
- 권한: 토큰 ID의 소유자(MSP)
• 파라미터
- Token ID: 토큰 ID
- Quantity
- Recipient: 수신자(MSP)
Token Lifecycle - transfer
16
• SDK (node.js)
const txId = client1.newTransactionID();
const param = {
owner: user2.getIdentity().serialize(),
quantity: '300',
};
// create the request for transfer
const transferRequest = {
tokenIds: [tokenid1],
params: [param],
txId: txId,
};
const mytokens = await user1TokenClient.transfer(transferRequest);
Token Lifecycle – redeem (계속)
17
• 비즈니스 네트워크(채널)에서 asset(token) 제거
- 권한: 토큰 ID의 소유자(MSP)
- Reedm된 토큰은 transfer/change되지 않음.
• 파라미터
- Token ID: 토큰 ID
- Quantity
Token Lifecycle - redeem
18
• SDK (node.js)
const user2Tokenclient = client2.newTokenClient(mychannel);
const txId = client2.newTransactionID();
const param = {
quantity: '100',
};
const redeemRequest = {
tokenIds: [tokenid2],
params: [param],
txId: txId,
};
const result = await user2TokenClient.redeem(redeemRequest);
핸즈온 랩 자료
19
http://bit.ly/hlkug_handson190
6
BYFN(Building Your First Network)
20
Peer Peer
Peer PeerOrderer
Org1
Org2peer0.org1.example.com
peer1.org1.example.com
peer0.org2.example.comorderer.example.com
fabric_byfn
peer1.org2.example.com
Future features
21
• non-fungible tokens
- Non fungible tokens cannot be merged or divided.
• chaincode interoperability
- allows tokens to be issued, transferred, and redeemed by chaincode
22
감사합니다.

More Related Content

What's hot

Distributed Tracing with Jaeger
Distributed Tracing with JaegerDistributed Tracing with Jaeger
Distributed Tracing with JaegerInho Kang
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersWSO2
 
C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型信之 岩永
 
たのしい高階関数
たのしい高階関数たのしい高階関数
たのしい高階関数Shinichi Kozake
 
Introduction to Open Telemetry as Observability Library
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability LibraryTonny Adhi Sabastian
 
Prometheus
PrometheusPrometheus
Prometheuswyukawa
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?Wojciech Barczyński
 
F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~Nobuhisa Koizumi
 
Linking Metrics to Logs using Loki
Linking Metrics to Logs using LokiLinking Metrics to Logs using Loki
Linking Metrics to Logs using LokiKnoldus Inc.
 
Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Kenjiro Kubota
 
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Vietnam Open Infrastructure User Group
 
Microservice - Up to 500k CCU
Microservice - Up to 500k CCUMicroservice - Up to 500k CCU
Microservice - Up to 500k CCUViet Tran
 
GemStone Update
GemStone Update GemStone Update
GemStone Update ESUG
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API GatewayYohann Ciurlik
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusChandresh Pancholi
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdKohei Tokunaga
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For OperatorsKevin Brockhoff
 

What's hot (20)

Distributed Tracing with Jaeger
Distributed Tracing with JaegerDistributed Tracing with Jaeger
Distributed Tracing with Jaeger
 
How to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in ContainersHow to Deploy WSO2 Enterprise Integrator in Containers
How to Deploy WSO2 Enterprise Integrator in Containers
 
C# 8.0 null許容参照型
C# 8.0 null許容参照型C# 8.0 null許容参照型
C# 8.0 null許容参照型
 
たのしい高階関数
たのしい高階関数たのしい高階関数
たのしい高階関数
 
Introduction to Open Telemetry as Observability Library
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability Library
 
Prometheus
PrometheusPrometheus
Prometheus
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?
 
F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~F#入門 ~関数プログラミングとは何か~
F#入門 ~関数プログラミングとは何か~
 
Linking Metrics to Logs using Loki
Linking Metrics to Logs using LokiLinking Metrics to Logs using Loki
Linking Metrics to Logs using Loki
 
Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発Laravelでfacadeを使わない開発
Laravelでfacadeを使わない開発
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
 
Microservice - Up to 500k CCU
Microservice - Up to 500k CCUMicroservice - Up to 500k CCU
Microservice - Up to 500k CCU
 
Building Netty Servers
Building Netty ServersBuilding Netty Servers
Building Netty Servers
 
GemStone Update
GemStone Update GemStone Update
GemStone Update
 
Bizweb Microservices Architecture
Bizweb Microservices ArchitectureBizweb Microservices Architecture
Bizweb Microservices Architecture
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API Gateway
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheus
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into Containerd
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
 

Similar to Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab

Building a NFT Marketplace DApp
Building a NFT Marketplace DAppBuilding a NFT Marketplace DApp
Building a NFT Marketplace DAppThanh Nguyen
 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session 병완 임
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosGiorgos Topalidis
 
Presentation topalidis giorgos
Presentation topalidis giorgosPresentation topalidis giorgos
Presentation topalidis giorgosGiorgos Topalidis
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoinHu Kenneth
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPRafal Gancarz
 
Tagcash Developers
Tagcash DevelopersTagcash Developers
Tagcash DevelopersMark Vernon
 
Corda Developer Bootcamp: Tokens
Corda Developer Bootcamp: TokensCorda Developer Bootcamp: Tokens
Corda Developer Bootcamp: TokensR3
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyJollen Chen
 
Asset tokenization Real Estate Reinvented
Asset tokenization Real Estate ReinventedAsset tokenization Real Estate Reinvented
Asset tokenization Real Estate ReinventedJongseung Kim
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...Dace Barone
 
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Jakub Botwicz
 
Corda Developer Bootcamp: Tokens
Corda Developer Bootcamp:  TokensCorda Developer Bootcamp:  Tokens
Corda Developer Bootcamp: TokensR3
 
Is there a token for that? Tokens demystified.
Is there a token for that? Tokens demystified.Is there a token for that? Tokens demystified.
Is there a token for that? Tokens demystified.Jan Brejcha
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12Aludirk Wong
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricBenjamin Fuentes
 
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 WorkshopIBM France Lab
 

Similar to Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab (20)

Building a NFT Marketplace DApp
Building a NFT Marketplace DAppBuilding a NFT Marketplace DApp
Building a NFT Marketplace DApp
 
Basics of Block Chain
Basics of Block ChainBasics of Block Chain
Basics of Block Chain
 
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
BlockchainDay "Ethereum Dapp - Asset Exchange YOSEMITE alpha" Session
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_Giorgos
 
Presentation topalidis giorgos
Presentation topalidis giorgosPresentation topalidis giorgos
Presentation topalidis giorgos
 
20221110 MetaCoin
20221110 MetaCoin20221110 MetaCoin
20221110 MetaCoin
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTP
 
Tagcash Developers
Tagcash DevelopersTagcash Developers
Tagcash Developers
 
Corda Developer Bootcamp: Tokens
Corda Developer Bootcamp: TokensCorda Developer Bootcamp: Tokens
Corda Developer Bootcamp: Tokens
 
Bitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and PropertyBitmark and Hyperledger Workshop: the Digital Assets and Property
Bitmark and Hyperledger Workshop: the Digital Assets and Property
 
Asset tokenization Real Estate Reinvented
Asset tokenization Real Estate ReinventedAsset tokenization Real Estate Reinvented
Asset tokenization Real Estate Reinvented
 
Scalable IoT platform
Scalable IoT platformScalable IoT platform
Scalable IoT platform
 
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
“Technical Intro to Blockhain” by Yurijs Pimenovs from Paybis at CryptoCurren...
 
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
Cotopaxi - IoT testing toolkit (3rd release - Black Hat Europe 2019 Arsenal)
 
Corda Developer Bootcamp: Tokens
Corda Developer Bootcamp:  TokensCorda Developer Bootcamp:  Tokens
Corda Developer Bootcamp: Tokens
 
Is there a token for that? Tokens demystified.
Is there a token for that? Tokens demystified.Is there a token for that? Tokens demystified.
Is there a token for that? Tokens demystified.
 
以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12以太坊代幣付款委託 @ Open Source Developer Meetup #12
以太坊代幣付款委託 @ Open Source Developer Meetup #12
 
Ethereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter ReitsmaEthereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter Reitsma
 
Demystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabricDemystify blockchain development with hyperledger fabric
Demystify blockchain development with hyperledger fabric
 
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
 

More from Hyperledger Korea User Group

Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜
Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜
Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜Hyperledger Korea User Group
 
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기Hyperledger Korea User Group
 
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기Hyperledger Korea User Group
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능Hyperledger Korea User Group
 

More from Hyperledger Korea User Group (6)

Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜
Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜
Hyperledger Meetup Korea #28 - HTS(Hedera Token Service), DeFi 스왑 및 유동성 프로토콜
 
Hyperledger Fabric v2.0: 새로운 기능
Hyperledger Fabric v2.0: 새로운 기능Hyperledger Fabric v2.0: 새로운 기능
Hyperledger Fabric v2.0: 새로운 기능
 
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
 
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
 
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기
[2019.03] 멀티 노드에서 Hyperledger Fabric 네트워크 구성하기
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab

  • 1. Hyperledger Fabric – v2.0 Alpha FabToken Overview & Hands-On Lab Hyperledger Korea User Group
  • 2. 2
  • 3. 엔터프라이즈 블록체인 - Token 3 • R3 Corda – Tokens SDK • JP Morgan Quorum – JPM Coin - https://www.jpmorgan.com/global/news/digital-coin-payments • Hyperledger Fabric v2 – FabToken - Token Management Enablement in Hyperledger Fabric  http://bit.ly/2KvVKb4 - Token (base support) - Support Issue, Transfer, and Redeem Token Operations  https://jira.hyperledger.org/browse/FAB-11144 - Using FabToken  https://hyperledger-fabric.readthedocs.io/en/latest/token/FabToken.html
  • 4. FabToken 4 • Hyperledger Fabric v2.0 - https://github.com/hyperledger/fabric/tree/master/token • Token Management System • Unspent Transaction Output (UTXO) 모델 • 합의, 검증을 위해 Orderer, Peer 사용 • 토큰 생성, 관리를 위해 체인코드를 사용하지 않음.(Endorsement Policy X) • s송/수신자 식별 – MSP • Token Lifecycle: Issue, Transfer, Redeem, List
  • 5. Unspent Transaction Output (UTXO) 5출처 - https://codechain.readthedocs.io/en/latest/transactions.html
  • 6. Hyperledger Fabric – UTXO 6 • 패브릭에서는 상태(State)는 Key-Value 형태로 저장 Key : Namespace + TokenPrefix + Owner + TransactionId + Index Value: Quantity • Unspent Transaction(Output)은 Ledger(State DB)에 저장되고 Spent Transaction(Input)은 Ledger(State DB)에서 삭제됨.
  • 7. Hyperledger Fabric – UTXO Transaction 7 Org1 100 IN OUT Org1 100 IN OUT Org1 50 Org2 50 Tx #1 Tx #2 {Org1-Tx#1, 100} Issue to Org1(100) Transfer Org1 to Org2(50) {Org1-Tx#2, 50} {Org2-Tx#2-1, 50} {Org1-Tx#1, 100} Redeem from Org2(20) Tx #3 Org2 50 IN OUT Org2 30 20 {Org1-Tx#1, 100} {Org1-Tx#2, 50} {Org2-Tx#2-1, 50} {Org2-Tx#3, 30} {Tx#3-1, 20}
  • 8. Token Transaction Flow 8 Client Prover Peer ① Request (Issue,Transfer,Redeem) ② TokenTransaction ③ Envelope ④ Block Peer (Committer) Validation(VSCC) Commit(Simulation)
  • 9. Prover Peer 9 • 연산(computation) 실행… • 비밀정보 유지… • 트랜잭션 상태, 토큰 몰록 질의 대응… • 토큰 발행 및 전송 시 검증 - TokenTransaction 생성
  • 10. Token Lifecycle 10 • Issue • List • Transfer • Reedem
  • 11. Token Lifecycle – issue (계속) 11 • 채널 내 허가 받은 MSP에 의해 토큰 생성 - IssuingPolicy : v2.0 alpha 버전에서는 ANY로 설정됨. • 속성 - Owner: MSP - Type: 토큰 이름. 예> FabCoin, HLKUGCoin,… - Quantity
  • 12. Token Lifecycle - issue 12 • SDK (node.js) const tokenclient = client.newTokenClient(mychannel); const txId = client.newTransactionID(); const param = { owner: user1.getIdentity().serialize(), type: 'USD', quantity: '500', }; const issueRequest = { params: [param], txId: txId, }; const result = await tokenClient.issue(issueRequest);
  • 13. Token Lifecycle – list (계속) 13 • Unspent 토큰에 대해 질의 - 권한: 토큰 소유자 MSP • 질의 결과 값 - TokenID: 트랜잭션 ID, 인덱스 - Type: 토큰 이름. 예> FabCoin, HLKUGCoin,… - Quantity
  • 14. Token Lifecycle - list 14 • SDK (node.js) const user1Tokenclient = client1.newTokenClient(mychannel); const mytokens = await user1TokenClient.list(); for (const token of tokens) { // get token.id, token.type, and token.quantity // token.id will be used for transfer and redeem }
  • 15. Token Lifecycle – transfer (계속) 15 • 토크 전달, 토큰 소비 - 권한: 토큰 ID의 소유자(MSP) • 파라미터 - Token ID: 토큰 ID - Quantity - Recipient: 수신자(MSP)
  • 16. Token Lifecycle - transfer 16 • SDK (node.js) const txId = client1.newTransactionID(); const param = { owner: user2.getIdentity().serialize(), quantity: '300', }; // create the request for transfer const transferRequest = { tokenIds: [tokenid1], params: [param], txId: txId, }; const mytokens = await user1TokenClient.transfer(transferRequest);
  • 17. Token Lifecycle – redeem (계속) 17 • 비즈니스 네트워크(채널)에서 asset(token) 제거 - 권한: 토큰 ID의 소유자(MSP) - Reedm된 토큰은 transfer/change되지 않음. • 파라미터 - Token ID: 토큰 ID - Quantity
  • 18. Token Lifecycle - redeem 18 • SDK (node.js) const user2Tokenclient = client2.newTokenClient(mychannel); const txId = client2.newTransactionID(); const param = { quantity: '100', }; const redeemRequest = { tokenIds: [tokenid2], params: [param], txId: txId, }; const result = await user2TokenClient.redeem(redeemRequest);
  • 20. BYFN(Building Your First Network) 20 Peer Peer Peer PeerOrderer Org1 Org2peer0.org1.example.com peer1.org1.example.com peer0.org2.example.comorderer.example.com fabric_byfn peer1.org2.example.com
  • 21. Future features 21 • non-fungible tokens - Non fungible tokens cannot be merged or divided. • chaincode interoperability - allows tokens to be issued, transferred, and redeemed by chaincode