remote-ext: fix silent state corruption from lagging RPC providers#12268
remote-ext: fix silent state corruption from lagging RPC providers#12268Stephenlawrence00 wants to merge 4 commits into
Conversation
|
/cmd prdoc --audience node_dev --bump patch |
| /// This is signalled by the empty prefix being queued for download (see | ||
| /// `init_remote_client`); partial scrapes (specific pallets/keys) never match. | ||
| fn is_complete_scrape(&self) -> bool { | ||
| self.as_online().hashed_prefixes.iter().any(|p| p.is_empty()) |
There was a problem hiding this comment.
Will this also work for child tries?
There was a problem hiding this comment.
Yes. With child_trie on, a complete scrape pulls every child trie (load_child_remote) and inserts it via insert_child. into_raw_snapshot recomputes each child root and folds it into the top trie, so the computed_root we compare to the header's state_root already covers child data. A stale child trie changes the top root and fails the check.
ggwpez
left a comment
There was a problem hiding this comment.
Please patch up the dependencies here and do a full fetch with polkadot asset hub to ensure it will work end-to-end.
Pointed try-runtime-cli's polkadot-sdk deps at this branch and ran a full |
Fixes #12264 by treating per-item RPC errors as batch failures instead of empty values, verifying the computed storage root against the block header before caching a snapshot, and excluding RPC providers that lack the target block up front.