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

  • 相关阅读:
    python INFO: Can't locate Tcl/Tk libs and/or headers
    关于 android 中 postDelayed方法的讲解
    python两个dataframe的合并
    Android异步加载访问网络图片-解析json
    ThinkCMF----调用指定栏目的文章列表
    thinkCMF----使用自定义函数
    thinkCMF----公共模板的引入
    thinkCMF----如何写标签
    thinkCMF----列表页跳转
    thinkCMF----导航高亮显示
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/Hyperledger.html
Copyright © 2011-2022 走看看