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

Add logic to populate initial node identity from stake table #2099

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

Ayiga
Copy link
Member

@Ayiga Ayiga commented Oct 2, 2024

Closes #2098

This PR:

Modifies the behavior of DataState::new so that it populates its node identity list from the information contained within the passed in StakeTable instead of just creating an empty list by default.

It was noticed that the initial list of node identities does not consider the public
keys listed in the stake table.  This can easily be demonstrated by launching the
`node-metrics` binary with `ESPRESSO_NODE_VALIDATOR_STAKE_TABLE_SOURCE_BASE_URL`
and `ESPRESSO_NODE_VALIDATOR_LEAF_STREAM_SOURCE_BASE_URL` populated, but missing
`ESPRESSO_NODE_VALIDATOR_INITIAL_NODE_PUBLIC_BASE_URLS`.

In this case the list of node identities will be empty, and the information coming down
to consuming clients will be missing all node identities.

The fix is to modify the `DataState` structure so that it is initially populated with
information from the passed in stake table.
@Ayiga Ayiga force-pushed the ts/fix/initial-missing-node-identity branch from 7bbadd4 to 93051ad Compare October 3, 2024 13:35
@Ayiga Ayiga merged commit a619d1a into main Oct 3, 2024
15 checks passed
@Ayiga Ayiga deleted the ts/fix/initial-missing-node-identity branch October 3, 2024 15:24
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

Successfully merging this pull request may close these issues.

Node Validator doesn't populate it's initial node identity information with the passed in stake table
2 participants