PVF: Document that preparation cannot lead to disputes (#6873)

* PVF: Document that preparation cannot lead to disputes

* Add warning for deterministic errors

* Fix warning
This commit is contained in:
Marcin S
2023-03-15 01:35:38 +01:00
committed by GitHub
parent 962bd71eb0
commit ba29d06334
4 changed files with 18 additions and 11 deletions
@@ -623,7 +623,7 @@ where
.await;
if let Err(ref error) = result {
gum::info!(target: LOG_TARGET, ?para_id, ?error, "Failed to validate candidate",);
gum::info!(target: LOG_TARGET, ?para_id, ?error, "Failed to validate candidate");
}
match result {
@@ -638,9 +638,16 @@ where
))),
Err(ValidationError::InvalidCandidate(WasmInvalidCandidate::PrepareError(e))) => {
// In principle if preparation of the `WASM` fails, the current candidate can not be the
// reason for that. So we can't say whether it is invalid or not in addition with
// reason for that. So we can't say whether it is invalid or not. In addition, with
// pre-checking enabled only valid runtimes should ever get enacted, so we can be
// reasonably sure that this is some local problem on the current node.
// reasonably sure that this is some local problem on the current node. However, as this
// particular error *seems* to indicate a deterministic error, we raise a warning.
gum::warn!(
target: LOG_TARGET,
?para_id,
?e,
"Deterministic error occurred during preparation (should have been ruled out by pre-checking phase)",
);
Err(ValidationFailed(e))
},
Ok(res) =>