{"record":{"id":"844a560a397859ad","repo":"FuelLabs/fuel-core","slug":"registry-root-mismatch-registry-root-after-decomp","errorCode":null,"errorMessage":"Registry root mismatch. registry root after decompression: {:?}, registry root after compression: {:?}","messagePattern":"Registry root mismatch\\. registry root after decompression: (.+?), registry root after compression: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/compression/src/decompress.rs","lineNumber":126,"sourceCode":"            #[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\npub struct DecompressCtx<D> {\n    pub config: Config,\n    /// Timestamp of the block being decompressed","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/compression/src/decompress.rs#L108-L144","documentation":"With fault-proving enabled, decompression recomputes the registry root over the decompression-side registry and compares it with registry_root stored in the compressed block header (V1); any difference aborts with 'Registry root mismatch…' (crates/compression/src/decompress.rs:126). This is the fault-proving integrity check firing: the registry content used to decompress differs from the content used to compress — e.g. pruned/missing registrations, divergent temporal registry retention, or the wrong DB. It signals real state divergence, not a transient failure.","triggerScenarios":"Decompressing a V1 compressed block against a registry DB whose contents differ from compression time: registrations pruned after temporal_registry_retention elapsed, registrations at different indices, or an entirely different registry state.","commonSituations":"Replaying or fault-proving old blocks after registry entries expired; verifier pointed at a different snapshot than the producer; partial registry import; temporal_registry_retention configured differently between compressor and verifier.","solutions":["Restore the registry state as of the block's height so every referenced registration is present.","Align temporal_registry_retention (crates/compression/src/config.rs) between producing and verifying setups.","If entries legitimately expired, re-register and re-compress the block rather than decompressing against stale registry state.","Treat occurrences as a verification failure: capture the block and registry roots for forensics instead of retrying."],"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(\"Registry root mismatch\") => {\n        // integrity failure: halt verification, preserve the block + registry roots for forensics;\n        // retrying against the same registry state will fail again\n        return Err(e.context(\"registry divergence during fault proving\"));\n    }\n    r => r?,\n}","preventionTips":["Restore the registry state as of the block's height before verifying old blocks.","Keep temporal_registry_retention identical on producing and verifying sides (crates/compression/src/config.rs).","Re-register and re-compress blocks whose registry entries have legitimately expired.","Treat any occurrence as a verification failure to investigate, never as a transient error."],"tags":["rust","fuel-core","compression","fault-proving","registry","data-integrity"],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}