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

Organize validator set #560

Open
junha1 opened this issue Oct 20, 2020 · 0 comments
Open

Organize validator set #560

junha1 opened this issue Oct 20, 2020 · 0 comments

Comments

@junha1
Copy link
Contributor

junha1 commented Oct 20, 2020

Types

Eventually, we will have only 3 types for validators.

  1. ctypes::Validator - It has two fields: public_key and weight.
  2. ctypes::ValidatorSet - It is a newtype of Vec<Validator>, but it save it sorted, and provides methods to save to/load from state. Also, its hash will be directly written in block header.
  3. foundry_graphql_engine::Validator GraphQL resolver for validator.

All other types will be completely removed. (NextValidatorSet, CurrentValidatorSet, SimpleValidator, WeightOrderedValidators, ...)

Naming

Validators -> Validator set
delegation/deposit/ ... -> weight

Next / Current

Both will be saved, but share same type ValidatorSet.

Coordinator-Module interface

Will be asked to return only Vec<Validator> as the validator set.

Test

We have to add various e2e tests that involve multiple nodes + varying validator set.

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 a pull request may close this issue.

1 participant