{"record":{"id":"4e605fd533e83bab","repo":"FuelLabs/fuel-core","slug":"unsupported-consensus","errorCode":null,"errorMessage":"Unsupported consensus: {:?}","messagePattern":"Unsupported consensus: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/services/consensus_module/src/block_verifier.rs","lineNumber":71,"sourceCode":"        &self,\n        consensus: &Consensus,\n        block: &Block,\n    ) -> anyhow::Result<()> {\n        match consensus {\n            Consensus::Genesis(_) => {\n                let expected_genesis_height = self.config.block_height;\n                let expected_genesis_da_height = self.config.da_block_height;\n                verify_genesis_block_fields(\n                    expected_genesis_height,\n                    expected_genesis_da_height,\n                    block.header(),\n                )\n            }\n            Consensus::PoA(_) => {\n                let view = self.view_provider.latest_view()?;\n                fuel_core_poa::verifier::verify_block_fields(&view, block)\n            }\n            _ => Err(anyhow::anyhow!(\"Unsupported consensus: {:?}\", consensus)),\n        }\n    }\n\n    /// Verifies the consensus of the block header.\n    pub fn verify_consensus(&self, header: &SealedBlockHeader) -> bool {\n        let SealedBlockHeader {\n            entity: header,\n            consensus,\n        } = header;\n        match consensus {\n            Consensus::Genesis(_) => true,\n            Consensus::PoA(consensus) => fuel_core_poa::verifier::verify_consensus(\n                &self.config.consensus,\n                header,\n                consensus,\n            ),\n            _ => false,\n        }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/services/consensus_module/src/block_verifier.rs#L53-L89","documentation":"Verifier::verify_block_fields only knows how to verify Consensus::Genesis and Consensus::PoA blocks; the Consensus enum is #[non_exhaustive] (crates/types/src/blockchain/consensus.rs:19), so any other variant falls into the catch-all and block verification fails with 'Unsupported consensus: {variant}'. The sibling verify_consensus returns false for the same inputs. It exists to fail loudly when a peer serves blocks this binary was never built to validate.","triggerScenarios":"Importing (p2p or relayer) a block sealed with a consensus variant this fuel-core build does not recognize — typically a newer fuel-core-types variant from an upgraded peer, or a custom fork that added a consensus variant. Also hit by manually constructed SealedBlocks using exotic Consensus values in tests.","commonSituations":"Version skew during network upgrades (one node upgraded, another not); connecting to the wrong network/chain whose producers run a different client; forked fuel-core codebases with extra consensus variants.","solutions":["Upgrade (or pin) fuel-core so the verifier's version matches the version producing the blocks on your network.","Verify all reserved peers / bootstrap nodes run compatible client versions before mixing them.","Confirm you joined the intended network (chain id, bootstrap node list) rather than a newer-protocol network."],"exampleFix":"# before (Cargo.toml mixing types produced by a newer peer)\nfuel-core-types = \"0.4x\"\n\n# after: align the whole workspace on the same release\nfuel-core-types = { path = \"../../crates/types\" }  # or pin the matching published version","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"use fuel_core_types::blockchain::consensus::Consensus;\n\nfn is_supported_consensus(consensus: &Consensus) -> bool {\n    matches!(consensus, Consensus::Genesis(_) | Consensus::PoA(_))\n}\n\n// Gate verification before calling into the verifier\nif !is_supported_consensus(&sealed_block.consensus) {\n    tracing::warn!(\"rejecting block with unsupported consensus {:?}\", sealed_block.consensus);\n    return Ok(false); // or drop the peer\n}","tryCatchPattern":"match verifier.verify_block_fields(&sealed_block.consensus, &sealed_block.entity) {\n    Err(err) if err.to_string().starts_with(\"Unsupported consensus\") => {\n        // version skew: reject the block, penalize/downgrade the peer, do not retry verification\n    }\n    other => other.map(|_| ()),\n}","preventionTips":["Keep every node on your network on the same fuel-core release during upgrades (coordinate hard forks).","Pin fuel-core-types to the workspace version instead of mixing published versions.","Treat 'Unsupported consensus' logs as a signal of peer version skew, not of a bad block per se."],"tags":["consensus","version-mismatch","block-verification","p2p","rust"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}