{"record":{"id":"be2cf8fc7e5e9a05","repo":"linera-io/linera-protocol","slug":"the-chain-with-the-id-returned-by-the-faucet-is-no","errorCode":null,"errorMessage":"The chain with the ID returned by the faucet is not owned by you. Please make sure you are connecting to a genuine faucet.","messagePattern":"The chain with the ID returned by the faucet is not owned by you\\. Please make sure you are connecting to a genuine faucet\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"linera-service/src/cli/main.rs","lineNumber":1832,"sourceCode":"            }) => {\n                let start_time = Instant::now();\n                let owner: AccountOwner = keystore.generate_key().await?.into();\n\n                info!(\n                    \"Requesting a new chain for owner {owner} using the faucet at address \\\n                     {faucet_url}\",\n                );\n\n                let destination = if fund_owner_account {\n                    owner\n                } else {\n                    AccountOwner::CHAIN\n                };\n                let description = cli_wrappers::Faucet::new(faucet_url)\n                    .claim_to(&owner, &destination)\n                    .await?;\n\n                ensure!(\n                    description.config().ownership.is_owner(&owner),\n                    \"The chain with the ID returned by the faucet is not owned by you. \\\n                    Please make sure you are connecting to a genuine faucet.\"\n                );\n\n                wallet.insert(\n                    description.id(),\n                    &wallet::Chain {\n                        owner: Some(owner),\n                        ..(&description).into()\n                    },\n                )?;\n\n                if set_default {\n                    wallet.set_default_chain(description.id())?;\n                }\n\n                let context = options","sourceCodeStart":1814,"sourceCodeEnd":1850,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/main.rs#L1814-L1850","documentation":"During `linera wallet request-chain --faucet <URL>` the CLI generates a fresh key, asks the faucet for a chain via claim_to, then verifies the returned ChainDescription actually lists that key as an owner. If the faucet hands back a chain owned by someone else, this check fails — the classic signature of a fake or man-in-the-middle faucet.","triggerScenarios":"Running `linera wallet request-chain --faucet ...` (with or without fund-owner-account) where the faucet's claim_to response describes a chain whose ownership does not include the newly generated owner key.","commonSituations":"Typo-squatted or spoofed faucet URLs copied from tutorials; a MITM proxy rewriting responses; connecting a wallet to a faucet from a different network or genesis than intended.","solutions":["Verify the faucet URL against the network's official documentation (exact scheme, host, port)","Re-run against a known-genuine faucet and never use the returned chain even if the command partially succeeded","If you operate the faucet, check its genesis and chain-assignment logic: it must assign ownership to the requesting owner","Treat repeat occurrences as a security incident: rotate keys and audit which endpoint produced them"],"exampleFix":"// before\nlet description = Faucet::new(faucet_url).claim_to(&owner, &destination).await?; // trust blindly\n\n// after\nlet description = Faucet::new(faucet_url).claim_to(&owner, &destination).await?;\nensure!(\n    description.config().ownership.is_owner(&owner),\n    \"faucet returned a chain we do not own -- do not use it\"\n);","handlingStrategy":"validation","validationCode":"let description = Faucet::new(faucet_url).claim_to(&owner, &destination).await?;\nif !description.config().ownership.is_owner(&owner) {\n    anyhow::bail!(\"faucet returned a chain not owned by us -- refusing to import it\");\n}","typeGuard":"fn chain_owned_by(description: &ChainDescription, owner: &AccountOwner) -> bool {\n    description.config().ownership.is_owner(owner)\n}","tryCatchPattern":null,"preventionTips":["Use faucet URLs only from the network's official documentation/genesis","Always re-verify ownership before importing a faucet-returned chain into a wallet","Prefer HTTPS faucet endpoints and verify TLS certificates"],"tags":["faucet","security","wallet","ownership","cli"],"backgroundTag":"faucet-chain-not-owned","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}