diff --git a/client/distance/src/lib.rs b/client/distance/src/lib.rs index df2e2451bc695a02d9f5a2c908bf42bd61f1f6e5..c36091612c42bb77aca3b7a61ef62e796f4ad713 100644 --- a/client/distance/src/lib.rs +++ b/client/distance/src/lib.rs @@ -40,6 +40,9 @@ use sp_runtime::{generic::BlockId, traits::Block as BlockT, AccountId32}; use std::path::PathBuf; /// The file version that should match the distance oracle one. +/// This ensures that the smith avoids accidentally submitting invalid data +/// in case there are changes in logic between the runtime and the oracle, +/// thereby preventing potential penalties. const VERSION_PREFIX: &str = "001-"; type IdtyIndex = u32; @@ -152,7 +155,7 @@ where Err(e) => { match e.kind() { std::io::ErrorKind::NotFound => { - log::debug!("🧙 [distance oracle] Evaluation result file not found"); + log::debug!("🧙 [distance oracle] Evaluation result file not found. Please ensure that the oracle version matches {}", VERSION_PREFIX); } _ => { log::error!( diff --git a/distance-oracle/src/lib.rs b/distance-oracle/src/lib.rs index a801037752205edd676c8ae3645b54a2919e6ae1..93b8298f8d5646f71a30c2f7c01b156943d8413f 100644 --- a/distance-oracle/src/lib.rs +++ b/distance-oracle/src/lib.rs @@ -64,7 +64,10 @@ use log::{debug, info, warn}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use std::{io::Write, path::PathBuf}; -/// The file version that must match the version used by the inherent data provider. +/// The file version must match the version used by the inherent data provider. +/// This ensures that the smith avoids accidentally submitting invalid data +/// in case there are changes in logic between the runtime and the oracle, +/// thereby preventing potential penalties. const VERSION_PREFIX: &str = "001-"; #[subxt::subxt(runtime_metadata_path = "../resources/metadata.scale")]