linera-io / linera-protocol

Main repository for the Linera protocol
Apache License 2.0
1.24k stars 153 forks source link

When trying validators in random order, take weights into account. #2616

Open afck opened 1 week ago

afck commented 1 week ago

If a validator has five times less weight its misbehavior should do five times less harm. So whenever we try to obtain something sequentially from the different validators, in order, we should not just shuffle the vector: the validators should be picked with a probability proportional to their weights. That way, a validator with very little stake can only cause very few delays.

deuszx commented 1 week ago

This also means that a validator with five times the stake can cause five times the censorship, doesn't it?

afck commented 1 week ago

In those places where we do that (search shuffle in local_node.rs) we only download things that we immediately verify. So the first validator in line can't censor anything there, they can just refuse to answer and thereby cause a delay until we ask the next one.