{"record":{"id":"469d9f0801a26ad4","repo":"linera-io/linera-protocol","slug":"found-faulty-validators","errorCode":null,"errorMessage":"Found faulty validators","messagePattern":"Found faulty validators","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-service/src/cli/validator.rs","lineNumber":698,"sourceCode":"        println!(\"Local Node:\");\n        local_results.print(None, None, None, None);\n\n        // Print validator results (only differences from local node)\n        for (name, address, votes, results) in &validator_results {\n            results.print(\n                Some(name),\n                Some(address),\n                Some(*votes),\n                Some(&local_results),\n            );\n        }\n\n        if !faulty_validators.is_empty() {\n            println!(\"\\nFaulty validators:\");\n            for ((name, address), errors) in faulty_validators {\n                println!(\"  {} at {}: {} error(s)\", name, address, errors.len());\n            }\n            anyhow::bail!(\"Found faulty validators\");\n        }\n\n        Ok(())\n    }\n}\n\nimpl Query {\n    async fn run(\n        &self,\n        context: &ClientContext<impl linera_core::Environment>,\n    ) -> anyhow::Result<()> {\n        let node = context.make_node_provider().make_node(&self.address)?;\n        let chain_id = self.chain_id.unwrap_or_else(|| context.default_chain());\n        println!(\"Querying validator about chain {chain_id}.\\n\");\n\n        let results = context\n            .query_validator(&self.address, &node, chain_id, self.public_key.as_ref())\n            .await;","sourceCodeStart":680,"sourceCodeEnd":716,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/validator.rs#L680-L716","documentation":"After querying validators, this run() prints every validator classified as faulty — name, address, and its accumulated error count — and then bails. 'Faulty' means the validator was reached but its behavior/answers during the query session indicated problems (errors while processing requests), as distinct from merely unreachable validators. The printed list is the diagnostic; the bail makes the failure visible in the exit code.","triggerScenarios":"Running the validator inspection command when `faulty_validators` is non-empty: validators that produced errors during the query session (invalid responses, protocol-level errors, corrupted state).","commonSituations":"Fault-injection experiments on local test nets; a validator with corrupted storage after an unclean shutdown; version skew between the querying client and one validator.","solutions":["Use the printed 'Faulty validators:' list to identify which node misbehaved, then inspect its logs","Restart the faulty validator(s) and re-run the query","For local nets with corrupted state, tear down and re-create: `linera net down` then `linera net up`","Verify client and validator binary versions match (version skew often looks like faults)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match run(&mut net).await {\n    Err(e) if e.to_string().contains(\"Found faulty validators\") => {\n        // the faulty list (name/address/error count) was printed to stdout;\n        // capture and parse it to decide: restart vs recreate the net\n        handle_faulty_validators(&captured_output);\n    }\n    result => result?,\n}","preventionTips":["Run the query command with stdout captured so the printed faulty list is machine-parseable on failure","Keep client and validator binaries on the same version — skew frequently masquerades as faults","For fault-injection experiments, expect this bail and assert on it rather than treating it as spurious"],"tags":["validators","fault-detection","network-health","linera-cli"],"backgroundTag":"health-check-failed","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}