diff --git a/crates/sc-consensus-subspace/src/lib.rs b/crates/sc-consensus-subspace/src/lib.rs index 0cf2bca32b..bc2c1d7738 100644 --- a/crates/sc-consensus-subspace/src/lib.rs +++ b/crates/sc-consensus-subspace/src/lib.rs @@ -802,6 +802,21 @@ where .ok_or(Error::::MissingSalt(hash))? .salt; + // TODO: Hack for Gemini 1b launch. Solution range should have been updated already. + if *block.header.number() >= 33_671_u32.into() + && self.client.info().genesis_hash.as_ref() == GEMINI_1B_GENESIS_HASH + && solution_range == 12_009_599_006_321_322_u64 + { + debug!( + target: "subspace", + "Ignoring block from non-canonical fork" + ); + return Err(Error::::InvalidSolutionRange( + block.post_hash.unwrap_or_default(), + ) + .into()); + } + // We add one to the current slot to allow for some small drift. // FIXME https://github.com/paritytech/substrate/issues/1019 in the future, alter this // queue to allow deferring of headers