Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read storage of foreign chain #16

Open
olanod opened this issue Mar 6, 2021 · 1 comment
Open

Read storage of foreign chain #16

olanod opened this issue Mar 6, 2021 · 1 comment

Comments

@olanod
Copy link

olanod commented Mar 6, 2021

Parachains might want to reliably read the storage of another parachain and this could be done with XCM. Chains have the option of querying the other parachain state with an RPC client from an off-chain worker but is not very efficient and doesn't come with the same delivery guaranties or securities of XCM.

XCM being completely asynchronous means such querying protocol would work as a kind of subscription system where chain A tells chain B that it wants to know the value of one or more storage keys, it can also tell if it's a one time subscription or if it should be updated whenever the values of the key or keys change and it should also specify a "callback" path similar to how webhooks work but in this case it would be what dispatchable call should the chain A execute to process the incoming data.

@h4x3rotab
Copy link

I'd propose an alternative solution: don't query the storage directly, but query the sate root at a certain block. With a storage root, users can submit the storage proof as well as the raw data to your blockchain, and it reduced the data transferred in the middle (especially useful for HRMP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants