Skip to content
Snippets Groups Projects
Unverified Commit b0e55330 authored by bgallois's avatar bgallois
Browse files

add oracle file versioning

parent d84ed2c2
No related branches found
No related tags found
1 merge request!290Fix #262 distance oracle pool index
Pipeline #38906 passed
......@@ -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!(
......
......@@ -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")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment