Queued pipe payloads can be silently dropped at stage time after passing the send-time size check
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend, distributed-systems
Línea de trabajo
Start with pipe.rs send-time size checks, runtime.rs outbox staging, and the protocol session stage() implementations in panetiere.rs, panetiere_scheduled.rs, adcnet.rs, and noop.rs. Read config.rs and scheduler_core.rs to trace the Scheduled Panetiere limit mismatch. Reproduce both queued-frame cases, then verify accepted payloads are delivered or produce a clear failure signal.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Pipe::send checks payload size once, when the payload is queued, and returns Ok(()) (pipe.rs:176-193). The frame then waits in the node-wide outbox until a round's participation draw takes it in sync_client_round and hands it to the client session's stage() (runtime.rs:1576-1588). Each protocol's session checks size again there, against its own limit. If that second check fails, the frame is thrown away: it isn't put back in the outbox, and the sender is never told. Two cases trigger this.
Case 1: Message size shrinks in a config update while a frame is queued
- The node runs a config where the smallest
message_sizeacross runnable subnets is, say, 1024. - A pipe sends a 1000-byte payload.
check_size_againstpasses and the frame is queued. - The frame waits in the outbox for one or more rounds, either because no subnet was drawn yet or because other frames are ahead of it.
- A new config lowers
message_sizeto 512.apply_configreplaces the worker, because the protocol config is part ofsubnet_sig. The outbox is not re-checked. - The new worker's
sync_client_roundpops the frame and callsstage(), which drops it.
This affects every protocol, each in its own way:
- Panetiere:
stage()logs an error and drops the frame (panetiere.rs:2013-2023). - Scheduled Panetiere:
reserve_messagereturns an error, andstage()discards it withlet _ =(panetiere_scheduled.rs:835), so nothing is logged. - ADCNet:
contributefails, which is only logged at debug level, and the payload is lost (adcnet.rs:1075,adcnet.rs:1104). - Noop:
begin_roundreturns nothing for an oversized payload (noop.rs:47-51).
Case 2: The send-time and stage-time limits disagree (Scheduled Panetiere)
The pipe checks against ProtocolConfig::message_size(), which is message_size for Scheduled Panetiere (config.rs:238). The session checks against vector_bytes.min(u16::MAX) (panetiere_scheduled.rs:793). validate_structure rejects message_size > u16::MAX and vector_bytes == 0, but it does not require message_size <= vector_bytes (scheduler_core.rs:247-262).
With message_size = 1024 and vector_bytes = 512, any payload between about 513 and 1024 bytes passes the send check. It is then dropped every time, without a log line.
Expected
A payload that send accepts is either delivered, or the sender is clearly told it failed. Nothing is dropped silently.
Possible fixes
- Case 2: require
message_size <= vector_bytesinvalidate_structure, or haveProtocolConfig::message_size()return the effective limit for Scheduled Panetiere. - Case 1: re-check the outbox in
apply_configand drop oversized frames with a warning or an event. Or havestage()return a result, sosync_client_roundcan log the drop and report it. - In both cases, log the dropped frame in Scheduled Panetiere's
stage()instead of discarding the error.
- Lenguaje dominante
- Rust
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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 flashbots/anymone
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
-
Documentation of Anymone's governance committeeQuizá libre de nuevo @ameba23 la tomó hace 43 días y no hay ningún pull request abierto. Abiertodocumentation
Todos los issues de flashbots/anymone
Issues similares
-
priority middle
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
KATO-Hiro/AtCoderClans#13029 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
RustCrypto/formats#2544 ·
Los mantenedores suelen responder en 1 día
-
bug ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
userFRM/egui-charts#3363 ·
Los mantenedores suelen responder en 1 día
-
ada documentation mobile report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
physicsdolphin/nv-uefi-unlocker#254 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
kindraywind/rustnarok-client#1382 ·
Los mantenedores suelen responder en 1 día