security: S5 recidivism is per-model, so a validator can spread missed votes across models and never escalate
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- solidity
- Área
- blockchain, security
Línea de trabajo
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_….
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4
- Forks
- 7
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 34
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InfiniteZeroFoundation/DevNet
-
ROADMAP.md: refresh "What is still open for P3" (several items were fixed in October)Posiblemente ocupada @umermjd11 la tomó hace 3 días. Abiertodocumentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
InfiniteZeroFoundation/DevNet#285 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Update the 25 translated organisation READMEs to match the English versionPosiblemente ocupada @mrCabez la tomó hace 1 día. Abiertogood first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InfiniteZeroFoundation/DevNet#277 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Update the client-service guide to explain training and uploading separatelyPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InfiniteZeroFoundation/DevNet#266 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
InfiniteZeroFoundation/DevNet#299 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Long run
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
InfiniteZeroFoundation/DevNet#298 ·
Los mantenedores suelen responder en 1 día
Todos los issues de InfiniteZeroFoundation/DevNet
Issues similares
-
infrastructure
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NatLabRockies/H2Integrate#977 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
topoteretes/cognee#6470 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
area:docs priority:p2 type:docs wave:9
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
jejjohnson/radtrax#293 ·
Los mantenedores suelen responder en 1 día
-
bug core plugins
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bunkerity/bunkerweb#4121 · 1 comentario ·
Los mantenedores suelen responder en 1 día