Deduplicate domain types across crates
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
調査の方向性
まず core/signeddata.rs、core/types.rs、eth2api/validator_duty.rs、tracker/inclusion.rs、testutil/validatormock/attest.rs にある引用された定義を読み、次に From 変換と重複した trait 定義をたどります。完了の条件は、列挙された各概念に canonical な配置場所があり、重複した表現と no-op ブリッジが削除され、意図的に維持される wire-version ファミリーと generated-vs-spec ファミリーが変更されていないことです。
索引モデルが issue の本文から書いたものです。
説明
Summary
Follow-up evidence for #127 ("Centralize helper at core") — the concrete duplicates:
AttesterDuty: 4 near-identical structs —core/signeddata.rs#L1200-L1213(no pubkey),testutil/validatormock/attest.rs(same + pubkey),eth2api/validator_duty.rs(3-field subset),tracker/inclusion.rs(2-field subset) — plusAttesterDutyDefinition, which exists only because the core struct dropped the pubkey.ProposerDuty/SyncCommitteeDuty: same fields defined ineth2apiandcorewith different newtypes and a field rename (validator_index→v_idx), bridged byFroms.- Validator pubkey: 3 representations (
crypto::PublicKey = [u8;48],eth2api::BLSPubKey = [u8;48],core::PubKey([u8;48])), plus bareVec<u8>pubkeys in 6cluster::distvalidatorfields. Signature: 2 aliases for[u8;96]bridged by no-op converters. - Slot: 3 shapes —
phase0::Slot = u64,core::SlotNumber(u64), and acore::Slotcontext struct sharing the name. - Selections:
BeaconCommitteeSelection/SyncCommitteeSelectionexist in three layers (eth2api canonical, core#[serde(transparent)]newtypes, and independent testutil redefinitions with identical fields). - Duplicate trait names across crates: two unrelated
Consensustraits (consensus::wrappervspriority::consensus) and two unrelatedClocktraits (core::clockvstestutil::validatormock::clock— different time types; relates #306).
Deliberate non-duplicates to leave alone: the cluster wire-version struct families (DistValidatorV1x..., LockV1x...) encode real format versions, and the generated-vs-spec split in eth2api is the eth2api replacement issue's territory (#611).
Proposed change
Pick the canonical home per concept (core for domain types, eth2api spec types at the API boundary), collapse the copies, and give the survivors the fields their consumers actually need (e.g. put pubkey back on AttesterDuty, deleting AttesterDutyDefinition). Rename one of the Consensus/Clock trait pairs.
- 主要言語
- Rust
- スター
- 8
- フォーク
- 5
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NethermindEth/pluto のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
NethermindEth/pluto#719 ·
-
enhancement rust
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NethermindEth/pluto#640 ·
-
rust
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
NethermindEth/pluto#638 · コメント 1 件 ·
-
enhancement rust
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NethermindEth/pluto#635 ·
-
Improve `alpha test peers`: match Charon's probes; reduce timeouts対応中かも @varex83agent が 27 日前に担当しました。 オープンbug track:orchestration-cli
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
NethermindEth/pluto#632 ·
NethermindEth/pluto の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mozilla-services/syncstorage-rs#2715 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
physicsdolphin/nv-uefi-unlocker#53 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
area/desktop-shell
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
yantrikos/yantrik-os#1012 ·
メンテナーはふだん 1 日以内に返信