hyperledger-labs / SmartBFT

Implementation of the SmartBFT consensus library (https://arxiv.org/abs/2107.06922)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not allow node ID=0

tock-ibm opened this issue · comments

Do not allow node IDs to be 0, start from 1.

Why:

  • protobuf unmarshals nil slices into ints that are 0 so an unmarshaling of protobuf of an empty slice means a zero value everywhere and it passes without errors.
  • the default value of of SelfID in config is 0; catch when users forget to set it correctly.