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

  • 相关阅读:
    《需求工程——软件建模与分析》阅读笔记03
    第十一周周五
    统计字符串里每个词语的数目
    第十一周周四计划
    for循环创建的a标签,当点击时如何确定点击的是哪一个标签?
    第十周计划周二&周三计划
    第十周周二汇报
    第九周周五小思路
    第九周周五计划&&周四总结
    第九周周四计划&&周三总结
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/Hyperledger.html
Copyright © 2011-2022 走看看