SlideShare a Scribd company logo
ChainHero web application
Hyperledger fabric
네트워크 분석
2018.7.18
김병준
요약
Chainhero의 코드를 실행시켜 console과 wireshark를 이용하여 네트워크의 상태
(request/response)를 분석.
코드를 분석하고 웹에서 동작을 상태도로 작성
실행 - 터미널 화면
• Make 명령어 수행 후 초기화면
터미널 웹페이지
실행 – 터미널 화면
• 새로 고침 실행
• Request 버튼 실행
실행 – 터미널 화면
• Send the request 실행
TCP 헤더 구조
Source port : 메시지를 보내는 측에서 통신을 위해 사용하는 port 번호
Destination port ; 메시지 받는 측의 통신 port번호
Sequence number : 송신자가 지정하는 순서 번호, TCP에서는 전송 데이터의 각 바이트마다 순서 번호가
존재한다.
ACK : 다음에 받을것으로 예상되는 데이터 옥텟의 순서 번호를 나타낸다
실행 - wireshark
실행 직후 결과
Source Port : 58500 Destination Port : 3000
Source Port : 3000 Destination Port : 58500
실행-wireshark
• Wireshark 분석
실행-wireshark
• Wireshark 분석
새로운 값을 Request를 한 경우
Hyperledger-fabric Service
• Hyperledger-fabric sample project는 아래와 같이 구성되어 있다.
Client
Web
Server
Service
BlockChain
NetWork
Hyperledger-fabric Service
Project layout
Folder name File name Description
Blockchain
Invoke.go 값이 수정될 때 호출된다.
Query.go State를 얻는다.
Setup.go 변수들을 생성하고 변수와 설정을
초기화 시킨다.
Chaincode Main.go Chaincode를 초기화 시킨다.
Web
controllers Controller.go
Home.go
Request.go
templates Home.html
Layout.html
Request.html
Hyperledger-fabric Service
Hello의 상태를 얻기위해 chaincode에 QueryHello가 query.Query.go
Event hub와 chain, client 를 설정하고 configuration file을 읽고 초기화한다.
-초기화 하기 위해서 변수들을 추가한다.
-SDK를 configuration 파일과 함께 초기화한다.
-자원 관리 client는 채널 관리에 책임을 진다.
-MSP client는 그들의 identity에서부터 유저의 정보(채널을 저장하기 위해서 필요한 signing identity)를
retrieve하기위해 우리를 allow 한다.
-admin user가 전에 만들어진 채널에 join할 수 있도록 만든다.
-peer들에게 보내질 chaincode package를 생성한다.
-org peer들에 example cc 를 설치한다.
-chaincode policy를 설정한다.
-channel client는 query을 사용하고 트랜잭션을 실행한다.
-채널 event 에 접근이 가능한 client의 생성
Setup.go
실행 후 hello의 value를 수정하게 될 때 호출된다.
Arguments를 준비하고 데이터가 추가되게 된다.
Request(proposal)를 생성한 후 전송한다.
전송한 결과를 기다린 후 결과를 출력한다.
invoke.go
Hyperledger-fabric Service
Chaincode를 초기화한다.
-func init : chaincode가 install 되었을 때만 호출된다. 앞으로의 request를 handle하기 위해서 ledger를 준비한다.
-func invoke : invoke라 불리는 request들을 처리한다. ledger안의 모든 read, write function들을 처리한다.
-func query : ledger의 모든 readonly기능이 있다.
Main.go
Client Web Server
Example) 값 수정
request.html
Request.go
layout.html
invoke.go
controller.go
app.go
home.go
controller.go
home.html
favicon.ico
request.html
home.html
favicon.ico
request.html
home.html
favicon.ico
Setup.go
app.go
실행
Home.html
request.html
client
ListenAndS
erve
1. 실행
client
request.
go
GET/
request.html
GET/
request.html
2. 새로고침
controlle
r.go
app.goGET/
Favicon.ico
query.go
controlle
r.go
home.go
GET/
home.html
GET/
home.html
layout.html
layout.html
client
Request
.go
POST/
request.html
POST/
request.html
3. 수정
controlle
r.go
Invoke
.go
.
.
.
controlle
r.go
GET/
home.html
layout.html
layout.html

More Related Content

PDF
Hyperledger fabric - tuna fishing analysis
PDF
Hyperledger farbric build your first network install and analysis
PPTX
Block chain architecture and hyperledger fabric overview
PDF
세션1. block chain as a platform
PPTX
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
PDF
Blockchain Study(5) - Smart Contract(스마트 계약)
PDF
코어 이더리움
PDF
세션5. web3.js와 Node.js 를 사용한 dApp 개발
Hyperledger fabric - tuna fishing analysis
Hyperledger farbric build your first network install and analysis
Block chain architecture and hyperledger fabric overview
세션1. block chain as a platform
[2019.04] 쿠버네티스 기반 하이퍼레저 패브릭 네트워크 구축하기
Blockchain Study(5) - Smart Contract(스마트 계약)
코어 이더리움
세션5. web3.js와 Node.js 를 사용한 dApp 개발

