FuelLabs/fuel-core · error
Unsupported consensus: {:?}
Error message
Unsupported consensus: {:?} What it means
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.
Source
Thrown at crates/services/consensus_module/src/block_verifier.rs:71
&self,
consensus: &Consensus,
block: &Block,
) -> anyhow::Result<()> {
match consensus {
Consensus::Genesis(_) => {
let expected_genesis_height = self.config.block_height;
let expected_genesis_da_height = self.config.da_block_height;
verify_genesis_block_fields(
expected_genesis_height,
expected_genesis_da_height,
block.header(),
)
}
Consensus::PoA(_) => {
let view = self.view_provider.latest_view()?;
fuel_core_poa::verifier::verify_block_fields(&view, block)
}
_ => Err(anyhow::anyhow!("Unsupported consensus: {:?}", consensus)),
}
}
/// Verifies the consensus of the block header.
pub fn verify_consensus(&self, header: &SealedBlockHeader) -> bool {
let SealedBlockHeader {
entity: header,
consensus,
} = header;
match consensus {
Consensus::Genesis(_) => true,
Consensus::PoA(consensus) => fuel_core_poa::verifier::verify_consensus(
&self.config.consensus,
header,
consensus,
),
_ => false,
}View on GitHub (pinned to b9d4d170da)
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.
Example fix
# before (Cargo.toml mixing types produced by a newer peer)
fuel-core-types = "0.4x"
# after: align the whole workspace on the same release
fuel-core-types = { path = "../../crates/types" } # or pin the matching published version Defensive patterns
Strategy: type-guard
Type guard
use fuel_core_types::blockchain::consensus::Consensus;
fn is_supported_consensus(consensus: &Consensus) -> bool {
matches!(consensus, Consensus::Genesis(_) | Consensus::PoA(_))
}
// Gate verification before calling into the verifier
if !is_supported_consensus(&sealed_block.consensus) {
tracing::warn!("rejecting block with unsupported consensus {:?}", sealed_block.consensus);
return Ok(false); // or drop the peer
} Try / catch
match verifier.verify_block_fields(&sealed_block.consensus, &sealed_block.entity) {
Err(err) if err.to_string().starts_with("Unsupported consensus") => {
// version skew: reject the block, penalize/downgrade the peer, do not retry verification
}
other => other.map(|_| ()),
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Block production timed out
- Manual block production is not allowed with trigger `Open`
- unable to produce blocks without a consensus key
- The block timestamp should monotonically increase
- unable to produce blocks without a signer
AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16).
Data as JSON: /api/errors/4e605fd533e83bab.
Report an issue: GitHub.