Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TsvetanG
Copy link

Type of change

  • Bug fix

Description

Fixed an issue that causes the joining of a peer on a channel failure when using an imported ordering service.
Issue #819

@@ -585,6 +588,18 @@ class OrdererRestApi {
cert: ordererCerts ? ordererCerts.cert : null,
private_key: ordererCerts ? ordererCerts.private_key : null,
};
if (!test.cert && !test.private_key && options.requestingMspId) {
Copy link
Contributor

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?

Copy link
Author

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.

@ketulsha
Copy link
Contributor

ketulsha commented Apr 9, 2025

@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?

@TsvetanG
Copy link
Author

TsvetanG commented Apr 9, 2025

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants