linera-protocol icon indicating copy to clipboard operation
linera-protocol copied to clipboard

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

Open afck opened this issue 1 year ago • 3 comments

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.

afck avatar Oct 14 '24 12:10 afck

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

deuszx avatar Oct 14 '24 12:10 deuszx

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.

afck avatar Oct 14 '24 12:10 afck

Not sure if this is still needed. Instead, maybe Client::download_certificates needs a similar treatment as https://github.com/linera-io/linera-protocol/pull/3232? Probably needs discussion, at least.

afck avatar Feb 05 '25 16:02 afck