(base) apple@WHOAMIdeMacBook-Pro:~/code/open-source/blockchain/hyperledger/fabric-samples/test-network$ ./network.sh deployCC deploying chaincode on channel 'mychannel' executing with the following - CHANNEL_NAME: mychannel - CC_NAME: basic - CC_SRC_PATH: NA - CC_SRC_LANGUAGE: go - CC_VERSION: 1.0 - CC_SEQUENCE: 1 - CC_END_POLICY: NA - CC_COLL_CONFIG: NA - CC_INIT_FCN: NA - DELAY: 3 - MAX_RETRY: 5 - VERBOSE: false Determining the path to the chaincode asset-transfer-basic Vendoring Go dependencies at ../asset-transfer-basic/chaincode-go/ ~/code/open-source/blockchain/hyperledger/fabric-samples/asset-transfer-basic/chaincode-go ~/code/open-source/blockchain/hyperledger/fabric-samples/test-network ~/code/open-source/blockchain/hyperledger/fabric-samples/test-network Finished vendoring Go dependencies + peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-go/ --lang golang --label basic_1.0 + res=0 Chaincode is packaged Installing chaincode on peer0.org1... Using organization 1 + peer lifecycle chaincode install basic.tar.gz + res=1 Error: failed to retrieve endorser client for install: endorser client failed to connect to localhost:7051: failed to create new connection: context deadline exceeded Usage: peer lifecycle chaincode install [flags]
Flags: --connectionProfile string The fully qualified path to the connection profile that provides the necessary connection information for the network. Note: currently only supported for providing peer connection information -h, --help help for install --peerAddresses stringArray The addresses of the peers to connect to --tlsRootCertFiles stringArray If TLS is enabled, the paths to the TLS root cert files of the peers to connect to. The order and number of certs specified should match the --peerAddresses flag
Global Flags: --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint --certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint --clientauth Use mutual TLS when communicating with the orderer endpoint --connTimeout duration Timeout for client to connect (default 3s) --keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint -o, --orderer string Ordering service endpoint --ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer --tls Use TLS when communicating with the orderer endpoint --tlsHandshakeTimeShift duration The amount of time to shift backwards for certificate expiration checks during TLS handshakes with the orderer endpoint
Chaincode installation on peer0.org1 has failed Deploying chaincode failed
Error: could not assemble transaction: proposal response was not successful, error code 500, msg Incorrect number of params. Expected 2, received 1 - proposal response: version:1 response:<status:200 > payload:"\n \177\017\350[\344G6\010V\331\332\377\354\216&\035\317&\251[N`\023\036\033\237\237A\005\3670\260\022\266\002\n\237\002\0227\n\n_lifecycle\022)\n'\n!namespaces/fields/supply/Sequence\022\002\010\016\022\343\001\n\006supply\022\330\001\n\003\n\0011\032\320\001\n\0011\032\312\001{\"ID\":\"1\",\"issuer\":\"\346\240\270\345\277\203\344\274\201\344\270\232\",\"owner\":\"\346\240\270\345\277\203\344\274\201\344\270\232\",\"amount\":100,\"createDate\":\"2020-12-28T10:02:30.578872398Z\",\"endDate\":\"2021-06-28T10:02:30.578872527Z\",\"contractHash\":\"test\",\"invoiceHash\":\"test\"}\032\003\010\310\001\"\r\022\006supply\032\0033.0" endorsement:<endorser:"\n\016GylCoreOrg1MSP\022\222\006-----BEGIN CERTIFICATE-----\nMIICFjCCAbygAwIBAgIQU43L5gjtXO+uCpRP2jG2AjAKBggqhkjOPQQDAjBxMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEYMBYGA1UEChMPY29yZS5zdXBwbHkuY29tMRswGQYDVQQDExJjYS5j\nb3JlLnN1cHBseS5jb20wHhcNMjAxMjI1MDkxNzAwWhcNMzAxMjIzMDkxNzAwWjBa\nMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2Fu\nIEZyYW5jaXNjbzEeMBwGA1UEAxMVcGVlcjAuY29yZS5zdXBwbHkuY29tMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAErf3R+7XpNQpmTsMO+iM4WS7IrOoafiPbAS7Q\nbuFFR3Qs4riIczgSmjh9rOA6I1q2q0CstLhfWDbqpf+8fXPUlKNNMEswDgYDVR0P\nAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAguznqsTisa64dNvOR\nvPwP0KGklWohNpbSe7VgIghx4L8wCgYIKoZIzj0EAwIDSAAwRQIhALIw1VMzezCg\n9LONbO4+V+weY42HQLbShkTP/gCFnGRYAiARyLLSDJIC2wwzSvOHNdm+aDRtbqGC\nNJenP9hmEbYsTw==\n-----END CERTIFICATE-----\n" signature:"0E\002!\000\251\370K6S\020\373\242\321\000\211\312\0001\333\365>\314\324\231\020>u;+\243\303dD\023\221\237\002 z \224\236R\355Z\251\202\363\035\304\365\212\277\235\375?\376\030\371\236\220\354iG6\244\334M\315\331" >
2021-01-07 06:44:40.479 UTC [vscc] Validate -> ERRO 62f VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode secured_supply in tx 12:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 3 of the 'Endorsement' sub-policies to be satisfied 2021-01-07 06:44:40.479 UTC [committer.txvalidator] validateTx -> ERRO 630 Dispatch for transaction txId = 101fe5e0aaaafbabcf31a5ce66fa48b92ab834456ba73cdb29730679bd637847 returned error: validation of endorsement policy for chaincode secured_supply in tx 12:0 failed: implicit policy evaluation failed - 1 sub-policies were satisfied, but this policy requires 3 of the 'Endorsement' sub-policies to be satisfied 2021-01-07 06:44:40.479 UTC [committer.txvalidator] Validate -> INFO 631 [alljoinchannel] Validated block [12] in 2ms
2021-01-05 09:40:29.461 UTC [vscc] Validate -> ERRO 3212 VSCC error: stateBasedValidator.Validate failed, err validation of key asset001 (coll'':ns'secured_supply') in tx 59:0 failed: signature set did not satisfy policy 2021-01-05 09:40:29.461 UTC [committer.txvalidator] validateTx -> ERRO 3213 Dispatch for transaction txId = 7d13143d4a24fe370528b0e47e6e8a71d7a8b660798c424769a57b67a9cb69ae returned error: validation of key asset001 (coll'':ns'secured_supply') in tx 59:0 failed: signature set did not satisfy policy
Why are my transactions returning an endorsement policy error: signature set did not satisfy policy? 问题情况 When I invoke a smart contract to submit a transaction, the transaction returns the following endorsement policy failure:
returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 问题原因 If you have recently joined a channel and installed the smart contract, this error occurs if you have not added your organization to the endorsement policy. Because your organization is not on the list of organizations who can endorse a transaction from the smart contract, the endorsement from your peers is rejected by the channel. If you encounter this problem, you can change the endorsement policy by upgrading the smart contract. For more information, see Specifying an endorsement policy and Upgrading a smart contract.