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

Generate crypto using CA for BFT consensus fix #1286

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

Conversation

cclchd-soundaryaayyappan

Bug Description:
Encountered an issue in fabric-samples version 3.0 where deployment of ordering org with BFT consensus is providing error at generating artifacts step using CA.

Steps to Reproduce:
Run generate_artifacts.sh script with arguments included like ./generate_artifacts -o BFT -ca

Expected Behavior:
It should generate crypto-config and channel-artifacts required for the deployment.

Environment:
fabric-samples version: 3.0
Hyperledger Fabric version: 3.0
OS: Ubuntu 22.04

Changes done to fix it:
Make below changes,

  1. ca/createEnrollments.sh -> Updated line 79 from

registerAndEnroll "5052" "orderer4" "orderer4pw" "orderer" "" "${orderer4_dir}" "${orderer_org}" "${orderer_org_tls}"
to
registerAndEnroll "5052" "orderer4" "orderer4pw" "orderer" "" "${orderer4_dir}" "${orderer_org_dir}" "${orderer_org_tls}"

  1. Updated below Identity field in all 4 orderers in bft-config/configtx.yaml

from

Identity: ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem
to
Identity: ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/cert.pem

@cclchd-soundaryaayyappan cclchd-soundaryaayyappan requested a review from a team as a code owner December 30, 2024 06:18
@@ -287,28 +287,28 @@ Profiles:
Host: 127.0.0.1
Port: 6050
MSPID: OrdererMSP
Identity: ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem
Identity: ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/cert.pem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will break the default scenario where cryptogen is used.
Maybe when the certs are created using CA in createEnrollments.sh we need to copy the pem file to the existing name produced by cryptogen.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denyeart Thanks for the review and comment. You're right that these changes will affect the default scenario where the cryptogen is used.

But the changes I mentioned in the files is completely related to the orderer service using Fabric CA. When I try to deploy ordering service with BFT consensus, generation of crypto is happening only if we made these changes, otherwise unable to deploy such a configuration of ordering nodes.

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.

2 participants