Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

BL-26: Batch-assignment pool-reshaping gap — unstake between seed lock and autoCreateTier1AndTier2 re-rolls all assignments

未关闭
#243 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@robertocarlous 已经在做这个了。

开始于 2026年10月15日。

  • #253 来自 @robertocarlous —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
solidity

调研方向

Read DINTaskCoordinator.sol around autoCreateTier1AndTier2 (L714–780), createAuditorsBatches (L820–880), and the existing _assignFreshSubgroup pattern. Check the relevant tests for batch creation and validator activity. Done when assignments use the fixed per-GI registration list and locked seed, skipping inactive entries so an unstake only forfeits that validator’s seat.

由索引模型根据 Issue 内容生成。

描述

Approved bug

Summary

DINTaskCoordinator.autoCreateTier1AndTier2 and createAuditorsBatches build the validator pool from _activeAggregatorPool / _activeAuditorPool at call time, after the seed is already public. A validator can unstake between the seed lock and the batch-creation call to change the active pool size, which causes Fisher-Yates to re-roll the entire batch assignment for everyone else. The cost to the attacker is real but modest: their own Sybils sit out the GI and enter unbonding.

This is a distinct gap from BL-11's re-roll-by-declining-to-lock residual (partially mitigated by the validator-side lock added in PR #191). A validator doesn't need to decline locking anything — they just wait until the seed is locked, then unstake, then the batch draw re-rolls when the model owner eventually calls autoCreateTier1AndTier2.

Reachability

  • Seed is locked (permissionlessly, by any validator online) once block.number >= seedBlock.
  • autoCreateTier1AndTier2 / createAuditorsBatches can be called by the model owner any time after the seed is locked — no deadline enforced.
  • Between lock and create, _activeAggregatorPool / _activeAuditorPool read the live staking contract. Any change in the active-validator count between those two calls shifts the Fisher-Yates index mapping.
  • Verified against develop @ aa76ce18: autoCreateTier1AndTier2 L714–780, createAuditorsBatches L820–880 (DINTaskCoordinator.sol).

Ready-made fix

Adopt _assignFreshSubgroup's existing pattern (the dispute re-eval draw, merged in PR #171):

  1. Shuffle the fixed per-GI registration list (dinAggregators[_GI] / the auditor equivalent) with the locked seed, not the live active pool.
  2. Walk the shuffled list and skip inactive entries when filling seats.

Under this scheme an unstake only forfeits the leaver's own seat; everyone else's assignment is already determined by the fixed list + locked seed and cannot be changed.

Out of scope here

The contract-side re-anchor cap (bounding how many times the seed can expire and re-anchor) was considered in PR #191 and deferred pending a GI-abort design (issue #222): without an abort path, a capped-out GI is stuck forever. That is a separate issue. This issue covers only the pool-reshaping gap.

References

  • Developer/BACK_LOG.md BL-26
  • PR #191 review — pool-reshaping gap documented as residual in DINTaskCoordinator.md §6.3
  • Issue #222 (GI-abort design, prerequisite for the re-anchor cap)
  • Issue #178 (sequencer-trust residual, separate track)
主要语言
Python
星标
4
派生
7
平均合并
3 天 4 小时
30 天内合并 PR
34

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InfiniteZeroFoundation/DevNet 的其他 Issue

查看 InfiniteZeroFoundation/DevNet 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。