Blockchain reorg safety
- Lingua principale
- Rust
- Stelle
- 78
- Fork
- 129
- Merge medio
- 4g 14h
- PR unite (30g)
- 52
Descrizione
`Client::sync_state` currently hardcodes `SyncTarget::CommittedChainTip`, even though the RPC layer and node already support `CommittedChainTip`, `ProvenChainTip`, and `BlockNumber` via the existing `SyncTarget` enum.
We could consider exposing that as an optional parameter on `Client::sync_state`, thread it through `StateSync::sync_state` into `sync_chain_mmr`, reexport the enum, and maybe mirror the parameter in the CLI and `WebClient` bindings. I don
This does not add reorg safety, and maybe this prompts for discussion/features around that: The client still has no detection or rollback for network-level chain rewrites. The existing account rollback logic only handles locally stale pending transactions. A user choosing `ProvenChainTip` gets a more conservative view, but still fully trusts the node, so `proven` is not a stronger trust guarantee.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Il problema menziona `Client::sync_state`, `StateSync::sync_state`, `sync_chain_mmr`, la CLI e i binding `WebClient`. Inizia esaminando l'enum `SyncTarget` nel livello RPC e nel nodo per comprenderne le tre varianti. Quindi traccia il flusso da `Client::sync_state` attraverso `StateSync::sync_state` in `sync_chain_mmr` per vedere dove il parametro deve essere passato. 'Fatto' significa che il parametro opzionale è esposto, passato attraverso e riflesso nella CLI e nei binding WebClient, con l'enum riesportato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- blockchain
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100