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-network-k8s: Introduce initial support for BFT orderers #1294

Merged

Conversation

satota2
Copy link
Contributor

@satota2 satota2 commented Jan 21, 2025

This PR adds initial support for BFT orderers in the test-network-k8s.
When TEST_NETWORK_ORDERER_TYPE is set to bft, the network launches four orderers configured with SmartBFT.

I plan to update the documentation after this PR is merged.

How to try

cd test-network-k8s

export TEST_NETWORK_FABRIC_VERSION=3.0
export TEST_NETWORK_ORDERER_TYPE=bft

./network kind
./network cluster init
./network up
./network channel create

./network chaincode deploy asset-transfer-basic ../asset-transfer-basic/chaincode-java
./network chaincode invoke asset-transfer-basic '{"Args":["InitLedger"]}'
./network chaincode query  asset-transfer-basic '{"Args":["ReadAsset","asset1"]}'

@satota2 satota2 requested a review from a team as a code owner January 21, 2025 05:50
@bestbeforetoday
Copy link
Member

For some reason, this does not work for me. I am running on Ubuntu 24.04.1 with Go 1.23.5 and Kind 0.26.0. I tested with Fabric binaries and Docker images at v3.0.0, the CA at v1.5.13 and TEST_NETWORK_FABRIC_VERSION environment variable set to 3.0.

With the TEST_NETWORK_ORDERER_TYPE environment variable unset, both the current main branch and this pull request branch ran successfully.

When using this pull request branch and the TEST_NETWORK_ORDERER_TYPE environment variable set to bft, I see the following error when running ./network channel create:

Fabric image versions: Peer (3.0.0), CA (1.5.13)
Fabric binary versions: Peer (3.0.0), CA (1.5.13)
Creating channel "mychannel":
✅ - Registering org Admin users ...
✅ - Enrolling org Admin users ...
✅ - Creating channel MSP ...
☠️ - Creating channel genesis block ...
main.main()
        /home/runner/work/fabric/fabric/cmd/configtxgen/main.go:237 +0x77d

Between each test I cleared down the environment using ./network down followed by ./network unkind.

This patch adds initial support for BFT orderers in the test-network-k8s.
When `TEST_NETWORK_ORDERER_TYPE` is set to `bft`, the network launches
four orderers configured with SmartBFT.

Signed-off-by: Tatsuya Sato <[email protected]>
@satota2 satota2 force-pushed the test-network-k8s-initial-bft-support branch from 8902fba to 0ac7f1b Compare January 27, 2025 05:12
@satota2
Copy link
Contributor Author

satota2 commented Jan 27, 2025

@bestbeforetoday
Thank you for testing and providing detailed feedback. My apologies for the oversight—I missed adding the configtx template file for BFT in this PR. I’ve updated the PR to include the necessary configtx template file. Could you please review and test again with the updated changes?

Copy link
Member

@bestbeforetoday bestbeforetoday left a comment

Choose a reason for hiding this comment

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

This works well for me now. I wonder if the automated build should also be updated to test both non-BFT and BFT cases to avoid any future regressions?

@bestbeforetoday bestbeforetoday merged commit 714bcb0 into hyperledger:main Jan 27, 2025
38 checks passed
@satota2
Copy link
Contributor Author

satota2 commented Jan 28, 2025

@bestbeforetoday
Thank you for confirming and merging. I agree that the automated build should be updated to test both non-BFT and BFT cases. I plan to work on this next.

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