Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-15781

Please provide more background information on what peer chaincode install is actually doing

    XMLWordPrintable

    Details

      Description

      Hey,

      I'm new to Hyperledger Fabric and maybe I missed it in the documentation, but I tried to find it several times, so either it's not there, it's well hidden or I'm too stupid

      I started with Hyperledger Fabric to set up a blockchain network with a certain smart contract for testing/research purposes. I'm familiar with go, docker and docker-compose, so my first impression was that it should be quite easy to understand how hyperledger works. Then I came started with understanding how chaincode things are working, and I had several (but wrong) impressions about how thinks could work. For me, a lot of things were unclear for me:

      • Does "peer chaincode install" just add a pointer (link) to my chaincode source code or does it copy the code?
      • Where is the compiling done, host system, peer container, smart contract container?
      • Which container does need which volume for accessing my code?

      A small sentence in the documentation, like the following would in my opinion, significantly clear thinks up, so maybe you could add it somewhere:

      "peer chaincode install" collects the chaincode sources and sends it to the peer node (therefore, the node where the peer command is located needs read access to the chaincode sources). When first used (e.g. for instantiating),  the peer creates a new container for this chaincode and copies the sources to this container. After that, the compiling is done in this newly created chaincode container. Finally, the compiled chaincode is started in the chaincode container.

      I know some people struggling with the same, so maybe this could help to improve documentation to make thinks more clear. After understanding this part of hyperledger, it was like "Ok, that's quite simple" for me.

      Best regards
      Matthias

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mlohr Matthias Lohr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration