{"record":{"id":"e964d747befac825","repo":"FuelLabs/fuel-core","slug":"failed-to-get-registry-root-e964d7","errorCode":null,"errorMessage":"Failed to get registry root: {}","messagePattern":"Failed to get registry root: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/compression/src/decompress.rs","lineNumber":123,"sourceCode":"        let tx_pointer = mint.tx_pointer_mut();\n        *tx_pointer = FuelTxPointer::new(\n            block.consensus_header().height,\n            #[allow(clippy::arithmetic_side_effects)]\n            u16::try_from(transaction_count - 1)?,\n        );\n    } else {\n        anyhow::bail!(\"Last transaction is not a mint\");\n    }\n\n    #[cfg(feature = \"fault-proving\")]\n    {\n        match block {\n            VersionedCompressedBlock::V0(_) => {}\n            VersionedCompressedBlock::V1(ref block) => {\n                let registry_root_after_decompression = ctx\n                    .db\n                    .registry_root()\n                    .map_err(|e| anyhow::anyhow!(\"Failed to get registry root: {}\", e))?;\n                let registry_root_after_compression = block.header.registry_root;\n                if registry_root_after_decompression != registry_root_after_compression {\n                    anyhow::bail!(\n                        \"Registry root mismatch. registry root after decompression: {:?}, registry root after compression: {:?}\",\n                        registry_root_after_decompression,\n                        registry_root_after_compression\n                    );\n                }\n            }\n        }\n    }\n\n    Ok(PartialFuelBlock {\n        header: block.partial_block_header(),\n        transactions,\n    })\n}\n","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/compression/src/decompress.rs#L105-L141","documentation":"Under fault-proving, decompression recomputes the registry root to compare against the value recorded at compression time; if reading that root from the registry DB fails, the error is wrapped as 'Failed to get registry root: {e}' (crates/compression/src/decompress.rs:123). Like its compression-side twin (compress.rs:99), the wrapped {e} carries the real storage error. This happens after transactions have already been decompressed, so the failure aborts an otherwise successful decode.","triggerScenarios":"Decompressing a V1 VersionedCompressedBlock with fault-proving enabled while registry_root() fails on the decompression-side DB (IO error, corrupted storage, wrong/closed handle).","commonSituations":"Registry DB corruption; pointing the verifier at the wrong database or snapshot; feature-flag drift between the compressing and decompressing binaries; concurrent DB access.","solutions":["Inspect the wrapped {e} chain for the underlying storage error.","Verify the decompression side opens the same registry state that produced the block.","Align fault-proving feature flags and registry DB paths across the pipeline.","Restore/rebuild the registry storage if corrupted; do not retry against the same broken DB."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match compressed_block.decompress(&mut db).await {\n    Err(e) if e.to_string().contains(\"Failed to get registry root\") => {\n        // surface the underlying storage error; do not retry against a broken DB\n        return Err(e.context(\"registry storage failure during decompression\"));\n    }\n    r => r?,\n}","preventionTips":["Point the verifier at the exact registry DB/snapshot used at compression time.","Keep fault-proving feature flags aligned across all binaries in the pipeline.","Log the full error chain; the wrapped {e} names the real storage fault."],"tags":["rust","fuel-core","compression","fault-proving","registry","storage"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}