-
Notifications
You must be signed in to change notification settings - Fork 691
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
Pubsub mechanism for Parachains #606
Comments
Hi @bkchr, |
I also could really use this feature |
Same here! |
Yeah we have talked a little bit "off github" about this. The current plan is the following:
If you need this, could you may look into 1? Providing 2 in some "dirty" way should be possible quite easily. |
Thanks for your quick response. I was wondering if there is another way of publishing the information in step 1 without XCM? Or at least without a new XCM instruction. This new instruction will then probably be introduced in XCM v5 and that can still take months. Might we be able to use the Transact instruction to publish the information? |
@franciscoaguirre what is the status on XCMv4? Still possible to sneak in some new instruction? |
We can. We wanted to get it out as soon as possible but the PR still doesn't have enough reviews. A new instruction wouldn't hurt |
Nice! Could we add some kind of instruction like this:
While |
We can work on the implementation here: #2359, it's pointing to the v4 branch. In the meantime, I created an RFC for this to discuss how it should work: polkadot-fellows/xcm-format#48 |
Since XCMv4 was just a rename, this'll go in XCMv5. I urge you again to take a look at the RFC and comment. This will only go into v5 if we're all convinced about that RFC. |
When parachains need to exchange information, they currently rely on sending XCM messages to each other or resorting to an off-chain protocol to obtain a storage proof from another chain. However, these solutions are complex and expensive, particularly when data should be disseminated amongst a large group of parachains, such as the price of DOT.
A potential solution would be the introduction of a publish-subscribe (pub-sub) mechanism. This would enable parachains to subscribe to
(para_id, key)
information within their runtime. Collators would then be responsible for integrating this information into the runtime during block creation. The information would be published by parachains as an output of their validation process, necessitating changes to theValidationResult
as specified in issue paritytech/polkadot-sdk#645.The
(k, v)
information would be stored in the relay chain state, and it would likely be most efficient to maintain a separate child trie for eachpara_id
. This would allow a collator to notify the parachain runtime when a change occurs in one of the subscribed items.However, the parachain runtime cannot fully trust the collator to include the data. Therefore, we only want to include the data when changes occur to conserve space. In such cases, the collator could include the child trie root (as part of the relay chain proof), which would be sufficient to prove that no changes occurred or provide proof of the child trie with the changed data.
CC @gavofyork
The text was updated successfully, but these errors were encountered: