diff --git a/Cargo.lock b/Cargo.lock index 8481fc1..85191fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1576,7 +1576,7 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "contract-client" version = "1.0.0-rc1" -source = "git+ssh://git@github.com/subsquid/subsquid-network.git#784430bc9cbab91a987b3037b20677891e3153ba" +source = "git+ssh://git@github.com/subsquid/subsquid-network.git#7412a2c565da669a6845d7c5080a5b77d5f53828" dependencies = [ "async-trait", "clap", @@ -6371,7 +6371,7 @@ dependencies = [ [[package]] name = "subsquid-messages" version = "1.0.0-rc1" -source = "git+ssh://git@github.com/subsquid/subsquid-network.git#784430bc9cbab91a987b3037b20677891e3153ba" +source = "git+ssh://git@github.com/subsquid/subsquid-network.git#7412a2c565da669a6845d7c5080a5b77d5f53828" dependencies = [ "anyhow", "hex", @@ -6386,7 +6386,7 @@ dependencies = [ [[package]] name = "subsquid-network-transport" version = "1.0.0-rc1" -source = "git+ssh://git@github.com/subsquid/subsquid-network.git#784430bc9cbab91a987b3037b20677891e3153ba" +source = "git+ssh://git@github.com/subsquid/subsquid-network.git#7412a2c565da669a6845d7c5080a5b77d5f53828" dependencies = [ "anyhow", "async-trait", diff --git a/crates/network-scheduler/src/scheduler.rs b/crates/network-scheduler/src/scheduler.rs index 667caec..700892d 100644 --- a/crates/network-scheduler/src/scheduler.rs +++ b/crates/network-scheduler/src/scheduler.rs @@ -21,7 +21,10 @@ use crate::scheduling_unit::{SchedulingUnit, UnitId}; use crate::worker_state::{JailReason, WorkerState}; lazy_static! { - pub static ref SUPPORTED_WORKER_VERSIONS: VersionReq = ">=0.4.0".parse().unwrap(); + pub static ref SUPPORTED_WORKER_VERSIONS: [VersionReq; 2] = [ + ">=0.4.0".parse().unwrap(), + ">=1.0.0-rc1".parse().unwrap(), // >=0.4.0 does not match release candidates + ]; } const WORKER_ID_HEADER: &str = "worker-id"; const WORKER_SIGNATURE_HEADER: &str = "worker-signature"; @@ -87,7 +90,10 @@ impl Scheduler { /// Register ping msg from a worker. Returns worker status if ping was accepted, otherwise None pub fn ping(&mut self, worker_id: PeerId, msg: Ping) -> WorkerStatus { let version = msg.sem_version(); - if !SUPPORTED_WORKER_VERSIONS.matches(&version) { + if !SUPPORTED_WORKER_VERSIONS + .iter() + .any(|v| v.matches(&version)) + { log::debug!("Worker {worker_id} version not supported: {}", version); return WorkerStatus::UnsupportedVersion(()); } diff --git a/crates/query-gateway/src/server.rs b/crates/query-gateway/src/server.rs index dcaeefd..f5cf2d2 100644 --- a/crates/query-gateway/src/server.rs +++ b/crates/query-gateway/src/server.rs @@ -28,7 +28,10 @@ use crate::task::Task; const COMP_UNITS_PER_QUERY: u32 = 1; lazy_static! { - pub static ref SUPPORTED_WORKER_VERSIONS: VersionReq = ">=0.3.0".parse().unwrap(); + pub static ref SUPPORTED_WORKER_VERSIONS: [VersionReq; 2] = [ + ">=0.4.0".parse().unwrap(), + ">=1.0.0-rc1".parse().unwrap(), // >=0.4.0 does not match release candidates + ]; } pub struct Server + Send + Unpin + 'static> { @@ -230,7 +233,10 @@ impl + Send + Unpin + 'static> Server { log::trace!("Ping from {peer_id}: {ping:?}"); let version = ping.sem_version(); - if !SUPPORTED_WORKER_VERSIONS.matches(&version) { + if !SUPPORTED_WORKER_VERSIONS + .iter() + .any(|v| v.matches(&version)) + { return log::debug!("Worker {peer_id} version not supported: {}", version); }