Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test adding an organisation #69

Open
davidkel opened this issue Nov 25, 2021 · 3 comments
Open

Test adding an organisation #69

davidkel opened this issue Nov 25, 2021 · 3 comments
Labels

Comments

@davidkel
Copy link
Owner

This should provide the capability to add Org4 to the existing 3 Org network

@davidkel davidkel added enhancement New feature or request manual test labels Nov 25, 2021
@davidkel davidkel changed the title Add support to add an organisation Test adding an organisation Nov 25, 2021
@davidkel davidkel mentioned this issue Nov 29, 2021
@davidkel davidkel assigned davidkel and unassigned sapthasurendran Dec 1, 2021
@davidkel
Copy link
Owner Author

davidkel commented Dec 1, 2021

Received the following error when the org was added and the peers joined to the channel but no chaincode installed

{"component":"CLIENT","timestamp":"2021-12-01T15:51:29.138Z","txnId":"a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e","stage":"Endorsing","message":"addUpdateAssets({\"arguments\":[\"1\",\"2000\"]})"}
{"component":"CLIENT","timestamp":"2021-12-01T15:51:34.366Z","txnId":"a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e","stage":"Submitting","message":""}
{"component":"CLIENT","timestamp":"2021-12-01T15:51:34.375Z","txnId":"a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e","stage":"Submitted","message":""}
{"component":"CLIENT","timestamp":"2021-12-01T15:51:36.463Z","txnId":"a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e","stage":"Failed","message":"unexpected validation code 10"}

Code 10 is an ENDORSEMENT_POLICY_FAILURE. Here are the gateway peer logs

2021-12-01 15:51:32.359 UTC 0286 INFO [endorser] callChaincode -> finished chaincode: basic duration: 1592ms channel=mychannel txID=a3cf83f7
2021-12-01 15:51:34.371 UTC 02b6 INFO [gateway] Submit -> Sending transaction to orderer txID=a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e endpoint=orderer4.example.com:7053
2021-12-01 15:51:36.426 UTC 02d4 ERRO [committer.txvalidator] validateTx -> Dispatch for transaction txId = a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e returned error: validation of endorsement policy for chaincode basic in tx 24:0 failed: implicit policy evaluation failed - 2 sub-policies were satisfied, but this policy requires 3 of the 'Endorsement' sub-policies to be satisfied
2021-12-01 15:51:36.429 UTC 02d6 WARN [validation] preprocessProtoBlock -> Channel [mychannel]: Block [24] Transaction index [0] TxId [a3cf83f72db1dc29820529425101fa590cfcb939c4274107588de7cf5ecc1f9e] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE]

This seems reasonable (other runs produced more than 1 of these which is also expected). Before the adding of the org, only 2 endorsements are needed as the endorsement policy is an implicit majority. If you add another org, then you need 3 for a majority, but this txn only had 2 so fails.

retried this with setting that all 3 orgs must endorse and adding a 4th org and no errors were encountered which was to be expected.

@davidkel
Copy link
Owner Author

davidkel commented Dec 1, 2021

Deploying chaincode didn't affect anything but due to hyperledger/fabric-gateway#338 org4 hasn't actually started endorsing

@davidkel
Copy link
Owner Author

davidkel commented Dec 1, 2021

Changed the endorsement policy to force org4 to endorse and that get's picked up as expected with the usual various errors of

  • ProposalResponseMismatch
  • endorsement policy failure
  • mvcc read conflict

As described when changing an endorsement policy

@davidkel davidkel removed their assignment Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants