Coder Social home page Coder Social logo

Comments (3)

bestbeforetoday avatar bestbeforetoday commented on July 29, 2024

I don't see you mention installing the packaged chaincode before approving. Check the Fabric documentation on chaincode lifecycle for the steps required and their order.

It's also worth checking that after the approval call in the Java API, you also submit the endorsed approval. It's not particularly readable but the integration tests do exercise the chaincode lifecycle API to successfully deploy chaincode:

https://github.com/hyperledger/fabric-sdk-java/blob/main/src/test/java/org/hyperledger/fabric/sdkintegration/End2endLifecycleIT.java

The last thing to say is that the currently recommended approach for admin operations is to use the Fabric CLI commands. The Java API here works and should continue to work but is not being actively developed anymore. For business applications deployed to Fabric v2.4+, the recommended and supported application API is the Fabric Gateway client API. This does not include admin capability, including chaincode lifecycle.

from fabric-sdk-java.

luca-simonetti avatar luca-simonetti commented on July 29, 2024

I also have installed the package (I tried to check with peer lifecycle chaincode queryinstalled and it prints out fine)
using the peer command would be a little bit of a mess on our cluster, that's why I'm trying to use this SDK to install chaincodes.

from fabric-sdk-java.

luca-simonetti avatar luca-simonetti commented on July 29, 2024

it might be related to the signing policy. I can't really find any documentation on this, are these equivalent?

OR('Org1MSP.peer')
identities:  # list roles to be used in the policy
    peer: {"role": {"name": "peer", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP
    
policy: # the policy  .. could have been flat but show grouping.
    1-of: # signed by one of these groups  can be <n>-of  where <n> is any digit 2-of, 3-of etc..
      - signed-by: "peer"

from fabric-sdk-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.