-
Notifications
You must be signed in to change notification settings - Fork 404
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
[WIP] Experimental integration test runner using microfab #1465
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1465 +/- ##
=======================================
Coverage 55.89% 55.89%
=======================================
Files 105 105
Lines 4507 4507
Branches 688 688
=======================================
Hits 2519 2519
Misses 1435 1435
Partials 553 553
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on selecting the correct endorsing peers.
The following error occurs randomly and can be observed in the GitHub Action logs:
2022-10-26T18:56:56.449Z - error: [TransactionEventStrategy]: constructor: No peers for strategy
2022.10.26-18:56:56.450 +0000 error [connectors/v2/FabricGateway] Failed to perform submit transaction [initMarble] using arguments [marbles_phase_4_0_0_0,red,10,Alice], with error: Error: No peers for strategy
at new TransactionEventStrategy (/tmp/sut/cached/v2.2.14/node_modules/fabric-network/lib/impl/event/transactioneventstrategy.js:49:19)
at new AnyForTxStrategy (/tmp/sut/cached/v2.2.14/node_modules/fabric-network/lib/impl/event/anyfortxstrategy.js:41:1)
at Transaction.MSPID_SCOPE_ANYFORTX [as eventHandlerStrategyFactory] (/tmp/sut/cached/v2.2.14/node_modules/fabric-network/lib/impl/event/defaulteventhandlerstrategies.js:60:27)
at Transaction.submit (/tmp/sut/cached/v2.2.14/node_modules/fabric-network/lib/transaction.js:257:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async V2FabricGateway._submitOrEvaluateTransaction (/home/runner/work/caliper/caliper/packages/caliper-fabric/lib/connector-versions/v2/FabricGateway.js:375:26)
at async V2FabricGateway._sendSingleRequest (/home/runner/work/caliper/caliper/packages/caliper-fabric/lib/connector-versions/v2/FabricGateway.js:168:16)
at async V2FabricGateway.sendRequests (/home/runner/work/caliper/caliper/packages/caliper-core/lib/common/core/connector-base.js:83:26)
at async MarblesInitWorkload.submitTransaction (/home/runner/work/caliper/caliper/packages/caliper-tests-integration/fabric_tests/init.js:72:9)
On trying to debug by setting a breakpoint:
Here, network.channel.endorsers
has only one peer, belonging to Org2, whereas the requested mspId
is of Org1, thus leading to no endorsing peers. This however happens only with SDKs <= v2.2 and doesn't appear with the Fabric Gateway APIs in v2.4. I'm not really sure about the root cause of this issue though.
we shouldn't need to resort to CCAAS can you provide some more info on what you saw
Sorry, I must've had some incorrect configuration when I tested earlier, but now it works and I have updated the PR to use the normal chaincode packaging method.
@CaptainIRS the errors are very odd and the fact they happen in both 1.4 and 2.2 node sdks only with microfab. Not surprised with the fabric-gateway as it does event handing differently. I'll see if I can get someone to look at it too. |
Hello @CaptainIRS ... I've been trying to recreate this problem with Microfab, without much success I'm afraid. I've got two apps here that are using the 2.2 NodeSDK submitting transactions to microfab; it seems completely stable. Chaincode Signature Policy is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mbwhite I have tried using just one channel in CaptainIRS#3, but the same error seems to occur even in this case. (GitHub Action logs: here and here)
@CaptainIRS found the problem!! For microfab the
Added that to my local caliper configuration |
Thank you @mbwhite for investigating. @CaptainIRS Best way is to add
when launching caliper eg
It's interesting that microfab appears to work using the legacy sdks when localhost is set to true for a lot of the time so definitely something that microfab should document. I thought it used hostname for routing and as the endpoint urls get translated to localhost:8080 I wasn't expecting that to work at all. The problem was that the endorsers were being discovered and the endpoints were being translated to the same endpoint of localhost:8080 from org1peer-api.127-0-0-1.nip.io:8080 and org2peer-api.127-0-0-1.nip.io:8080 and thus you could only have one at that endpoint so in some cases was being loaded with the wrong peer for the mspid of the identity. I also suspect that if the chaincode had an AND endorsement policy it would have failed for all submissions as it wouldn't be able to get all endorsements as there would only be 1 endorser in the channel object. |
84beca2
to
2616702
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ad828e7
to
945af2f
Compare
237d5f8
to
35873cf
Compare
0cf6abf
to
bec4ae1
Compare
7053286
to
151dddf
Compare
Signed-off-by: CaptainIRS <[email protected]>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this pull request because microfab is has gone dormant with the maintainers now not involved in hyperledger fabric anymore and it's unlikely to be maintained in the future. |
Some issues/notes as of now:
There seems to be an issue selecting the correct endorsing peers when using the older Fabric SDK (works well using the newer Fabric Gateway API though)Normal installation of chaincode doesn't seem to work in microfab (can only install using CCAS)