-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Research] Multiple classes of disablement #2005
Comments
Let me answer the GRANDPA parts first
At the moment, only equivocation, voting twice in one round. The other things we'd want to slash for is more complicated because it requires a challenge-response protocol (see section 4.1 of https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf ).
For a few offences, we waste no resources whatsoever and performance is unnaffected, maybe even slightly better. When we have over 1/3 of validators equivocating, then we can finalise two different blocks. The is pretty bad and we are probably going to have to hardcode some exception into future clients when it happens. When the finalised fork happens, we should ignore GRANDPA for the current validator set. Having 1/3 of the validator set in a session not show up is in theory less bad, but we still haven't finished putting in the special cases that would allow us to survive it so maybe that is as bad or worse in practice right now.
No, with one exception that is not quite honest but has occurred multiple times. A validator running multiple nodes with the same identity will equivocate. In principle there is a key security strategy to prevent it - we would store some keys in memory so this would only occur when cloning a VM somehow rather than just copying the HD for a new node. The issue is that now we might have to deal with liveness - what if a bug requires all validators to restart, would this halt GRANDPA? So no easy fix on the horizon.
Slashing is actually quite small for a single offence. It gets bigger the more validators equivocate at the same time, because a single offence is no threat. If a validator runs two nodes as above and is not disabled for a GRANDPA equivocation, it will carry on equivocating in GRANDPA and also in BA. A single equivocation in BA does affect our performance and has a bigger slash. In GRANDPA itself, there is no problem allowing an isolated equivocating node to carry on voting. Under the two nodes situation, in many round both nodes will vote for the same thing, which shouldn't be an equivocation and usefully contributes. When they equivocate, there is no harm. Also slashing in GRANDPA right now, and any future disablement, has no affect on the validators for the current session, it only means that they will not be included in the authority set for te next session. Light clients of GRANDPA, including for bridges and warp sync, might go out of consensus without that. But equivocating in GRANDPA should cause disablement in BA as soon as possible. Also we should watch out for not getting multiple slashes for continued equivocation.
It's not even an optimisation, let alone a requirement, for GRANDPA itself but it does interact with BA.
Because disabling does not and should not affect the current session, the obvious issue with talkng out a 1/3 of validators and stalling finality is a non-issue. So we could go down to 4 nodes, as long as it is at all reasonable that we maintain 2/3 honesty. But then if GRANDPA doesn't fork, what reason would an attacker have to equivocate? If we only take out honest nodes, we shouldn't be disabling at all because it reduces our tolerance for bad guys. If it did finalise different forks, we should disable all equivocators, even if it over 1/3 of all validators, for the next session.
GRANDPA disablement should not take effect in the current session. As long as that holds true, this might not be so bad.
In GRANDPA's case, not at all. But BA equivocation is a headache. |
How is this research coming along? Does it threaten our goal to have disabling done by EoY? |
All good. This seems to be resolved, one class is fine. |
Still an open investigation.
Disabling strategy and affect 3 distinct systems:
* focusing on backing, approvals and disputes so all PVF based activities
Parachain consensus disabling will work as described in 784. As currently proposed it does not affect GRANDPA at all and suggests not affecting block authoring as well. So do we potentially need a second type of disabling, or maybe even three types? Having a single type would be preferred due to a simpler design.
Preliminary research:
GRANDPA TODOs (some are trivial foundations):
Block Authoring (BA) TODOs (some are trivial foundations):
Considerations:
Naive exploration - Single class approach TODOs:
The text was updated successfully, but these errors were encountered: