zoukankan      html  css  js  c++  java
  • Hyperledger Fabric SDK use case 1

    ///////////////////////////////////////////////////////////////////////
    :End2endAndBackAgainIT

    1.CreateChaincodID
    ChaincodeID.newBuilder()....

    2.check config

    2.1 reset config

    2.1.1 Use reflection to reset the static variable config as null
    2.1.2 Build new config

    2.2 Customize Config of fabric sdk

    2.3 GetIntegrationTestsSampleOrgs
    2.3.1 orgname
    2.3.2 orgmspid
    2.3.3 users--list
    2.3.4 peerLocations--list
    2.3.5 ordererlocations--list
    2.3.6 eventHubLocations--list

    2.3.7 domainName
    2.3.8 peerAdmin
    2.3.9 caLocation
    2.3.10 Admin User
    2.3.11 ca properties
    2.3.12 create HFCAClient with ca location for every org

    2.4 Setup

    2.4.1 Store for persistence
    2.4.2 setup peerAdmin,user,admin user

    2.5 run fabirc test

    2.5.1 new HFClient
    2.5.2 set cryptosuite to HFClient
    2.5.3 get one org from org list

    2.5.4 reconstructchannel
    2.5.4.1 channel name,HFClient,org
    2.5.4.2 HFClient setUserContext
    2.5.4.3 set client TLSProperties with client cert bytes
    2.5.4.4 set client TLSProperties with client key bytes
    2.5.4.5 use HFClient to new channel with name
    2.5.4.6 use HFClient to new orderer with name, location and properties including sert bytes & key bytes
    2.5.4.7 add all orderer of org into channel
    2.5.4.8 add all peer of org into channel with peer name, peer location, peer properties,
    2.5.4.9 for 1.0 add all event hub into channel with event hub name,location
    2.5.4.10 for 1.1 peers should hava all roles,Do some sanity checks that they domainName

    2.5.5 run channel with channel name & org with orderer,peers,users
    2.5.5.1 set user context to HFClient

    2.5.5.2 queryChaincodeForExpectedValue
    2.5.5.2.1 newQueryProposalRequest from HFClient to get QueryByChaincodeRequest
    2.5.5.2.2 use QueryByChaincodeRequest set args,Fcn,chaincodeID
    2.5.5.2.3 use to channel to query proposals with QueryByChaincodeRequest
    2.5.5.2.4 check every proposal response with isVerified,getpeer,payload,message,

    2.5.5.3 moveAmount for v1.1
    2.5.5.3.1 new newTransactionProposalRequest from HFClient
    2.5.5.3.2 set TransactionProposalRequest with chaincodeID,Fcn,Args,ProposalWaitTime
    2.5.5.3.3 set TransactionProposalRequest for user context
    2.5.5.3.4 call HFClient to send TransactionProposalRequest
    2.5.5.3.5 retrieved all ProposalResponse, check every one with transactionID,peer,status
    2.5.5.3.6 if all is good, send transaction to orderer with HFClient

  • 相关阅读:
    解惑丨C语言字符串常量、字符数组、字符指针!
    程序员压根就不想找对象?谁说的,给我站出来!
    C/C++实习工作应该具备那些能力?才能拿更好的工作和薪资!
    mysql查看创建数据表的DDL语句
    .NET 5 ML.NET 部署运行时出现 Unable to load DLL MklImports 的处理方法
    canvas波浪扇形
    小程序 Canvas 倒计时组件 (React 版)
    Canvas 倒计时
    策略模式实战中多种写法
    MySQL-基础架构介绍
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/Hyperledger.html
Copyright © 2011-2022 走看看