CodeChain-io / CodeChain-io/foundry

Organize validator set

オープン
#560 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
36
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、指定されたバリデーター型(`ctypes::Validator`、`ctypes::ValidatorSet`、`foundry_graphql_engine::Validator`)とコーディネーターモジュールのインターフェースの使用箇所を追跡します。現在のバリデーターセットと次のバリデーターセットがどのように保存され、ハッシュ化されているかを確認し、既存のエンドツーエンドテストのエントリーポイントを特定します。古いバリデーター型が削除され、両方のセットが `ValidatorSet` を使用し、マルチノードテストで異なるバリデーターセットがカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
blockchain
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
18/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。