Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: fabric-sdk-node
    • Labels:
      None

      Description

      The current "protocol" how the SDK's responsibility for golang is like this:

      • given the chaincode path, build a chaincode package that includes all the dependencies
      • then the SDK sends the package to the peer to install
      • then the SDK calls the peer to instantiate the chaincode. if instantiating for the first time (it may get instantiated multiple times for different channels), the peer will use the fabric-ccenv environment to build it into native binaries, and package the resulting binary into a custom docker image based on a base image (fabric-baseos for golang).

      This protocol can be directly translated to handling node.js chaincode lifecycles like the following:

      • given the node.js chaincode path, which is expected to be a folder containing the chaincode JS code, plus package.json to declare dependencies
      • then the SDK sends the package to the peer to install
      • then the SDK calls the peer to instantiate the chaincode. if instantiating for the first time, the peer will use the fabric-ccenv environment to "build" it by running "npm install -production", and package the resulting folder into a custom docker image based on a base image (fabric-baseos at the moment does not have node.js engine, so we should use fabric-baseimage for now).

      Another option is to utilize the CAR support.

        Attachments

          Activity

            People

            • Assignee:
              zhaochy Zhao Chaoyi
              Reporter:
              jimthematrix Jim Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week
                1w
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week
                1w

                  Git Source Code