{"record":{"id":"5ba5193e548c37f7","repo":"linera-io/linera-protocol","slug":"invalid-owner-address","errorCode":null,"errorMessage":"Invalid owner address","messagePattern":"Invalid owner address","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"web/@linera/client/src/signer/PrivateKey.ts","lineNumber":45,"sourceCode":"    return PrivateKey.fromMnemonic(mnemonic);\n  }\n\n  static fromMnemonic(mnemonic: string): PrivateKey {\n    const wallet = ethers.Wallet.fromPhrase(mnemonic);\n    return new PrivateKey(wallet.privateKey);\n  }\n\n  public address(): string {\n    return this.wallet.address;\n  }\n\n  async sign(owner: string, value: Uint8Array): Promise<string> {\n    if (\n      typeof owner !== \"string\" ||\n      !ethers.isAddress(owner) ||\n      this.wallet.address.toLowerCase() !== owner.toLowerCase()\n    ) {\n      throw new Error(\"Invalid owner address\");\n    }\n    // ethers expects a string or Bytes for EIP-191\n    const signature = await this.wallet.signMessage(value);\n\n    return signature;\n  }\n\n  async getPublicKey(owner: string): Promise<string> {\n    if (\n      typeof owner !== \"string\" ||\n      !ethers.isAddress(owner) ||\n      this.wallet.address.toLowerCase() !== owner.toLowerCase()\n    ) {\n      throw new Error(\"Invalid owner address\");\n    }\n    return this.wallet.signingKey.publicKey;\n  }\n","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/web/@linera/client/src/signer/PrivateKey.ts#L27-L63","documentation":"WalletSynchronizationError in pending_message_bundles fires when a chain has only super owners (no regular owners). Super-owner chains have no automatic leader, so nobody regularly proposes blocks; the client therefore requires that the local node is at least as advanced as the wallet's trusted state (initial_next_block_height). If the local node is behind the certificates the wallet already trusts, querying pending messages would return an incomplete view, so the client refuses and asks you to synchronize with validators.","triggerScenarios":"Calling pending_message_bundles (directly or via prepend_epochs_messages_and_events, query_balances_with_owner) on a chain whose ownership.is_super_owner_no_regular_owners(owner) is true, while info.next_block_height < self.initial_next_block_height. Producers: reading messages/balances on a super-owner chain right after wallet load, or after the wallet received certificates (e.g. via a faucet or another node) that the local node has not processed.","commonSituations":"Super-owner (manually operated) chains used for benchmarks or scheduled operations; restarting a wallet against a fresh local node/validator; moving a wallet file between environments where the new node lacks the trusted blocks.","solutions":["Call client.synchronize_from_validators() (or synchronize_up_to(initial_next_block_height)) on this chain before reading pending messages or balances.","Run the wallet/service against a validator that actually has the missing certificates (check the --wallet with-grpc* / validator endpoints config).","As a super owner, periodically propose a block (e.g. via `linera process-inbox` / retry-pending-block) so the chain advances and the invariant stays easy to maintain.","If you never need this guard, add a regular owner to the chain so automatic synchronization applies."],"exampleFix":"// before: reading pending messages on a super-owner chain with a stale local node\nlet bundles = client.pending_message_bundles().await?; // WalletSynchronizationError\n\n// after: sync the trusted state into the local node first\nclient.synchronize_from_validators().await?;\nlet bundles = client.pending_message_bundles().await?;","handlingStrategy":"retry","validationCode":"// For super-owner chains, ensure the node caught up before reading pending data\nlet info = client.chain_info().await?;\nif info.next_block_height < client.initial_next_block_height() {\n    client.synchronize_from_validators().await?;\n}","typeGuard":null,"tryCatchPattern":"match client.pending_message_bundles().await {\n    Ok(bundles) => bundles,\n    Err(Error::WalletSynchronizationError) => {\n        client.synchronize_from_validators().await?;\n        client.pending_message_bundles().await?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["After loading a wallet, always synchronize chains before read APIs on super-owner chains.","Run clients against validators that hold the wallet's trusted certificates.","Advance super-owner chains periodically so local nodes stay close to the trusted tip.","Consider adding a regular owner if automatic synchronization is required."],"tags":["linera","super-owner","wallet-sync","stale-state","synchronization"],"backgroundTag":"node-out-of-sync","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}