Hyperledger Endorsement Failure when Invoking chaincode - failed: signature set did not satisfy policy
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
invoke transaction fails with below error:
Fabric Peer Error log:
Validate -> ERRO 078 VSCC error: stateBasedValidator.Validate failed,
err validation of endorsement policy for chaincode mycc in tx 4:0
failed: signature set did not satisfy policy 2019-01-02 07:24:40.782
UTC [committer.txvalidator] validateTx -> ERRO 079 VSCCValidateTx for
transaction txId =
815553b7cabb383f59d4abd3c2bdc3deda5b74169048e3b3b837f46adbd85099
returned error: validation of endorsement policy for chaincode mycc in
tx 4:0 failed: signature set did not satisfy policy
Node-SDK logs show the following
[2019-01-02 02:24:40.826] [ERROR] invoke-chaincode - The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
[2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Error: The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
Any help in resolving this will be very helpful
hyperledger-fabric hyperledger-fabric-sdk-js
add a comment |
I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
invoke transaction fails with below error:
Fabric Peer Error log:
Validate -> ERRO 078 VSCC error: stateBasedValidator.Validate failed,
err validation of endorsement policy for chaincode mycc in tx 4:0
failed: signature set did not satisfy policy 2019-01-02 07:24:40.782
UTC [committer.txvalidator] validateTx -> ERRO 079 VSCCValidateTx for
transaction txId =
815553b7cabb383f59d4abd3c2bdc3deda5b74169048e3b3b837f46adbd85099
returned error: validation of endorsement policy for chaincode mycc in
tx 4:0 failed: signature set did not satisfy policy
Node-SDK logs show the following
[2019-01-02 02:24:40.826] [ERROR] invoke-chaincode - The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
[2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Error: The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
Any help in resolving this will be very helpful
hyperledger-fabric hyperledger-fabric-sdk-js
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10
add a comment |
I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
invoke transaction fails with below error:
Fabric Peer Error log:
Validate -> ERRO 078 VSCC error: stateBasedValidator.Validate failed,
err validation of endorsement policy for chaincode mycc in tx 4:0
failed: signature set did not satisfy policy 2019-01-02 07:24:40.782
UTC [committer.txvalidator] validateTx -> ERRO 079 VSCCValidateTx for
transaction txId =
815553b7cabb383f59d4abd3c2bdc3deda5b74169048e3b3b837f46adbd85099
returned error: validation of endorsement policy for chaincode mycc in
tx 4:0 failed: signature set did not satisfy policy
Node-SDK logs show the following
[2019-01-02 02:24:40.826] [ERROR] invoke-chaincode - The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
[2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Error: The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
Any help in resolving this will be very helpful
hyperledger-fabric hyperledger-fabric-sdk-js
I am using balance transfer application with custom chaincode, when I use endorsement policy '1-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
then every thing works fine however if I use '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }]
invoke transaction fails with below error:
Fabric Peer Error log:
Validate -> ERRO 078 VSCC error: stateBasedValidator.Validate failed,
err validation of endorsement policy for chaincode mycc in tx 4:0
failed: signature set did not satisfy policy 2019-01-02 07:24:40.782
UTC [committer.txvalidator] validateTx -> ERRO 079 VSCCValidateTx for
transaction txId =
815553b7cabb383f59d4abd3c2bdc3deda5b74169048e3b3b837f46adbd85099
returned error: validation of endorsement policy for chaincode mycc in
tx 4:0 failed: signature set did not satisfy policy
Node-SDK logs show the following
[2019-01-02 02:24:40.826] [ERROR] invoke-chaincode - The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
[2019-01-02 02:24:40.827] [ERROR] invoke-chaincode - Error: The invoke
chaincode transaction was invalid, code:ENDORSEMENT_POLICY_FAILURE
Any help in resolving this will be very helpful
hyperledger-fabric hyperledger-fabric-sdk-js
hyperledger-fabric hyperledger-fabric-sdk-js
edited Jan 4 at 6:23
Hiren Gohel
3,52031837
3,52031837
asked Jan 4 at 4:50
SanketSanket
91
91
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10
add a comment |
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033274%2fhyperledger-endorsement-failure-when-invoking-chaincode-failed-signature-set%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54033274%2fhyperledger-endorsement-failure-when-invoking-chaincode-failed-signature-set%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you submitting request proposals to peers from both of the orgs? I believe balance transfer only requests endorsement from a peer from one org not from both.
– Gari Singh
Jan 6 at 11:14
Hi Gari Singh, This is how my request looks Invoke Transaction: localhost:4000/channels/mychannel/chaincodes/mycc -H "authorization: Bearer $ORG1_TOKEN" -H "content-type: application/json" -d '{ "peers": ["peer0.org1.example.com","peer1.org2.example.com"], "fcn":"invoke", "operation":"commit", "args": ["commit","true","a","b","c"] }') So essentially i am sending the request to peers of both orgs. I will try with just one org at a time and share the response. Thanks
– Sanket
Jan 7 at 5:09
Hi Gari Singh I tried with sending request to peer of one org but still the same issue. ENDORSEMENT FAILURE Here is the endorsement policy by default 'endorsement-policy': { identities: [ { role: { name: 'member', mspId: 'Org1MSP' }}, { role: { name: 'member', mspId: 'Org2MSP' }} ], policy: { '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] } }
– Sanket
Jan 8 at 4:07
Hi @GariSingh I have uploaded my code to github link
– Sanket
Jan 10 at 5:09
Hi @GariSingh The code that i am using is uploaded here github.com/psanket/balance-transfer-modified
– Sanket
Jan 10 at 5:10