End2EndIT
Posted iDragon
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了End2EndIT相关的知识,希望对你有一定的参考价值。
End2EndIT:
1. SampleUser
1.1 name
1.2 roles
1.3 account
1.4 affiliation
1.5 organization
1.6 enrollmentSecret
1.7 Enrollment
1.8 support serialize & deserialize
2. SampleOrg
2.1 name
2.2 mspid
2.3 HFCAClient
2.4 userlist with names
2.5 peer location list with names
2.6 orderer location list with names
2.7 event hub locations list with names
2.8 SampleUser admin
2.9 ca location
2.10 ca properties
2.11 SampleUser peer admin
2.12 domian name
3. Check config
3.1 reset config
3.2 customize config
3.3 get all test sample orgs
3.4 set HFCAClient to sample org for every one with ca name & ca location & ca properties
4. Test
4.1 Clear Store
4.2 make store ready to save users, orgs
4.2.1 enroll users
4.2.1.1 for every sample org
4.2.1.2 set HFCAClient‘s crypto suite
4.2.1.3 test with tls
4.2.1.3.1 new EnrollmentRequest
4.2.1.3.2 set enrollment request with host,profile
4.2.1.3.3 call HFCAClient‘s enroll with name & secret & enrollmentrequest
4.2.1.3.4 get Enrollment from last step
4.2.1.3.5 get tls cert pem and tls key pem from enrollment
4.2.1.3.6 new client TLS properties
4.2.1.3.7 store tlskeypem tlscertpem with the sample org
4.2.1.4 check if ca if connected, get ca info
4.2.1.5 get ca name
4.2.1.6 get sample user admin from store for the org
4.2.1.7 Preregistered admin only needs to be enrolled with Fabric caClien
4.2.1.8 call ca.enroll with admin name and password to get enrollment
4.2.1.9 set admin with this enrollment
4.2.1.10 set admin to sample org
4.2.1.11 get normal user from store
4.2.1.12 if user is not registerd
4.2.1.12.1 new regitrationRequest
4.2.1.12.2 call ca.register with request & admin user
4.2.1.12.3 set enrollmentSecret with returned value from ca.register
4.2.1.13 if user is not enrolled
4.2.1.13.1 call HFCAClient.enroll with user and its secrete
4.2.1.13.2 set user with enrollment from HFCAClient.enroll
4.2.1.13.3 add user to sample org
4.2.1.14 get peerOrgAdmin from path "../crypto-config/peerOrganizations/.."
4.2.1.15 set peerAdmin to sample org
4.3 fabric test
4.3.1 new HFClient
4.3.2 set HFClient crypto suite
4.3.3 get one sample org from store
4.3.4 construct channel
4.3.4.1 channel name,sample org
4.3.4.2 call HFClient.setUserContext with peerAdmin from sample org
4.3.4.3 for every order from sample org
4.2.4.3.1 get orderer properties from config
4.2.4.3.2 put property: keepAliveTime
4.2.4.3.2 put property: keepAliveTimeout
4.2.4.3.2 put property: keepAliveTimeWithoutCal
4.2.4.3.3 put property: clientTLSProperties
4.2.4.3.4 call HFClient.newOrderer with name,location and properties
4.2.4.3.5 save orderer to orderer list
4.3.4.4 create channel
4.3.4.4.1 pick the first orderer in orderder list
4.3.4.4.2 new ChannelConfiguration with file *.tx
4.3.4.4.3 call HFClient.newChannel to create channel with name,orderer,channelconfig,channelconfig signature
4.3.4.4.4 for every peer in sample org
4.3.4.4.4.1 set peer properties with TLSProperties,maxInboundMessageSize
4.3.4.4.4.2 call HFClient.newPeer with name,location,properties to create peer
4.3.4.4.4.3 call Channel.joinPeer to have all peers join in channel
4.3.4.4.4.4 call Channel.addOrderer to have all orderer join in channel
4.3.4.4.4.5 call Channel.addEventHub to have all event hub join in channel
4.3.4.4.4.6 call Channel.initialize() to initialize
4.3.4.4.4.7 get bytes from Channel.serializeChannel()
4.3.4.4.4.8 call Channel shutdown
4.3.4.4.4.9 call HFClient.deserializeChannel with bytes to initialize a channel
4.3.4.5 save channel to store
4.3.4.6 run channel test with HFClient,channel,sample org
4.3.4.6.1 new class for event capture with handle,blockevent,ChaincodeEvent
4.3.4.6.2 call channel.registerChaincodeEventListner to save event to queue
4.3.4.6.3 new ChaincodeID with name & version
4.3.4.6.4 set chaincodeID with path
4.3.4.6.5 build chaincode
4.3.4.6.6 install chaincode
4.3.4.6.6.1 HFClient set userContext with peerAdmin from org
4.3.4.6.6.2 call HFClient.newInstallProposalRequest()
4.3.4.6.6.3 setChaincodeID to installProposalRequest
4.3.4.6.6.4 setChaincodeSourceLocation from local directory
4.3.4.6.6.5 or setChaincodeInputStream from
4.3.4.6.6.6 setChaincodeVersion to installProposalRequest
4.3.4.6.6.7 setChaincodeLanguage to installProposalRequest
4.3.4.6.7 only a client from the same org as the peer can issue an install request
4.3.4.6.7.1 get all peers from channel
4.3.4.6.7.2 call HFClient.sendInstallProposal with peers & installProposalRequest
4.3.4.6.7.3 check all responses for sendInstallProposal
4.3.4.6.8 Instantiate chaincode.
以上是关于End2EndIT的主要内容,如果未能解决你的问题,请参考以下文章