Relates to: #82
Motivation
The goal is to access the state_root of sibling parachain B from parachain A. While the relay chain can easily retrieve this information via paras::Heads, parachains currently only receive the para head of their own included/active parachain in RelayChainStateProof.
Example
A possible use case: Parachain A synchronizes and stores the latest state_roots of other parachains, such as parachain B. Parachain A could then expose an extrinsic that accepts trie proofs, e.g., do_some_magic(trie_proof_of_sibling_para), and internally validate the proof using the stored state_roots.
At least two existing use cases could benefit from this:
PoC
#7444
Questions
- Is it feasible to extend
RelayChainStateProof to include predefined/configured relevant paraIDs? As a non breaking change? or what are consenquences - restart node software?
- How could this be implemented? Would it be safe?
- Can we use any parachain block’s
state_root, or should we rely only on finalized blocks? Are there any limitations?