Consolidate the three parallel SSZ stacks
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
調査の方向性
まず crates/ssz/src/hasher.rs と既存の hasher テストを確認し、次に verify_hashes の golden-file コーパスを実行して、現在の Charon/fastssz の動作を確立します。crates/ssz/types.rs と crates/core/src/ssz_codec.rs を、一覧にある未テストのヘルパーおよび codec と併せて確認します。完了の条件は、互換性のある箇所でスタックがインターフェースと型を共有し、カバレッジに指定された境界が含まれ、Charon 固有の codec が文書化された例外として残っていることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
SSZ spans ~9,100 LOC across 22 files in three stacks that don't share types, hashing, or error handling:
ethereum_ssz+tree_hashderives for consensus-spec containers (crates/eth2api/src/spec/, 3,498 LOC). Every container repeats a 5-derive line plus per-field#[serde_as]attributes — 93 derive lines, 155Hex0xoccurrences.ssz_typesis not a dependency, socrates/ssz/types.rsreimplementsSszList/SszVector/BitList/BitVectorwith 12 manualEncode/Decode/TreeHashimpls (844 LOC).- A hand-ported fastssz
Hasher(crates/ssz/src/hasher.rs, 640 LOC) drivingcluster/src/ssz.rs— 29 versioned free functions selected via function-pointer tables, plus anSSZError<H>that duplicatespluto_ssz::Error— and a second locally-declaredSszHashabletrait inapp/src/obolapi/exit.rs#L30-L39. - Hand-written byte-level codecs for Charon wire formats (
core/src/ssz_codec.rs, 1,261 LOC), including deliberate deviations from what a derive would emit (documented inunsigneddata.rs: Charon emits an offset table even for fixed-size containers).
Consequences: two incompatible hash-tree-root paths, invisible semantic differences between types (some deliberately omit TreeHash and nothing flags it), and duplicated list/vector plumbing that upstream ssz_types already provides.
Proposed change
- Before touching any stack: pin the current hasher against Charon/fastssz with golden-vector tests (known input → known 32-byte root, expected values captured from the Go side). The existing
hasher.rstests are self-consistency checks (manual-tree comparisons, bitlist guards) — nothing cross-implementation. Add binary round-trip tests for the zero-test codec helpers (encode.rs,decode.rs) at the same time; they are part of the surface being consolidated. Same for the crate's other untested seams:helpers.rsput_byte_list/put_bytes_nIncorrectListSize,serde_utils.rsssz_list_u64_string_serde(string/int parse, MAX rejection, round-trip), the binaryEncode/Decodebound checks ofSszList/SszVector(only the JSON path is tested today), and the hasher'sCountGreaterThanLimitandget_depth/next_power_of_two/calculate_limitboundaries. - Adopt
ssz_typesfor List/Vector/Bitfield and delete most ofcrates/ssz/types.rs. - Merge the two hasher-side interfaces (
SszHashableinobolapivs the free-function tables incluster) into one, e.g. a version-aware trait inpluto_ssz; collapse the duplicated error enum. - Keep the Charon wire-format codecs (
ssz_codec.rs) as explicit, documented exceptions — they encode incompatibilities that derives cannot express.
Open question
The cluster config/definition/lock hashes must byte-match Charon's fastssz output. Before replacing the custom Hasher with tree_hash, prove equivalence on the existing fixture corpus (the verify_hashes golden files) — if fastssz semantics differ (they do for e.g. bitlist mixins and string hashing), the custom hasher stays and only the interface around it is consolidated.
- 主要言語
- Rust
- スター
- 8
- フォーク
- 5
- 平均マージ
- 4日 18時間
- マージ済み PR(30日)
- 4
環境構築
- 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 が 25 日前に担当しました。 オープンbug track:orchestration-cli
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
NethermindEth/pluto#632 ·
NethermindEth/pluto の issue をすべて見る
似ている issue
-
bug llm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
accounts bug decoding
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
wboayue/rust-ibapi#1088 ·
メンテナーはふだん 1 日以内に返信
-
chmod -v: missing 'could not be accessed' line for operands that can't be stat'ed対応中かも @emirmrkaljevic が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
gtk-rs/gtk-rs-core#2068 ·
メンテナーはふだん 6 日以内に返信