{"record":{"id":"9a40f461f585b3ad","repo":"FuelLabs/fuel-core","slug":"cannot-have-a-da-height-above-zero-without-a-relay-9a40f4","errorCode":null,"errorMessage":"Cannot have a da height above zero without a relayer","messagePattern":"Cannot have a da height above zero without a relayer","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/fuel-core/src/service/adapters/producer.rs","lineNumber":173,"sourceCode":"impl fuel_core_producer::ports::Relayer for MaybeRelayerAdapter {\n    async fn wait_for_at_least_height(\n        &self,\n        height: &DaBlockHeight,\n    ) -> anyhow::Result<DaBlockHeight> {\n        #[cfg(feature = \"relayer\")]\n        {\n            match &self.relayer_synced {\n                Some(sync) => {\n                    sync.await_at_least_synced(height).await?;\n                    let highest = sync.get_finalized_da_height();\n                    Ok(highest)\n                }\n                _ => Ok(*height),\n            }\n        }\n        #[cfg(not(feature = \"relayer\"))]\n        {\n            anyhow::ensure!(\n                **height == 0,\n                \"Cannot have a da height above zero without a relayer\"\n            );\n            // If the relayer is not enabled, then all blocks are zero.\n            Ok(0u64.into())\n        }\n    }\n\n    async fn get_cost_and_transactions_number_for_block(\n        &self,\n        height: &DaBlockHeight,\n    ) -> anyhow::Result<RelayerBlockInfo> {\n        #[cfg(feature = \"relayer\")]\n        {\n            let (gas_cost, tx_count) = self\n                .relayer_database\n                .get_events(height)?\n                .iter()","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/fuel-core/src/service/adapters/producer.rs#L155-L191","documentation":"When fuel-core is built without the `relayer` feature, the producer hard-codes DA height 0 and rejects anything else: this is the check on the DA-height resolution path (producer.rs:173). With the feature enabled the same call instead waits for the relayer sync and returns the finalized DA height. Any block production requiring da_block_height > 0 is therefore impossible on a relayer-less build.","triggerScenarios":"Producing a block on a non-relayer build where the chain config / snapshot sets da_block_height above zero, so **height != 0 fails the ensure!.","commonSituations":"Continuing a chain created by a relayer-enabled deployment on a binary compiled without the feature; custom chains with da_block_height set; downgrading a deployment to a build lacking the feature.","solutions":["Build/run with the relayer enabled: `--features relayer` plus relayer configuration (Ethereum endpoint).","Or start a fresh chain with da_block_height = 0 on non-relayer builds.","Or move the chain back to relayer-enabled nodes instead of producing on this build.","Verify the running binary actually includes the feature (build flags, feature list)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before block production, assert build/DA-height compatibility:\nfn can_handle_da_height(da_block_height: u64) -> bool {\n    if cfg!(feature = \"relayer\") {\n        true // heights validated against the relayer at runtime\n    } else {\n        da_block_height == 0\n    }\n}\nassert!(can_handle_da_height(config.chain_conf.da_block_height.into()));","typeGuard":"fn relayer_enabled() -> bool {\n    cfg!(feature = \"relayer\")\n}","tryCatchPattern":"if let Err(e) = produce_result {\n    if e.to_string().contains(\"without a relayer\") {\n        // fatal configuration mismatch: rebuild with `relayer` feature or\n        // restart the chain with da_block_height = 0\n        return Err(anyhow!(\"node built without relayer but chain needs DA heights > 0\"));\n    }\n    return Err(e);\n}","preventionTips":["Match build features to chain requirements: any da_block_height > 0 requires `--features relayer`.","Encode the requirement in deployment manifests so non-relayer builds never receive such chains.","Check the feature set of production binaries as part of release validation."],"tags":["relayer","da-height","compile-features","configuration"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}