SmartBFT-Go / fabric

Integration of the BFT consensus library into Fabric
Apache License 2.0
31 stars 11 forks source link

Enquiry: How to bring up a Fabric network with a smartbft orderer node #281

Open gigabyte132 opened 2 years ago

gigabyte132 commented 2 years ago

Hi, I am a 3rd year university student in computer science, and my final project is related to comparing the performance and scalability of two consensus algorithms on top of Hyperledger Fabric. I wanted to compare the crash-fault tolerant Raft consensus with smartbft. I am not sure on how to plug the smartbft consensus in fabric and any help would be appreciated. Thank you in advance.

sardChen commented 2 years ago

Hi, I am a 3rd year university student in computer science, and my final project is related to comparing the performance and scalability of two consensus algorithms on top of Hyperledger Fabric. I wanted to compare the crash-fault tolerant Raft consensus with smartbft. I am not sure on how to plug the smartbft consensus in fabric and any help would be appreciated. Thank you in advance.

Using the first-network example in https://github.com/SmartBFT-Go/fabric-samples

gigabyte132 commented 2 years ago

Hi, I am a 3rd year university student in computer science, and my final project is related to comparing the performance and scalability of two consensus algorithms on top of Hyperledger Fabric. I wanted to compare the crash-fault tolerant Raft consensus with smartbft. I am not sure on how to plug the smartbft consensus in fabric and any help would be appreciated. Thank you in advance.

Using the first-network example in https://github.com/SmartBFT-Go/fabric-samples

Is there a way to do it on Fabric version 2.x instead of 1.4? Also the 1.4 BYFN example seems broken, the orderer nodes crash instantly when trying to run it, because of some weird divide by zero error, the config files for the network were broken from the get go, I fixed some of the issues but I keep running into more.

yacovm commented 2 years ago

@gigabyte132 is this still relevant? can you give more info about the logs? how do they crash? what do they print? etc.

gigabyte132 commented 2 years ago

Hi, @yacovm I managed to get a test network running with multiple orderers and peers, created a channel, joined the channel, set anchor peers and installed and invoked chaincode, the issue right now is that I'm having trouble writing a client. I'm using the modified version of the fabric-sdk-go, and evaluate transactions seem to work just fine. When it comes to submitting a transaction (Updating an entry or creating a new record, it gets stuck in a loop with no error message just that it times out after a while. I'm also having trouble running benchmarks with caliper, as all the orderers work on port 7050 inside docker, and different ones outside docker, caliper has trouble with multiple orderers and spits out this error: [DiscoveryService]: _buildOrderer[mychannel] - Unable to connect to the discovered orderer orderer0.org3.fyporg.org:7050 due to Error: Failed to connect before the deadline on Committer- name: orderer0.org3.fyporg.org:7050, url:grpcs://localhost:7050, connected:false, connectAttempted:true, It doesn't complain about the first orderer from org1 but it does about all the others

I should probably mention that this is on fabric 2.3

yacovm commented 2 years ago

OK this seems like a general Fabric environment problem, not a BFT one. Did you try to use the existing regular fabric samples? Perhaps start there with Raft and then just change the docker images to point to BFT and change the script that creates the channel (that's the only change you need for BFT).

gigabyte132 commented 2 years ago

@yacovm I started with a custom script almost from stratch and modified it to my needs, throughout this day I fixed the caliper problems, by adjusting the orderer endpoints in configtx.yaml and benchmarks seem to run fine, I know why Explorer doesn't work as the block validation policy SMARTBFT is not defined and I was wondering if there was a modified image of explorer that supports that or just changing the block validation policy would still work while keeping everything BFT. Client application still gets timed out on submit transactions and works fine on evaluate transactions.

yacovm commented 2 years ago

Hop on to discord and ping me there.

saggnik commented 2 years ago

@gigabyte132 I was working on a similar university project and have faced a few roadblocks while trying to setup my network I was wondering if you could offer me some guidance for the same on how to do it. Any help is much appreciated. Also, to prevent extending this thread, maybe you can ping me on discord if you want.