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

Feature: Liveness endpoint for doppelganger protection interop #4453

Closed
yorickdowne opened this issue Oct 6, 2021 · 1 comment
Closed

Feature: Liveness endpoint for doppelganger protection interop #4453

yorickdowne opened this issue Oct 6, 2021 · 1 comment
Assignees

Comments

@yorickdowne
Copy link

yorickdowne commented Oct 6, 2021

Description

I'd love to see a liveness endpoint implemented, at /eth/v1/validator/liveness. This would make it possible to use the doppelganger protection in a Lighthouse validator client with Teku, and thus Infura.

@rolfyone rolfyone self-assigned this Oct 6, 2021
@rolfyone
Copy link
Contributor

Some reading / resources:
https://hackmd.io/Szjk_d1gTrWGuUsLojmoqA
https://github.com/sigp/lighthouse/blob/stable/validator_client/src/doppelganger_service.rs

https://github.com/sigp/lighthouse/blob/7c88f582d955537f7ffff9b2c879dcf5bf80ce13/beacon_node/beacon_chain/src/beacon_chain.rs#L3757-L3782

https://github.com/sigp/lighthouse/blob/7c88f582d955537f7ffff9b2c879dcf5bf80ce13/beacon_node/http_api/src/lib.rs#L2139-L2180

I made an attempt at observing liveness based on state, but it's not really as reliable as i'd like. Once we're on Altair it does improve, and but a validator can attest as much as 32 blocks late, so it might be a little dangerous to rely completely on state.

Lighthouse has a working implementation of this, and lots of corner cases etc have been identified, which would help with testing of an overall doppelganger protection solution.

rolfyone added a commit to rolfyone/teku that referenced this issue Oct 15, 2021
This cache is specifically needed to service rest api requests, so is not required if we are not using the rest api.

The rest endpoint is yet to be approved, so leaving it marked experimental until the endpoint is finalized.

Currently feature flagged with 'Xbeacon-liveness-tracking-enabled', which is a hidden CLI option.

Enabling will keep a 2d array of as much as 3x (the max validator index+1000) to maintain where validators have been seen.

partially addresses Consensys#4453

Signed-off-by: Paul Harris <[email protected]>
rolfyone added a commit that referenced this issue Oct 18, 2021
* Add a cache to track liveness of validators

This cache is specifically needed to service rest api requests, so is not required if we are not using the rest api.

The rest endpoint is yet to be approved, so leaving it marked experimental until the endpoint is finalized.

Currently feature flagged with 'Xbeacon-liveness-tracking-enabled', which is a hidden CLI option.

Enabling will keep a 2d array of as much as 3x (the max validator index+1000) to maintain where validators have been seen.

partially addresses #4453

Signed-off-by: Paul Harris <[email protected]>
rolfyone added a commit to rolfyone/teku that referenced this issue Oct 21, 2021
partially addresses Consensys#4453

Signed-off-by: Paul Harris <[email protected]>
rolfyone added a commit that referenced this issue Oct 24, 2021
* Acceptance test for liveness endpoint

partially addresses #4453

Signed-off-by: Paul Harris <[email protected]>
@rolfyone rolfyone added the blocked by another PR/issue 💔 This issue or pull request is blocked by another label Nov 4, 2021
@mehdi-aouadi mehdi-aouadi self-assigned this Oct 4, 2022
@rolfyone rolfyone removed their assignment Oct 4, 2022
@rolfyone rolfyone removed the blocked by another PR/issue 💔 This issue or pull request is blocked by another label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants