The HRMP channel are handled on the relay chain and the relay chain sends notifications to the child parachains:
The potential problem is using VersionedXcm::from(Xcm which uses xcm::latest::* stuff. E.g. when the relay chain is migrated to the higher XCM version than the parachains, it could lead to the undecodable and ProcessMessageError::Corrupt when processing message on the parachain here.
Everywhere where we send XCM (ChildParachainRouter, SiblingParachainRouter, ...) we use WrapVersion which uses implementation from pallet_xcm (SupportedVersion for destination or safeXcmVersion of runtime) to avoid using latest XCM version.
So the solution here is to add WrapVersion to the HRMP pallet Config and use this wrap_version for all notifications mentioned above. The result will be that we VersionedXcm would be at least safeXcmVersion or the previously stored on in SupportedVersion (if parachain communicated before with the relay chain).
Note: We added HRMP notification handler just recently here: #3696, but there could already exist custom implementations of XcmExecutor, so until this fix comes live, for them the hotfix would be to upgrade their XCM version as soon as possible according to the relay chain version (there is XCMv4 coming to the Kusama in few days).
cc: @JuaniRios
The HRMP channel are handled on the relay chain and the relay chain sends notifications to the child parachains:
The potential problem is using
VersionedXcm::from(Xcmwhich usesxcm::latest::*stuff. E.g. when the relay chain is migrated to the higher XCM version than the parachains, it could lead to the undecodable andProcessMessageError::Corruptwhen processing message on the parachain here.Everywhere where we send XCM (ChildParachainRouter, SiblingParachainRouter, ...) we use
WrapVersionwhich uses implementation frompallet_xcm(SupportedVersionfor destination orsafeXcmVersionof runtime) to avoid using latest XCM version.So the solution here is to add
WrapVersionto the HRMP pallet Config and use thiswrap_versionfor all notifications mentioned above. The result will be that weVersionedXcmwould be at leastsafeXcmVersionor the previously stored on inSupportedVersion(if parachain communicated before with the relay chain).Note: We added HRMP notification handler just recently here: #3696, but there could already exist custom implementations of XcmExecutor, so until this fix comes live, for them the hotfix would be to upgrade their XCM version as soon as possible according to the relay chain version (there is XCMv4 coming to the Kusama in few days).
cc: @JuaniRios