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

Add possibility of proving additional relay storage keys in set validation data #561

Closed
girazoki opened this issue Nov 24, 2023 · 4 comments

Comments

@girazoki
Copy link
Contributor

Chains like Tanssi require collators to prove additional relay storage keys (in this case, the para head of a particular parachain-id). The way chopsticks works right now is that in the set_validation_data a new relay storage root is computed and injected based, among other things, on the incoming xcms and the relay slot number.

It could be good that we can add a set of additional key_values that we can inject in the generation of the proof, in a similar manner to how we did it with rust: paritytech/polkadot-sdk#1757. Tipically the relay storage root provided in set_validation_data is used to verify any other inherents proving relay-storage, so we need would need to take any additional key-value pair into account in the mocked version.

Additionally, it would be good if the trie-nodes generated by the proof were accessible for other inherents. Currently each inherent is quite isolated, and know from each other. Potentially there could be a way in which both set_validation_data and any other inherent use the same proofGenerator instance.

@ermalkaleci
Copy link
Collaborator

can you give an example how you intend to use it?

@girazoki
Copy link
Contributor Author

yes we have our own sort of hacky implementation here: moondance-labs#6

Essentially we generate a proof for additional keys in set_validation_data, and then we use these trie nodes in a the new inherent where the new keys are proved

@ermalkaleci
Copy link
Collaborator

@girazoki is storage authorInherent.highestSlotSeen() best way to get slot from your chain?

@girazoki
Copy link
Contributor Author

sorry @ermalkaleci I somehow missed this! yes it is!

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