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 validators pkg readme #1398

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

add validators pkg readme #1398

wants to merge 7 commits into from

Conversation

ceyonur
Copy link
Collaborator

@ceyonur ceyonur commented Nov 26, 2024

Adds validators pkg readme

@ceyonur ceyonur requested review from darioush and a team as code owners November 26, 2024 17:25
Copy link
Collaborator

@meaghanfitzgerald meaghanfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions are mostly for phrasing and grammar. It would be helpful if the read pointed to the places in Subnet-EVM where these functions exist, and provide example curls (or point to the ones in the docs site).

plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved
ceyonur and others added 4 commits November 27, 2024 17:55
Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Meaghan FitzGerald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
@ceyonur ceyonur enabled auto-merge (squash) November 27, 2024 16:12
Copy link
Contributor

@ARR4N ARR4N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much existing knowledge is a reader assumed to have? If non-negligible, where can they get that knowledge?

plugin/evm/validators/README.md Outdated Show resolved Hide resolved
plugin/evm/validators/README.md Outdated Show resolved Hide resolved

## Validator Manager Struct

`ValidatorManager` struct is responsible for managing the state of the validators by fetching the information from P-Chain state (via `GetCurrentValidatorSet` in chain context) and updating the state accordingly. It dispatches a `goroutine` to sync the validator state every 60 seconds. The manager fetches the up-to-date validator set from P-Chain and performs the sync operation. The sync operation first performs removing the validators from the state that are not in the P-Chain validator set. Then it adds new validators and updates the existing validators in the state. This order off operations ensures that the uptimes of validators being removed and re-added under same nodeIDs are updated in the same sync operation despite having different validationIDs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this ValidatorManager?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it supposed to be the Manager in validators pkg

@ceyonur
Copy link
Collaborator Author

ceyonur commented Dec 2, 2024

How much existing knowledge is a reader assumed to have? If non-negligible, where can they get that knowledge?

I also captured AvalancheGo's uptime manager basics in that readme, so we don't assume any existing knowledge. LMK if anyhing is not clear or you think it requires additional context.

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.

3 participants