CodeChain-io / CodeChain-io/foundry
Organize validator set
- Vorherrschende Sprache
- Rust
- Sterne
- 36
- Forks
- 11
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## 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`, 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` as the validator set.
## Test
We have to add various e2e tests that involve multiple nodes + varying validator set.
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Verwendungen der benannten Validator-Typen (`ctypes::Validator`, `ctypes::ValidatorSet`, `foundry_graphql_engine::Validator`) und der Schnittstelle des Coordinator-Moduls nachzuverfolgen. Überprüfe, wie aktuelle und nächste Validator-Sets gespeichert und gehasht werden, und ermittle anschließend die vorhandenen End-to-End-Test-Einstiegspunkte. Erledigt ist die Aufgabe, wenn veraltete Validator-Typen entfernt sind, beide Sets `ValidatorSet` verwenden und Multi-Node-Tests unterschiedliche Validator-Sets abdecken.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- blockchain
- Issue-Typ
- Refactoring
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 18/100