security: S5 recidivism is per-model, so a validator can spread missed votes across models and never escalate
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- solidity
- 領域
- blockchain, security
調査の方向性
Read foundry/src/DinValidatorStake.sol, especially slashPartial, _trimAndRecordPartialSlash, and the NatSpec for _partialSlashGIs, then review Row 11 in Developer/design/adversarial-threat-model.md. The issue describes three possible approaches, each requiring a design choice that preserves safe handling of interleaved per-model GI indices. Done means the Row 11 gap is addressed and the corresponding test_knownGap_… changes to test_defended_….
索引モデルが issue の本文から書いたものです。
説明
Summary
S5 recidivism escalation (full MIN_STAKE slash + jail) is counted per slasher contract, i.e. per model. A validator registered on several models can spread liveness faults across them so no single model's counter ever reaches s5RecidivismThreshold.
DinValidatorStake.slashPartial records each partial slash in _partialSlashGIs[validator][msg.sender] (foundry/src/DinValidatorStake.sol:309), where msg.sender is the calling DINTaskCoordinator / DINTaskAuditor. With the defaults (window 5 GIs, threshold 3, DinValidatorStake.sol:196-198), a validator can miss up to 2 votes/submissions per model per window on every model it serves. Across N models that is (threshold − 1) × N misses per window without S5 ever firing, and isValidatorActive stays true throughout.
Why it is keyed per contract today
This is deliberate, not an oversight. giIndex is a per-model counter, so different models' GI sequences interleave arbitrarily. A single shared ring per validator would receive non-monotonic values and underflow the ascending-order trim in _trimAndRecordPartialSlash (see the NatSpec on _partialSlashGIs, DinValidatorStake.sol:136-146). Any fix has to keep that safety property.
Impact
A validator can stay chronically unreliable across the network while only ever paying the S2 partial slashes (s2SlashFractionBps, 30% of minStake per miss by default). The escalation that is meant to eject repeat offenders never triggers. The per-miss partial slashes still apply, so this is a cost-reduction gap, not a free pass.
Options
- Model-independent window: track partial slashes per validator in a time-based (block timestamp) or platform-level sequence window that is monotonic across all slashers, and escalate on the aggregate count.
- Two-level check: keep the per-slasher ring for per-model escalation and add a global per-validator counter with its own threshold.
- Accept and document it as a trust assumption, with the per-model threshold calibrated so that
(threshold − 1) × typical model countmisses per window is tolerable.
Tracking
Row 11 (KNOWN GAP) of the adversarial threat model, Developer/design/adversarial-threat-model.md (task_240926_17, merged via PR No. 182). Part 2's test_knownGap_… for Row 11 should flip to test_defended_… when this is fixed.
- 主要言語
- Python
- スター
- 4
- フォーク
- 7
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 34
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InfiniteZeroFoundation/DevNet のほかの issue
-
ROADMAP.md: refresh "What is still open for P3" (several items were fixed in October)対応中かも @umermjd11 が 2 日前に担当しました。 オープンdocumentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
InfiniteZeroFoundation/DevNet#285 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Update the 25 translated organisation READMEs to match the English version対応中かも @mrCabez が今日担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InfiniteZeroFoundation/DevNet#277 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InfiniteZeroFoundation/DevNet#266 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
InfiniteZeroFoundation/DevNet#299 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Long run
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
InfiniteZeroFoundation/DevNet#298 ·
メンテナーはふだん 1 日以内に返信
InfiniteZeroFoundation/DevNet の issue をすべて見る
似ている issue
-
changelog investigate
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
ramnes/notion-sdk-py#433 ·
-
docs pkg:core
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
pydantic/pydantic-ai#11929 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
intake/intake-esm#789 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MemMachine/MemMachine#1877 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openedx/openedx-authz#579 ·
メンテナーはふだん 1 日以内に返信