-
Notifications
You must be signed in to change notification settings - Fork 69
Issue 819 - Fix join channel when importing ordering service #841
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: TsvetanG <[email protected]>
| cert: ordererCerts ? ordererCerts.cert : null, | ||
| private_key: ordererCerts ? ordererCerts.private_key : null, | ||
| }; | ||
| if (!test.cert && !test.private_key && options.requestingMspId) { |
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.
I was able to verify the fix locally and it works as expected. I’m digging into the code to better understand it, and I had a quick question about this block.
From my testing, options.requestingMspId is always empty, so this block never runs. I also tested the fix without this block, and it still works as expected by throwing the appropriate exceptions. I was curious, if there a specific scenario where this block would be triggered, or is it intended for other use cases?
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 , yes requestingMspId is used but when the join is triggered from the peer page. This is when we know exactly the peer that we are joining to the channel and its MSPID. Hence we can use the admin user of the peer to fetch the channel block. The difference when we don't have a peer is that in such case we cannot determine the MSP admin user to use and therefore, we cannot really filter the channels in case we don't have the admin user of the ordering service.
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, I might not fully understand the context, could you provide an example of when this scenario would occur?
When I tested in the Org2 Console (which includes Org1's Ordering Services) with a valid Associate identity, the cert, private_key, and requestingMSP were all present.

However, after I removed the associate identity from the ordering service, the cert and private_key were set to null, which is expected, but requestingMSP was not populated. Instead, an identityInfo object was created.

I'm trying to understand when a case would arise that satisfies the if-statement you mentioned.
|
@TsvetanG - Thank you for raising the PR. NPM Audit is failing for Apollo CI for @babel/helpers and @babel/runtime. Can you please update your branch/fork so we can discuss if we can merge with main branch? |
Yes I will look at that and will let you know when ready |
Type of change
Description
Fixed an issue that causes the joining of a peer on a channel failure when using an imported ordering service.
Issue #819