Re: Fabric 2.0: commit readiness returns false but approvalformyorg returned success


Siddharth Jain
 

if i add call i get



From: Siddharth Jain <siddjain@...>
Sent: Tuesday, March 3, 2020 11:00 AM
To: fabric@... <fabric@...>
Subject: Re: Fabric 2.0: commit readiness returns false but approvalformyorg returned success
 

if existingValue, ok := existingKeys[keyName]; !ok || !bytes.Equal(existingValue, util.ComputeSHA256(marshaledFieldValue)) {
return false, nil // false means chaincode definition has not been approved
}
ok is true and I see existingKeys and existingValue as well



so the bytes.Equal(existingValue, util.ComputeSHA256(marshaledFieldValue)) must be failing

I am not a Go developer but when I try to eval the expression in VS Code this is what I get:


does above have to do with this bug: https://github.com/microsoft/vscode-go/issues/2655
What debugger do Fabric devs use to debug Go code?


From: Siddharth Jain <siddjain@...>
Sent: Monday, March 2, 2020 5:15 PM
To: fabric@... <fabric@...>
Subject: Fabric 2.0: commit readiness returns false but approvalformyorg returned success
 
we have a network of 3 orgs


we executed approvalformyorg for each org. our command looked like following

peer lifecycle chaincode approveformyorg \
 --channelID $CHANNEL_ID \
 --name $NAME \
 --version $VERSION \
 --package-id $PACKAGE_ID \
 --sequence 1 \
 --signature-policy "AND ('Org1MSP.peer','Org2MSP.peer','Org3MSP.peer')" \


here is sample output when we ran the command for an org: https://gist.github.com/siddjain/6b25bc35e708faf412048423bda02652. it says
2020-03-02 16:04:52.583 PST [chaincodeCmd] ClientWait -> INFO 039 txid [5102fa8dc652f1effbf793639df0665ef3f2649b6d30a49ce7192da10a7dc7d2] committed with status (VALID) at


2020-03-02 16:04:50.368 PST [lifecycle] ApproveChaincodeDefinitionForOrg -> INFO 033 Successfully endorsed chaincode approval with name 'mycc', package ID 'mycc_1.0:ce4e81ee8835ad0a01f7629b4646f52535b91378311f11cee703b3011d7adfdf', on channel 'tracktrace' with definition {sequence: 1, endorsement info: (version: '1.0', plugin: 'escc', init required: false), validation info: (plugin: 'vscc', policy: '0a481210120e08031202080012020801120208021a0f120d0a0942696f746f724d535010031a0d120b0a07584d65644d535010031a1412120a0e4b6579506861726d6163794d53501003'), collections: ()}
2020-03-02 16:04:50.368 PST [endorser] callChaincode -> INFO 034 finished chaincode: _lifecycle duration: 186ms channel=tracktrace txID=5102fa8d
2020-03-02 16:04:52.583 PST [kvledger] CommitLegacy -> INFO 039 [tracktrace] Committed block [1] with 1 transaction(s)

we executed approvalformyorg on all 3 orgs

but when we run the checkcommitreadiness command we get false for each of the 3 orgs. 

anyone knows what is wrong here and how to fix it?

Join fabric@lists.hyperledger.org to automatically receive all group messages.