{"record":{"id":"ea6b6f7dda5677ad","repo":"linera-io/linera-protocol","slug":"no-default-chain-found-for-client","errorCode":null,"errorMessage":"No default chain found for client","messagePattern":"No default chain found for client","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-service/src/cli/main.rs","lineNumber":1033,"sourceCode":"                            }\n\n                            join_set\n                                .join_all()\n                                .await\n                                .into_iter()\n                                .collect::<Result<Vec<_>, _>>()?;\n\n                            let chains_per_wallet = benchmark_options.num_chains;\n                            info!(\n                                \"Creating {} chains per wallet ({} total chains)...\",\n                                chains_per_wallet,\n                                chains_per_wallet * processes\n                            );\n\n                            let mut join_set = JoinSet::new();\n                            for client in &clients {\n                                let default_chain_id = client.default_chain().ok_or_else(|| {\n                                    anyhow::anyhow!(\"No default chain found for client\")\n                                })?;\n                                let client = client.clone();\n                                join_set.spawn(async move {\n                                    let mut chain_ids = Vec::new();\n                                    for _ in 0..chains_per_wallet {\n                                        let (chain_id, _owner) = client\n                                            .open_chain_super_owner(\n                                                default_chain_id,\n                                                None,\n                                                benchmark_options.tokens_per_chain,\n                                            )\n                                            .await?;\n                                        chain_ids.push(chain_id);\n                                    }\n                                    Ok::<Vec<ChainId>, anyhow::Error>(chain_ids)\n                                });\n                            }\n","sourceCodeStart":1015,"sourceCodeEnd":1051,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/main.rs#L1015-L1051","documentation":"During benchmark setup, a client wallet has no default chain assigned. The multi-process benchmark iterates client wallets and calls client.default_chain() to seed new chains; Option::None here means wallet.json lists no default chain, so there is no chain to build on.","triggerScenarios":"Benchmark wallets created without a default (fresh wallet, chain list empty, or the default was forgotten/removed earlier); pointing the benchmark at a wallet file that was never fully initialized.","commonSituations":"Reusing wallet files from earlier benchmark runs that removed their chains; manually crafted wallet.json missing the default entry; forgetting the default chain with `linera wallet forget`/`set-default` before running benchmarks.","solutions":["Inspect the wallet (`linera wallet show --wallet <path>`) to list its chains and default.","Set a default chain: `linera wallet set-default <chain-id> --wallet <path>`.","If the wallet has no chains at all, re-initialize it (`linera wallet init --genesis ...`) before benchmarking.","Generate benchmark wallets with the provided generator rather than by hand."],"exampleFix":"# before: wallet used by the benchmark has chains but no default\nlinera-benchmark ... # -> \"No default chain found for client\"\n\n# after: assign a default chain first\nlinera wallet show --wallet bench-wallet-0.json\nlinera wallet set-default <chain-id-from-show> --wallet bench-wallet-0.json","handlingStrategy":"validation","validationCode":"let Some(default) = client.default_chain() else {\n    anyhow::bail!(\n        \"wallet has no default chain — run `linera wallet set-default <id>` first\"\n    );\n};","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `linera wallet show` on every benchmark wallet before starting the run.","Create wallets with the benchmark generator so defaults are always set.","Never reuse wallets whose chains were forgotten in a prior run."],"tags":["wallet","benchmark","default-chain","cli"],"backgroundTag":"missing-default-chain","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}