Closed girazoki closed 11 months ago
can you give an example how you intend to use it?
yes we have our own sort of hacky implementation here: https://github.com/moondance-labs/chopsticks/pull/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
@girazoki is storage authorInherent.highestSlotSeen()
best way to get slot from your chain?
sorry @ermalkaleci I somehow missed this! yes it is!
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 newrelay storage root
is computed and injected based, among other things, on the incomingxcms
and therelay 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: https://github.com/paritytech/polkadot-sdk/pull/1757. Tipically the relay storage root provided inset_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.