Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unify lock usage; prefer actor ownership over shared locks

オープン
#607 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
rust

調査の方向性

まず、crates/consensus/src/qbft/component.rs、crates/core/src/parsigdb/memory.rs、crates/dkg/src/sync/client.rs、crates/p2p/src/p2p_context.rs、crates/eth2util/src/network.rs にある列挙された lock 箇所を読み、その後、既存のスタイルドキュメントを確認します。lock の所有権ルールが文書化され、指摘された箇所が変換されるか、現在の lock の形が適切である理由を注記されれば完了です。

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

説明

rust

Summary

Lock usage is split with no documented rule: std::sync::{Mutex,RwLock} in 41 files, tokio::sync in 22 (parking_lot is not a dependency — the backlog can drop that option). 52 call sites deal with poison (PoisonError::into_inner / expect("... poisoned")).

Several locks guard data with a single logical owner, where a channel/actor removes the lock entirely:

Proposed change

This is a design task first: pick a general rule (the standard one works: std::sync for short, non-await-crossing critical sections; tokio::sync when a guard is held across .await; actor + channels when data has one logical owner), document it and enforce it. Later, convert the listed actor candidates. Finally:

  • Stop returning guards from P2PContext
  • Make SUPPORTED_NETWORKS immutable-after-init or explicitly injected.

Acceptance

A written rule in the style docs, and the flagged sites either converted or annotated with why the lock is the right shape.

主要言語
Rust
スター
8
フォーク
6
平均マージ
4日 3時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NethermindEth/pluto のほかの issue

NethermindEth/pluto の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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