-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add a cache to track liveness of validators #4489
Conversation
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]>
Signed-off-by: Paul Harris <[email protected]>
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.
Sorry, loads of comments but this is actually very good. :)
.../java/tech/pegasys/teku/beaconrestapi/v1/validator/PostValidatorLivenessIntegrationTest.java
Outdated
Show resolved
Hide resolved
.../java/tech/pegasys/teku/beaconrestapi/v1/validator/PostValidatorLivenessIntegrationTest.java
Outdated
Show resolved
Hide resolved
data/provider/src/main/java/tech/pegasys/teku/api/NodeDataProvider.java
Outdated
Show resolved
Hide resolved
data/provider/src/main/java/tech/pegasys/teku/api/NodeDataProvider.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCache.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCache.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCache.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCache.java
Outdated
Show resolved
Hide resolved
...ion/src/main/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCache.java
Outdated
Show resolved
Hide resolved
...src/test/java/tech/pegasys/teku/statetransition/validatorcache/ActiveValidatorCacheTest.java
Show resolved
Hide resolved
Signed-off-by: Paul Harris <[email protected]>
Signed-off-by: Paul Harris <[email protected]>
Signed-off-by: Paul Harris <[email protected]>
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. I think it may be worth a follow up PR to add a check that validators show up as live in an AT. Just that this isn't an API we'd use much so if some part of the wiring broke we might not notice otherwise but a simple sanity test would avoid that.
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]
Documentation
documentation
label to this PR if updates are required.Changelog