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

  • 相关阅读:
    CentOS安装Docker
    Spring内异常 application exception overridden by commit exception
    SVN里恢复到某一天的版本操作
    BootStrap如何支持多模态框弹窗
    Finally使用时报"finally block does not complete normally"
    dom4j解析XML文件
    避免先查询再插入的解决方案
    List<T>转换Datable 数据
    DataTable转Json Json转DataTable
    sql 自动生成编号函数
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/Hyperledger.html
Copyright © 2011-2022 走看看