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

Integrate fetching the validator index from BN. #96

Open
Zacholme7 opened this issue Jan 13, 2025 · 2 comments
Open

Integrate fetching the validator index from BN. #96

Zacholme7 opened this issue Jan 13, 2025 · 2 comments
Labels

Comments

@Zacholme7
Copy link
Member

Description

We need to fetch the Validator index for each Validator in the network from the BN. This requires refactoring the entire execution layer to async just to fetch the index, so we decided it is best to push it downstream. Most likely, this will just be some long running task that will periodically fetch the index for all new validators and store it into the database. This is what is done in the go-ssv client for reference.

@dknopik
Copy link
Member

dknopik commented Jan 14, 2025

The Lighthouse duties services can do this for us! https://github.com/dknopik/anchor/blob/7ce3eb6f665571fbeb117c18711b6cc0bd92463f/anchor/validator_store/src/lib.rs#L508-L526

Basically, I assumed we already had the index (because we have it non-optional in the model), but we can change this impl to update the database 👍

@Zacholme7
Copy link
Member Author

Zacholme7 commented Jan 14, 2025

Cool, yep it was the plan to include the index at the EL but didnt pan out so its currently just being defaulted to 0. Easier to give a default value rather than make it optional for state reconstruction on restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants