blockchain: discard_pending_subtree recurses once per pending descendant
Los mantenedores suelen responder en 6 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend, distributed-systems
Línea de trabajo
Read crates/blockchain/src/lib.rs, especially BlockChainServer::discard_pending_subtree near line 3196 and invalidate_subtree for the existing worklist pattern. Replace recursive child processing with an explicit worklist while preserving per-root cleanup, then add a deep pending-chain test that discards its root on a thread with a 2 MiB stack. Done means the discard completes without stack overflow and the test passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
BlockChainServer::discard_pending_subtree (crates/blockchain/src/lib.rs:3196) calls itself for every child in pending_blocks (lib.rs:3223), on the chain actor's thread. That thread runs with the default 2 MiB stack.
I found no cap on pending_blocks (lib.rs:464). No use of it in crates/blockchain/src checks its length or evicts by size; the inserts are at lib.rs:2810 and 2863. A chain of pending blocks N deep would make the discard recurse N times. A deep enough chain would abort the process with a stack overflow, the failure lambdaclass/ethlambda#758 removed from filter_block_tree.
Not traced or measured:
- whether such a chain forms in practice (a range catch-up whose first block's parent is missing is one unverified candidate);
- the function's frame size;
- the depth at which it would overflow.
The import cascade that releases pending children (lib.rs:3078) already uses a queue, so only the discard path recurses.
This is out of scope for lambdaclass/ethlambda#758, which changes only the fork-choice filter.
A fix would use an explicit worklist, the way invalidate_subtree already does: let mut stack = vec![block_root]; while let Some(root) = stack.pop() { ...; stack.extend(children) }, with the same per-root cleanup. A test like #758's deep-chain test would cover it: build a deep pending chain, then discard its root on a thread with an explicit 2 MiB stack.
- Lenguaje dominante
- Rust
- Estrellas
- 86
- Forks
- 34
- Merge medio
- 9 d 20 h
- PR fusionados (30 d)
- 77
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 lambdaclass/ethlambda
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaclass/ethlambda#850 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lambdaclass/ethlambda#777 · 1 reacción ·
Los mantenedores suelen responder en 6 días
-
Run all gossip validation testsQuizá libre de nuevo @dicethedev la tomó hace 9 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
lambdaclass/ethlambda#725 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
-
Handle malformed DB dataQuizá libre de nuevo @dicethedev la tomó hace 115 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lambdaclass/ethlambda#529 · 4 comentarios ·
Los mantenedores suelen responder en 6 días
-
Document architectural choicesQuizá libre de nuevo @dicethedev la tomó hace 115 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
lambdaclass/ethlambda#521 · 2 comentarios ·
Los mantenedores suelen responder en 6 días
Todos los issues de lambdaclass/ethlambda
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
antithesishq/bombadil#473 ·
Los mantenedores suelen responder en 2 días
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libracoder/kiri#669 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 5 días
-
autofixer: follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
tursodatabase/turso#12217 ·
Los mantenedores suelen responder en 1 día
-
Declare the CMS schema library in the optional recipients extraPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea:python in-progress
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
yhay81/pyropdf#1005 · 2 comentarios ·
Los mantenedores suelen responder en 1 día