Skip to content
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

Validator client subscription to slashing SSE events #6509

Open
philknows opened this issue Mar 5, 2024 · 6 comments
Open

Validator client subscription to slashing SSE events #6509

philknows opened this issue Mar 5, 2024 · 6 comments
Assignees
Labels
meta-feature-request Issues to track feature requests. scope-security Issues that fix security issues: DOS, key leak, CVEs.

Comments

@philknows
Copy link
Member

Problem description

With the implementation of #6209 to detect slashable events, it still requires either useful infrastructure/3rd party software to take advantage of this feature. An idea is to further extend this into our validator client to benefit from this was brought up by @g11tech.

Solution description

By implementing a feature for alerting VCs of the signed messages, or having the connected validator to subscribe to these events, we can have the validator client itself be aware that one of their local pubkeys is being slashed. Then, we can implement some action (e.g. shutting down the service) to prevent further slashings.

Additional context

No response

@philknows philknows added scope-security Issues that fix security issues: DOS, key leak, CVEs. meta-feature-request Issues to track feature requests. labels Mar 5, 2024
@philknows philknows added this to the Short-Term Features/Issues milestone Mar 19, 2024
@philknows
Copy link
Member Author

Could I give this one to you @nflaig when you're back? This will be useful for us on infrastructure side and anybody else that's running a large number of keys with Lodestar.

@nflaig nflaig self-assigned this Mar 20, 2024
@nflaig
Copy link
Member

nflaig commented Mar 23, 2024

Then, we can implement some action (e.g. shutting down the service) to prevent further slashings.

I am wondering what the correct measure here is because shutting down the VC might not have any effect if people are running it via docker or systemd as it automatically restarts the process and I haven't found a specific exit code we could use to prevent this.

Possible options are

  • shutdown process (as suggested)
  • remove all validators keys from validator store (in-memory only)
  • remove all validators from validator store and if imported, delete keystores from disk
  • possibly implement it on the beacon node side instead, e.g. node stops submitting anything to the network

This will be useful for us on infrastructure side and anybody else that's running a large number of keys with Lodestar.

I am not sure this will be as useful if you are running multiple VC instances as we do as the validator can only keep track of it's own imported keys. A more large scale solution would be a external software that tracks and acts accordingly on all instances.

It really depends what kind of operator error we are expecting that could cause a slashing, will it affect only one VC or potentially all of them?

In any case, the proposed solution of this issue will be valuable for people running just a single VC instance and could still limit the damage caused even if multiple VCs are used.

@nflaig
Copy link
Member

nflaig commented Mar 23, 2024

Also to since this is related to the topic, a way better approach to prevent slashing is by enabling doppelganger protection on every VC as most if not all slashings so far are related to running a second VC instance with the same keys.
And since we implemented #6012 there is basically no downside enabling doppelganger protection other than the first time a key is used it has to wait the 2 epochs.

@philknows
Copy link
Member Author

I discussed this with @nflaig and came to the conclusion that internally for ChainSafe, we can rely on proactive measures such as doppelgänger protection to suit our needs. This is a bit lower on priority now given that there isn't a signal from other Lodestar users that this would be very useful for their setup in some way.

@philknows philknows removed this from the Short-Term Features/Issues milestone Apr 2, 2024
@wemeetagain
Copy link
Member

Closing this issue. We will watch slashing events from external tooling and not add this to our validator client because we can't account for all setups.

@wemeetagain wemeetagain closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@nflaig
Copy link
Member

nflaig commented Oct 22, 2024

I would like to hear from Operators if this feature would be considered useful, I think it's not that hard to implement and best solution it likely to just remove the keys from in-memory store and log a warning + a metric that warns the operator. At least from discussion we had with Luca which developed Vero, this feature seems like something operators want.

Re-opening for now

@nflaig nflaig reopened this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta-feature-request Issues to track feature requests. scope-security Issues that fix security issues: DOS, key leak, CVEs.
Projects
None yet
Development

No branches or pull requests

3 participants