Consensys / quorum-kubernetes

Helm charts for Hyperledger Besu and GoQuorum
Apache License 2.0
120 stars 129 forks source link

Validators `Fatal: Consensus not specified. Exiting!` for GoQuorum Raft Deployment #161

Closed yeroc-sebrof closed 2 years ago

yeroc-sebrof commented 2 years ago

Hi there,

I am trying to deploy a GoQuorum cluster with these helm charts, I've gotten quite accustomed with the Besu charts in this repo but I wanted to have a go at the raft consensus algorithm so I've deployed a new AKS cluster for giving GoQuorum a go.

After helm install genesis ... when I try to deploy validators they won't boot with the following error message in the container logs: Fatal: Consensus not specified. Exiting!.

I had a look into the genesis configmap with k get configmaps -n quorum goquorum-genesis -o yaml and I see that any particular algorithm object isn't in the JSON like it is in the YAML. I sought out the following genesis file for raft which indeed doesn't suggest that raft writes anything to the genesis file: https://consensys.net/docs/goquorum/en/stable/configure-and-manage/configure/genesis-file/genesis-options/

Instead it looks like raft requires that you pass the following argument to the cli: https://consensys.net/docs/goquorum/en/latest/configure-and-manage/configure/consensus-protocols/raft/#:~:text=To%20enable%20Raft%20consensus%2C%20specify%20the%20--raft%20command%20line%20option%20when%20starting%20GoQuorum

When I have a look at helm/charts/goquorum-node/templates/node-statefulset.yaml this --raft doesn't appear present.

Please let me know if I've given enough information, I've followed the azure & helm READMEs to the letter so that should answer all of the questions on what I have done so far that I've not explicitly said here. I'm aware this could be entirely a me issue that I am reporting as I'm sure the raft algorithm will have been deployed at least once to confirm it works. Any help would be amazing with this one.

Cheers, Corey

joshuafernandes commented 2 years ago

Hello @yeroc-sebrof

Thanks for raising this. The charts in this repo are designed to be for use in prod networks and the raft algorithm is not suitable for prod networks (https://consensys.net/docs/goquorum/en/latest/configure-and-manage/configure/consensus-protocols/raft/?h=raft), hence they do not include it. Instead we recommend the use of something like the QBFT consensus algorithm

Cheers

yeroc-sebrof commented 2 years ago

Ok thank you @joshuafernandes I'll leave this closed then but I'm confused if raft isn't supported why it's an option that's listed in the Genesis configs

joshuafernandes commented 2 years ago

:+1: we use the quorum genesis tool as our goto tool for all things genesis config & keys related and is used in the Quick start and here too. In the Dev Quickstart you can use it for Raft, as its intended for dev. In the charts though we don't support Raft as they aimed at production setups where users want resiliency and byzantine fault tolerance (granted there is a tradeoff for speed).

If you really need to use Raft, the simplest option is to fork this repo and edit the genesis job to suit your reqs, but the recommendation is IBFT or QBFT for prod