AmbireTech / adex-validator

AdEx validator stack reference implementation: sentry, validator worker
https://www.adex.network
GNU Affero General Public License v3.0
8 stars 11 forks source link

flaw with >2 validators and current follower tick algorithm #4

Closed Ivshti closed 4 years ago

Ivshti commented 5 years ago

The issue is as follows:

Let's say that:

in other words:

// we compare only OUR last approved state to the NewState
// instead, we must compare from the latest state approved by any >=2/3 validators
// otherwise, the leader may perform an invalid state transition from latest approved to a NewState, and trick us into signing it cause we'd be comparing with our own (presumably old)
Ivshti commented 5 years ago

the best solution here would be to restrict this stack to 2 validators only

higher number of validators would require a pBFT process to ensure this can't happen

samparsky commented 5 years ago

@Ivshti Since the current design proposition is a validator set that contains a publisher, an arbiter and an advertiser. Wouldn't this be an issue?

Ivshti commented 5 years ago

@samparsky a few parts of adex-protocol say that the minimal setup is 2 validators; this reference implementation will only support this case initially

the arbitor is not that important with the notion of health, as underreporting will be punished by not delivering impressions anymore

the arbitor has advantages (described in https://github.com/adexnetwork/adex-protocol#validator-consensus) but for now 2 validators is the easiest

Ivshti commented 4 years ago

Closing sine it's just now part of the design to strictly run with 2 validators. It's simpler, has less failure cases and clear game theory.