Check that the validation code matches the parachain code (#3433)

This introduces a check to ensure that the parachain code matches the
validation code stored in the relay chain state. If not, it will print a
warning. This should be mainly useful for parachain builders to make
sure they have setup everything correctly.
This commit is contained in:
Bastian Köcher
2024-02-22 14:35:00 +01:00
committed by GitHub
parent 31546c8d24
commit 9bf1a5e238
10 changed files with 173 additions and 13 deletions
+6 -4
View File
@@ -1887,18 +1887,20 @@ async fn background_validate_and_make_available<Context>(
if rp_state.awaiting_validation.insert(candidate_hash) {
// spawn background task.
let bg = async move {
if let Err(e) = validate_and_make_available(params).await {
if let Error::BackgroundValidationMpsc(error) = e {
if let Err(error) = validate_and_make_available(params).await {
if let Error::BackgroundValidationMpsc(error) = error {
gum::debug!(
target: LOG_TARGET,
?candidate_hash,
?error,
"Mpsc background validation mpsc died during validation- leaf no longer active?"
);
} else {
gum::error!(
target: LOG_TARGET,
"Failed to validate and make available: {:?}",
e
?candidate_hash,
?error,
"Failed to validate and make available",
);
}
}