anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.39k stars 948 forks source link

Unbond/Deactivate inactive validators #1360

Closed adrianbrink closed 10 months ago

adrianbrink commented 1 year ago

Implement liveness protection.

In particular, the current idea would be to jail a consensus validator who has not voted on enough blocks within some past interval.

Started implementation here: https://github.com/anoma/namada/pull/981

cwgoes commented 10 months ago

We should be able to copy the Cosmos SDK model:

Let me know if you have any questions /cc @grarco @brentstone

brentstone commented 10 months ago

Some initial notes to spec out how to do this specifically in Namada. Please comment.

Not positive if jailing or deactivating is the proper thing to do, or if it even matters. Also please comment on whether we think it is better to call jail_for_liveness upon a new epoch or every block. The downside of calling it upon a new epoch is that we cannot jail/deactivate misbehaving validators until the following epoch, letting them remain for one more whole epoch if they are in consensus.

adrianbrink commented 10 months ago

jail_for_liveness should be a cheap call so I think we can do it every block.

Validators should be jailed but without being slashed and they can unjail themselves.

adrianbrink commented 10 months ago

The threshold for liveness should be something like missed more than 10% of the last 10,000 blocks. That means that the sliding windows is ~12 hours with 5 second blocks, which means that you can be down for about 1.5 hours.

cwgoes commented 10 months ago
adrianbrink commented 10 months ago

bitfield is good.

we can port the code over from the sdk.

brentstone commented 10 months ago

Cool, this sounds good. Chatted with @grarco about what we will do too.

cwgoes commented 10 months ago

Is this really completed already? :open_mouth: