Correctly surface errors when requesting data from future blocks
- Lingua principale
- Rust
- Stelle
- 78
- Fork
- 129
- Merge medio
- 4g 14h
- PR unite (30g)
- 52
Descrizione
The deployed networks have been supporting follower nodes for a while. Follower nodes are eventually consistent and can get behind the actual sequencer. This can cause clients to request data from future blocks from the perspective of the node it is reaching.
From the perspective of `rust-sdk`, we should make sure we correctly surface these errors and ideally separate them from "incorrect range" errors which is what (I think) we are surfacing now. Note that this might require changes from the node, as we base the error variants on the app-level error codes that the node returns. In any case, in the meantime, we can also decide to match on substrings until the node more clearly communicates this type of errors.
This is not currently fatal because:
- client users can _already_ detect this error (even if by substring matching), but we can make the experience better here
- retrying immediately is harmless and this problem happens very infrequently
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Look at the error handling code in the SDK that processes responses from the node, likely in a client or network module. Identify where 'incorrect range' errors are currently mapped. Examine the node's app-level error codes or response structures to see if future block errors are distinguished. Write a test that simulates a request for data from a future block to verify the new error variant is correctly surfaced.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100