You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
#825 brought support for returning a custom header as part of the validation phase on the relay chain. This can be used for example to switch to a different chain. The problem now is that we also send the expected header as part of the candidate descriptor when building the collation: https://github.com/paritytech/cumulus/blob/master/client/collator/src/lib.rs#L178
The relay chain checks that the candidate descriptor header matches the one being returned by the validation function. This means we now also need to ensure that if a custom header should be set, we also use this header when announcing the collation to the relay chain validators. This should be done in the following way:
Bump the version of the CollationInfo runtime api to 2.
Change the collect_collation_info to also take the header of the current block and change the return value to also return the head data.
In the runtime we then check if a custom header should be set and if that is true, we return this custom header or we return the header that we got passed in through the runtime api function.
Ensure that the code on the client side is backwards compatible. This can be done by checking the current runtime api version and calling the appropriate "old" function.
#825 brought support for returning a custom header as part of the validation phase on the relay chain. This can be used for example to switch to a different chain. The problem now is that we also send the expected header as part of the candidate descriptor when building the collation: https://github.com/paritytech/cumulus/blob/master/client/collator/src/lib.rs#L178
The relay chain checks that the candidate descriptor header matches the one being returned by the validation function. This means we now also need to ensure that if a custom header should be set, we also use this header when announcing the collation to the relay chain validators. This should be done in the following way:
CollationInfo
runtime api to2
.collect_collation_info
to also take the header of the current block and change the return value to also return the head data.CC @NachoPal
The text was updated successfully, but these errors were encountered: