Range sync: step past a span with no blocks instead of failing the peer that serves it
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- distributed-systems, networking
Direzione di ricerca
Start with RangeSyncState::complete_batch in crates/net/p2p/src/lib.rs and the Lean and Beacon BlocksByRange handlers named in the issue. Read the stall-window note in docs/spec_deviations.md and the linked discussion in lambdaclass/ethlambda#791 to understand the prior attempt. A fix should advance across empty spans, verify skips using the next batch's parent link, and retry or count a failure when that check does not match.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem. Range sync cannot pass a stretch of slots with no block on the chain, such as a long run of missed proposals during a non-finality incident.
- A
BlocksByRangeanswer with no block in the requested range counts as a failed request. Lean:crates/net/p2p/src/req_resp/handlers.rs:943-953. Beacon:handlers.rs:2905-2913. - The range session's cursor only moves when a batch delivers blocks (
RangeSyncState::complete_batch,crates/net/p2p/src/lib.rs:865-867). Across a span a whole batch long with no block on the chain, range sync therefore never advances. - The honest peers asked for that span cool down. After three such answers in a row they become suspects (
SUSPECT_AFTER_FAILURES,crates/net/p2p/src/peer_heads.rs), and their claims stop counting towards the network head. - The node can then read as synced while it is still behind, and only the parent lookups of newer gossip blocks fill the gap.
The trade-off is stated in docs/spec_deviations.md (the stall-window bullet of the sync-gate section). It was discussed in rounds seven, eight, eleven and thirteen of lambdaclass/ethlambda#791.
Why it is out of that PR's scope.
mainalready stops at such a span. Its lean handler fails an empty answer and returns beforecomplete_batch(crates/net/p2p/src/req_resp/handlers.rs:817-821onmain), so its cursor does not move either.- Excusing empty answers in place was tried and reverted in lambdaclass/ethlambda#791. A peer claiming a high head was then excused on every batch below it, and took a batch on every
Statusit sent. - The fix is a change to range sync itself, not to the sync gate.
What a fix could look like.
- Advance the cursor: when a peer whose
Statushead is past the span answers it empty, move the cursor past it. - Remember the skip: keep the skipped span and who answered it.
- Check it with the next batch: use the parent link
HeadWatch::note_deliveryalready uses. If the next batch's first block names, as its parent, the last block delivered below the span, the span was empty and the peer is credited. - Otherwise: re-ask the span from another peer, and count a failure against the peer that answered it empty.
- Lingua principale
- Rust
- Stelle
- 86
- Fork
- 34
- Merge medio
- 9g 20h
- PR unite (30g)
- 77
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lambdaclass/ethlambda
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lambdaclass/ethlambda#850 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
lambdaclass/ethlambda#777 · 1 reazione ·
I maintainer di solito rispondono entro 6 giorni
-
Run all gossip validation testsForse di nuovo libera @dicethedev l’ha presa 9 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lambdaclass/ethlambda#725 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
Handle malformed DB dataForse di nuovo libera @dicethedev l’ha presa 115 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lambdaclass/ethlambda#529 · 4 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
Document architectural choicesForse di nuovo libera @dicethedev l’ha presa 115 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
lambdaclass/ethlambda#521 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di lambdaclass/ethlambda
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
antithesishq/bombadil#473 ·
I maintainer di solito rispondono entro 2 giorni
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libracoder/kiri#669 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
autofixer: follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
tursodatabase/turso#12217 ·
I maintainer di solito rispondono entro 1 giorno
-
Declare the CMS schema library in the optional recipients extraForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:python in-progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yhay81/pyropdf#1005 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno