This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Discussion: MaxFaultyNodes
and NumValid
wrong math?
#236
Labels
documentation
Improvements or additions to documentation
MaxFaultyNodes
andNumValid
wrong math?Description
If I'm reading the spec correctly from ethereum/EIPs#650, the system can tolerate AT MOST F faulty nodes in a N validator nodes network, where
N = 3F + 1
impliesF = (N - 1)/3
.The function looks like this
Shouldn't this be
I am not sure if this should be a
math.Ceil
ormath.Floor
. I think intuitively it should be a ceiling.Moreover this function
https://github.com/0xPolygon/polygon-sdk/blob/7f2e61d19b63bde38f52925dee4eefc47e03ddf5/consensus/ibft/state.go#L101
is
2F
, but according to the spec it should be2F + 1
. Eventhough this looks wrong, it ends up being okay here because of the greater than https://github.com/0xPolygon/polygon-sdk/blob/7f2e61d19b63bde38f52925dee4eefc47e03ddf5/consensus/ibft/ibft.go#L627 and here https://github.com/0xPolygon/polygon-sdk/blob/7f2e61d19b63bde38f52925dee4eefc47e03ddf5/consensus/ibft/ibft.go#L632but it looks incorrect here.
https://github.com/0xPolygon/polygon-sdk/blob/7f2e61d19b63bde38f52925dee4eefc47e03ddf5/consensus/ibft/ibft.go#L784
Believe it should be greater than, or just change the
NumValid
to be consistent with the spec.Your environment
develop
Steps to reproduce
The text was updated successfully, but these errors were encountered: