Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hyperledger Fabric NodeSDK

Similar presentations


Presentation on theme: "Hyperledger Fabric NodeSDK"— Presentation transcript:

1 Hyperledger Fabric NodeSDK
Chaincode Lifecycle 2.0 7/10/2019 fabric-client 2.0

2 Overview The NodeSDK will add new API’s to support fabric lifecycle 2.0. The existing Chaincode lifecycle API’s will be left untouched to support customers that have not enabled the new capability. setup - create the necessary application objects and chaincode definition package - package the chaincode source artifacts install - push to the network approve for organization - each organization will define a specific chaincode definition commit for channel - channel members will agree to run a specific chaincode definition initialize - start the chaincode container and initialize the chaincode 7/10/2019 fabric-client 2.0

3 Overview Chaincode.js Step 1: Setup Step 2: Package Step 3: Install
New class to perform chaincode definition and non channel related tasks Chaincode.js Step 1: Setup build up a definition within app Step 2: Package source code packaged within app Step 3: Install send package to peer , save the returned hash 7/10/2019 fabric-client 2.0

4 Overview Channel.js Step 4: Approve Chaincode for Organization
New API’s on the channel object for the channel based steps. uses a Chaincode instance for the definition (name, version, hash, sequence, endorsement policy) Channel.js Step 4: Approve Chaincode for Organization invoke approve chaincode transaction to the system lifecycle Step 5: Define Chaincode for Channel invoke commit chaincode transaction to the system lifecycle 7/10/2019 fabric-client 2.0

5 Overview Channel.js Step 6: Initialize
Use an existing API to initialize on the channel object Use “init” instead of invoke Channel.js Step 6: Initialize Invoke “init” transaction to new chaincode 7/10/2019 fabric-client 2.0

6 build the application objects
Step: 1 - Setup build the application objects Client Channel Peer Orderer Chaincode Set the needed attributes Endorsement policy Collection configuration Sequence Name / version All organizations will do this step This is a new class, new methods on the chaincode. 7/10/2019 fabric-client 2.0

7 Build a tar file from the source code files and metadata files
Step: 2 - Package Build a tar file from the source code files and metadata files Available to be sent to other organizations This should only be done by one organization This is a new class, new method on the chaincode. 7/10/2019 fabric-client 2.0

8 Send the packaged code to a peer Save the hash value returned
Step: 3 - Install Send the packaged code to a peer Save the hash value returned May have received the package out of band in package step Install must be done on every peer where the chaincode is expected to be executed This is a new class, new method on the chaincode. 7/10/2019 fabric-client 2.0

9 Step: 4 - Approve for Organization
Send a “approve chaincode definition for organization” chaincode lifecycle transaction to one peer in our organization Commit the transaction (send to orderer) Each organization will perform this step This is a new API, new method on the channel. 7/10/2019 fabric-client 2.0

10 Step: 5 - Commit for Channel
Send a “commit definition chaincode for channel” chaincode lifecycle transaction to enough organizations Commit transaction (send to orderer) Only one organization will do this step This is a new API, new method on the channel. 7/10/2019 fabric-client 2.0

11 Step: 6 - Initialize the chaincode
Send an endorsement to enough peers “init” must be the function Starts the chaincode container and the ”init” method is called with the provided arguments Commit the transaction Only one organization will do this step This is not a new API, existing method on the channel. 7/10/2019 fabric-client 2.0


Download ppt "Hyperledger Fabric NodeSDK"

Similar presentations


Ads by Google