-
Notifications
You must be signed in to change notification settings - Fork 996
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
Not allow slashed validator to become a proposer #3175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree this is a nice to have and agree that we'd need to put this into a scheduled hardfork rather than post-facto slipping it in there.
We should start a D-star-name feature list for consideration
f5ea307
to
fb04ad1
Compare
The change has been moved to Deneb. Unfortunately, we can't produce test vectors covering this change as blocks proposed by slashed validators are invalidated by |
Side effect of the proposed fix is that Suggested workaround is to read |
Is there an explicit test for this added? |
yeah, it's annoying that you have to do more pre-processing to make a test "correct" but clients complain that our tests aren't holistically correct enough anyway... so it's probably okay with sufficient helpers |
Not yet, I thought I'd first outline all required changes and check if we want to proceed with them considering increased complexity. We will have to add tests for every affected function, namely |
Is there any safety issue that this PR addresses? I feel like this may become relevant if there are tons of slashed validators, but while this isn't the case, it adds extra complexity to epoch transition and a vector for consensus failure without any gains in security nor UX on the network. While I don't disagree with the proposed change, it does seem like trying to fix what isn't broken, or simply a cosmetic change that looks nicer on paper but it's uglier in code. |
This fix avoids missed slot in the case when slashed validator is supposed to propose a block in the next few epochs (exact number of epochs depends on the churn). The probability of that to happen in case of one validator slashing can be roughly estimated using the following formula: If say Could you please explain why epoch processing is affected? Is this because of potential increase of the |
Update on tests:
I am not 100% sure that we want to modify |
Thoughts on reducing the diff footprint by doing the following. The idea is to overload the core
|
Great simplification 👍 Assuming block header is always inserted into a state by the |
Closing in favour of #3371 |
Checks if validator is slashed in the beacon block proposer selection.
There is a slight contradiction in the spec where it is allowed for a slashed validator to become a proposer while a block from slashed proposer is rejected. Considering a trivial possibility of this contradiction to take into effect, this change is more like a cosmetic fix. Opening a PR to see whether it will have any traction.
If we decide to merge we may also want to cover this case with a test (and fix broken tests).
UPD: We would need a HF to roll out this change, otherwise, one may slash itself (if eligible to propose) and induce a network split.
This change doesn't affect processing historical blocks as blocks proposed by slashed validators couldn't be included into canonical chain.