{"record":{"id":"ad5a444af255fcd8","repo":"linera-io/linera-protocol","slug":"s","errorCode":null,"errorMessage":"{s}","messagePattern":"\\{s\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-rpc/src/config.rs","lineNumber":280,"sourceCode":"            },\n        }\n    }\n}\n\nimpl<P> std::str::FromStr for ValidatorPublicNetworkPreConfig<P>\nwhere\n    P: std::str::FromStr,\n    P::Err: std::fmt::Display,\n{\n    type Err = anyhow::Error;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        let parts = s.split(':').collect::<Vec<_>>();\n        anyhow::ensure!(\n            parts.len() == 3,\n            \"Expecting format `(tcp|udp|grpc|grpcs):host:port`\"\n        );\n        let protocol = parts[0].parse().map_err(|s| anyhow::anyhow!(\"{s}\"))?;\n        let host = parts[1].to_owned();\n        let port = parts[2].parse()?;\n        Ok(ValidatorPublicNetworkPreConfig {\n            protocol,\n            host,\n            port,\n        })\n    }\n}\n\nimpl std::str::FromStr for NetworkProtocol {\n    type Err = String;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        let protocol = match s {\n            \"grpc\" => Self::Grpc(TlsConfig::ClearText),\n            \"grpcs\" => Self::Grpc(TlsConfig::Tls),\n            #[cfg(with_simple_network)]","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-rpc/src/config.rs#L262-L298","documentation":"The address had the right protocol:host:port shape, but the protocol token failed to parse; the error re-displays the inner NetworkProtocol parse message, typically `unsupported protocol: \"xyz\"`. Only tcp, udp, grpc and grpcs are accepted, and tcp/udp additionally require a binary built with the simple-network feature.","triggerScenarios":"parts[0] is something like \"http\", \"ws\", or \"GRPC\" (case-sensitive); or the value says \"tcp\"/\"udp\" while the linera binary was compiled without `with_simple_network`, in which case even valid tokens are rejected.","commonSituations":"Reusing URLs from RPC/REST docs (http/https) for validator addresses; assuming case-insensitivity; feature-flag differences between release and custom builds of linera-rpc.","solutions":["Use one of the exact lowercase tokens: tcp, udp, grpc (plaintext) or grpcs (TLS).","For HTTP-style endpoints, pick grpc/grpcs — validators do not speak http.","If tcp/udp is rejected in a custom build, rebuild with the simple-network feature or switch the validator to grpc.","Check for invisible whitespace or a capital first letter in the protocol segment."],"exampleFix":"# before: protocol token not supported by NetworkProtocol::from_str\n\"http:validator1:9000\"    # -> unsupported protocol: \"http\"\n\n# after: accepted tokens only\n\"grpc:validator1:9000\"\n\"grpcs:validator1:9000\"","handlingStrategy":"validation","validationCode":"const PROTOCOLS: &[&str] = &[\"tcp\", \"udp\", \"grpc\", \"grpcs\"];\nlet proto = s.split(':').next().unwrap_or_default();\nensure!(\n    PROTOCOLS.contains(&proto),\n    \"protocol must be one of tcp|udp|grpc|grpcs, got {proto:?}\"\n);","typeGuard":"fn is_known_protocol(p: &str) -> bool {\n    matches!(p, \"tcp\" | \"udp\" | \"grpc\" | \"grpcs\")\n}","tryCatchPattern":null,"preventionTips":["Use lowercase protocol tokens exactly as documented.","If tcp/udp are rejected in a custom build, check whether the binary was compiled without the simple-network feature."],"tags":["config","parsing","protocol","validator"],"backgroundTag":"invalid-endpoint-format","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}