What's hot (20)

PPTX
이더리움의 현황, 한계점 및 개선노력
PDF
Blockchain Study(4) - Geth & Smart Contract
PDF
Dapp시연 150214
PDF
세션3. geth 클라이언트 실습 및 모니터링과 시각화
PPTX
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
PDF
Klaytn Developer Meetup_20191022
PDF
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
PDF
150416 OpenStack Networking with Neutron Jieun, Kim
PDF
세션2. 이더리움 합의 알고리즘과 마이닝
PDF
Apache ZooKeeper 소개
PDF
세션4. 예제로 배우는 스마트 컨트랙트 프로그래밍
PDF
OpenStack Swift Debugging
PPTX
Redis data design by usecase
PDF
Openstack Instance Resize
PPTX
HTTP 완벽가이드 - ch15. 엔터티, 인코딩 (Entities and Encoding)
PDF
Node-express 채팅 서버 개발기
PPTX
Cosmos&tendermint (kr,en) by jeon chang suk
PDF
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
PDF
Open vSwitch의 Vendor Extension 구현
PPTX
Going asynchronous with netty - SOSCON 2015
이더리움의 현황, 한계점 및 개선노력
Blockchain Study(4) - Geth & Smart Contract
Dapp시연 150214
세션3. geth 클라이언트 실습 및 모니터링과 시각화
Welcome to keystone the open stack identity service_v1.0.0-20141208-1212
Klaytn Developer Meetup_20191022
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
150416 OpenStack Networking with Neutron Jieun, Kim
세션2. 이더리움 합의 알고리즘과 마이닝
Apache ZooKeeper 소개
세션4. 예제로 배우는 스마트 컨트랙트 프로그래밍
OpenStack Swift Debugging
Redis data design by usecase
Openstack Instance Resize
HTTP 완벽가이드 - ch15. 엔터티, 인코딩 (Entities and Encoding)
Node-express 채팅 서버 개발기
Cosmos&tendermint (kr,en) by jeon chang suk
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Open vSwitch의 Vendor Extension 구현
Going asynchronous with netty - SOSCON 2015
Ad

Similar to ChainHero web application hyperledger fabric analysis v 1.0 (20)

PPTX
1908 Hyperledger Fabric 소개 및 첫 네트워크 구축하기
PPT
Servlet3
PDF
[오픈소스컨설팅]파일럿진행예제 on AWS
PDF
Service mesh(istio) monitoring
PDF
HTTP 완벽가이드 21장
PDF
하이퍼레저 패브릭 실습자료
PDF
Block chain bidding_System
PDF
웹기반원격감시제어 2010 CPD
PDF
파이썬 웹 프로그래밍 2탄
PDF
JSP 프로그래밍 #03 서블릿
PDF
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
PDF
소켓프로그래밍 기초요약
PDF
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
PDF
하이퍼레저 패브릭 데이터 구조
PDF
DGMIT 제3회 R&D 컨퍼런스 r&d1 team : HTTP 프로토콜 개요
PPTX
TCP/IP Protocol - JAVA
PDF
Web App Security 2015.10
PDF
Kafka slideshare
PDF
1st-BE-sideproject-GDGonCampus_KyungHee_Univ.pdf
PDF
Node.js 첫걸음
1908 Hyperledger Fabric 소개 및 첫 네트워크 구축하기
Servlet3
[오픈소스컨설팅]파일럿진행예제 on AWS
Service mesh(istio) monitoring
HTTP 완벽가이드 21장
하이퍼레저 패브릭 실습자료
Block chain bidding_System
웹기반원격감시제어 2010 CPD
파이썬 웹 프로그래밍 2탄
JSP 프로그래밍 #03 서블릿
(C#,네트워크강좌)간단한 TCP 클라이언트/서버 구현, 멀티쓰레드 기반 에코우 클라이언트/서버_C추천#/WPF/자마린실무교육학원
소켓프로그래밍 기초요약
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
하이퍼레저 패브릭 데이터 구조
DGMIT 제3회 R&D 컨퍼런스 r&d1 team : HTTP 프로토콜 개요
TCP/IP Protocol - JAVA
Web App Security 2015.10
Kafka slideshare
1st-BE-sideproject-GDGonCampus_KyungHee_Univ.pdf
Node.js 첫걸음
Ad

ChainHero web application hyperledger fabric analysis v 1.0