-
Notifications
You must be signed in to change notification settings - Fork 304
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
7707 validator slashing protection #7826
Conversation
3394dbb
to
df5c7fc
Compare
When the VC is used with a remote BN that doesn't support the |
b8fa16d
to
81cba1a
Compare
teku/src/main/java/tech/pegasys/teku/cli/options/ValidatorOptions.java
Outdated
Show resolved
Hide resolved
...in/java/tech/pegasys/teku/validator/client/slashingriskactions/SlashedValidatorShutDown.java
Outdated
Show resolved
Hide resolved
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.
Looks good, just nit comments
infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/StatusLogger.java
Show resolved
Hide resolved
.../main/java/tech/pegasys/teku/validator/client/slashingriskactions/SlashedValidatorAlert.java
Outdated
Show resolved
Hide resolved
...in/java/tech/pegasys/teku/validator/client/slashingriskactions/SlashedValidatorShutDown.java
Outdated
Show resolved
Hide resolved
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorTimingActions.java
Outdated
Show resolved
Hide resolved
.../java/tech/pegasys/teku/validator/remote/eventsource/EventSourceBeaconChainEventAdapter.java
Show resolved
Hide resolved
943bb98
to
4aa2393
Compare
teku/src/main/java/tech/pegasys/teku/cli/options/ValidatorOptions.java
Outdated
Show resolved
Hide resolved
im not sure where to test so general observation... This would be hard to replicate on a network, slashings aren't super common so we might end up not seeing it, but we'd be easily able to see we don't trigger if a slashing we don't care about arrives at a low level i assume... |
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.
- Let's rename ValidatorIndexProvider -> OwnedValidatorIndexProvider for clarity
- Please also please open issue for acceptance test or you could just post draft PR
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorTimingActions.java
Outdated
Show resolved
Hide resolved
validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorTimingActions.java
Outdated
Show resolved
Hide resolved
teku/src/main/java/tech/pegasys/teku/cli/options/ValidatorOptions.java
Outdated
Show resolved
Hide resolved
...va/tech/pegasys/teku/validator/client/slashingriskactions/DoppelgangerDetectionShutDown.java
Outdated
Show resolved
Hide resolved
...java/tech/pegasys/teku/validator/client/slashingriskactions/SlashingRiskDetectionAction.java
Outdated
Show resolved
Hide resolved
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.
LGTM
37dcf9e
to
b9fea7a
Compare
b9fea7a
to
fc6e725
Compare
data/provider/src/main/java/tech/pegasys/teku/api/NodeDataProvider.java
Outdated
Show resolved
Hide resolved
...ator/remote/src/main/java/tech/pegasys/teku/validator/remote/sentry/SentryBeaconNodeApi.java
Outdated
Show resolved
Hide resolved
only minor things - may be worth a demo to show it working... |
d3f42a4
to
d99c2fa
Compare
@rolfyone and @zilm13 fyi, I pushed these lasts changes: d99c2fa in order to handle the use case when the BN/VC are running in a single process and thus not using SSE. I tested both use cases and they both work (remote BN and single process VC/BN) |
cc6ae90
to
0c40f8f
Compare
teku/src/main/java/tech/pegasys/teku/cli/options/ValidatorOptions.java
Outdated
Show resolved
Hide resolved
...in/java/tech/pegasys/teku/validator/client/slashingriskactions/SlashedValidatorShutDown.java
Outdated
Show resolved
Hide resolved
infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/StatusLogger.java
Outdated
Show resolved
Hide resolved
My main thought is theres a lot of renaming in this and it makes it a lot harder than it needs to be to review. this kind of cleanup should be kept outside of substantive changes, it's just good practice and probably would have made this not look like a 'big pr' that i hate so much. |
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.
as outlined, lets come up with a plan for this feature.
Few remarks here:
|
I think it would be valuable to have AT tests both for separate VC and single node BN+VC as far as we found it's different cases |
.../beaconchain/src/main/java/tech/pegasys/teku/services/beaconchain/BeaconChainController.java
Show resolved
Hide resolved
.../beaconchain/src/main/java/tech/pegasys/teku/services/beaconchain/BeaconChainController.java
Show resolved
Hide resolved
remarks / conversation welcome. imo this feature is yet to meet our definition of done, and we can continue on this path this time, but in future (im sure i said that last time) i have a very strong preference for not following this methodology. I'm not sure I can make that any clearer at this point. |
My suggestion:
Alternatively use this as a starting point, break it down, as previously suggested. |
PR Description
Add
--shut-down-when-validator-slashed-enabled
option to enable Teku shutdown when a validator gets slashed.When using a remote BN, this option requires the BN to support the new
attester_slashing
andproposer_slashing
SSE events.When running VC only, in order to ensure BN backward compatibility, the VC will subscribe to the
attester_slashing
andproposer_slashing
SSE events only when the--shut-down-when-validator-slashed-enabled
is enabled (in addition to thehead
events) otherwise it will only subscribe to thehead
events.Fixed Issue(s)
fixes #7707
Documentation
doc-change-required
label to this PR if updates are required.Changelog