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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slashing Protection Hardening #6948

Closed
nisdas opened this issue Aug 10, 2020 · 5 comments
Closed

Slashing Protection Hardening #6948

nisdas opened this issue Aug 10, 2020 · 5 comments
Assignees
Labels
Discussion Simply a thread for talking about stuff Priority: Medium Medium priority item Security Security Related Issues Tracking Gotta Catch 'Em All
Milestone

Comments

@nisdas
Copy link
Member

nisdas commented Aug 10, 2020

馃拵 Issue

Currently slashing protection for a validator falls into two categories both of which are:

  • Local Slashing Protection
  • Slasher Based Protection

However for a non-technical user it still difficult to configure both of these solutions correctly. This issue will explore certain mitigation we can add to protect a user better.

Background

In medalla we had a user have all 5 of his validators slashed.
https://discordapp.com/channels/476244492043812875/476588476393848832/742069647523840051

The main reason was that he was running 10 validator instances with the same keys and instead of using the same db instance, the user instead used 10 different validator db instances. A mistake like this is easy enough for a non technical user to make
as unless they were acquainted with how volumes work in docker and how containers need to be explicitly stopped. They would assume that everytime running a new validator would stop all the previous instances.

An immediate action item would be to specify the correct docker volume for a validator in our documentation.

Description

Potential hardening solutions:

  1. Add a lock file for our wallets so that multiple validators cannot use it at the same time.

  2. Ensure that each key read from a directory is unique. If there are any duplicates we should exit the validator process.

  3. Beacon node handles multiple repeated keys on their end too. If multiple validator clients are connected, we ensure that each validator client has distinct validator keys. If any of the keys are common we reject the particular validator client from requesting any data and straight away disconnect from it.

  4. This would be a more complex solution, but upon proposing a new attestation, a beacon node checks that it hasn't seen that attestation in a previous block or being propagated in the network. How feasible something like this is would have to be thought carefully as this can have a big negative impact on attestation latency and therefore the validator's resultant inclusion slot.

@nisdas nisdas added Priority: Medium Medium priority item Tracking Gotta Catch 'Em All Security Security Related Issues labels Aug 10, 2020
@shayzluf
Copy link
Contributor

working on adding a lock on wallet

  • Add a lock file for our wallets so that multiple validators cannot use it at the same time.

@shayzluf
Copy link
Contributor

working on design for:

  • Beacon node handles multiple repeated keys on their end too. If multiple validator clients are connected, we ensure that each validator client has distinct validator keys. If any of the keys are common we reject the particular validator client from requesting any data and straight away disconnect from it.

@stefa2k
Copy link

stefa2k commented Aug 28, 2020

working on design for:

  • Beacon node handles multiple repeated keys on their end too. If multiple validator clients are connected, we ensure that each validator client has distinct validator keys. If any of the keys are common we reject the particular validator client from requesting any data and straight away disconnect from it.

I fear this will break my setup in many ways (which worked good and safely!), here are just some:

  • The validators are coupled loose to the beacon (by using haproxy and having failovers configured in there). Therefore there is no "connect" request. To talk to a failover the connect-request would be resent.
  • Validators can connect to one beacon node (and do so regularly) with the same set of keys. They do this in a safe manner by using external slashing protection.
  • Validators can failover via haproxy to another slasher if the primary slasher goes down.

I'm not sure how these new restriction benefit anyone.

@rauljordan
Copy link
Contributor

@nisdas what would be required for successful closure of this issue? We have a few other related ones such as #7076, #7159, and #7161. Would closing those 3 be sufficient for closing this one?

@rauljordan rauljordan added this to the Diamond milestone Nov 3, 2020
@shayzluf shayzluf added the Discussion Simply a thread for talking about stuff label Nov 9, 2020
@rauljordan
Copy link
Contributor

Discussed with @shayzluf that only (2) is a reasonable suggestion we can use today. Moreover, it is already solved as our imported keymanager disallows duplicate keystores

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Simply a thread for talking about stuff Priority: Medium Medium priority item Security Security Related Issues Tracking Gotta Catch 'Em All
Projects
None yet
Development

No branches or pull requests

5 participants