security: S5 recidivism is per-model, so a validator can spread missed votes across models and never escalate
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 小时
- 30 天内合并 PR
- 34
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 天内回复
-
Update the client-service guide to explain training and uploading separately可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
InfiniteZeroFoundation/DevNet#266 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
InfiniteZeroFoundation/DevNet#299 · 1 条评论 ·
维护者通常 1 天内回复
-
Long run
难度 5/5 一周以上 新手友好度 25/100
InfiniteZeroFoundation/DevNet#298 ·
维护者通常 1 天内回复
查看 InfiniteZeroFoundation/DevNet 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagation可能已有人在做 @muskan-creates352 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
mllam/neural-lam#848 ·
维护者通常 2 天内回复
-
infra
难度 1/5 1 小时以内 新手友好度 88/100
fab-geocommuns/RNB-coeur#1166 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
deepspeedai/DeepSpeed#8951 ·
维护者通常 2 天内回复