-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Improve BFT sample on test-network #1083
Conversation
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.
There is a contradiction in the information being added. Ideally we would add code to prevent users from specifying both -ca and -bft if that combination isn't currently supported although this could be done in a different PR.
test-network/scripts/utils.sh
Outdated
println " \033[0;32mup\033[0m -ca -bft -r -d -s -verbose" | ||
println " \033[0;32mup createChannel\033[0m -ca -bft -c -r -d -s -verbose" |
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.
This is in contradiction with the note added "that currently this sample does not yet support the use of consensus type BFT and CA together", isn't it?
test-network/scripts/utils.sh
Outdated
println " \033[0;32mup createChannel\033[0m -ca -bft -c -r -d -s -verbose" | ||
println " \033[0;32mcreateChannel\033[0m -bft -c -r -d -verbose" |
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.
same here.
ade52a4
to
b287e75
Compare
@lehors Thank you for your reviews. I fixed the PRs based on your comments and submited it.
Since there are cases where up command is executed separately, I have added check logic to prevent createChannel using BFT orderer on CA-enabled Fabric network. |
## User attempts to use BFT orderer in Fabric network with CA | ||
if [ $BFT -eq 1 ] && [ -d "organizations/fabric-ca/ordererOrg/msp" ]; then | ||
fatalln "Fabric network seems to be using CA. This sample does not yet support the use of consensus type BFT and CA together." | ||
fi |
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.
This test should be done after parsing the command line arguments so that it is also triggered if one simply does: "./network.sh up -ca -bft"
This patch includes: - Fixed a minor bug in the parsing of the BFT flag - Added check for when a user attempts to use BFT orderer in Fabric network with CA - Update of printHelp for use of the BFT flag - Fixed explanations Signed-off-by: Tatsuya Sato <[email protected]>
b287e75
to
5c5175c
Compare
@lehors Thank you for your comments. The original logic is also retained to check the following case: ./network.sh up -ca
./network.sh createChannel -bft Please confirm the updated PR. |
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.
That works. Thank you!
This patch includes: