Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#243 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@robertocarlous ci sta già lavorando.

Dal 15/10/2026.

  • #253 di @robertocarlous — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
solidity

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
Python
Stelle
4
Fork
7
Merge medio
3g 58m
PR unite (30g)
39

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di InfiniteZeroFoundation/DevNet

Tutte le issue di InfiniteZeroFoundation/DevNet

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.