{"record":{"id":"6619e12ea63345f3","repo":"nautechsystems/nautilus_trader","slug":"signer-address-derived-from-does-not-match","errorCode":null,"errorMessage":"Signer address {} derived from '{}' does not match configured wallet address {}","messagePattern":"Signer address (.+?) derived from '(.+?)' does not match configured wallet address (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":6188,"sourceCode":"                    \"Signer private key environment variable '{}' is not set\",\n                    self.config.signer_private_key_env\n                )\n            })?,\n        );\n        let encoded_key = private_key.trim();\n        let encoded_key = encoded_key.strip_prefix(\"0x\").unwrap_or(encoded_key);\n        let key_bytes = Zeroizing::new(hex::decode_array::<32>(encoded_key).map_err(|_| {\n            anyhow::anyhow!(\n                \"Signer private key in '{}' is not a valid hex private key\",\n                self.config.signer_private_key_env\n            )\n        })?);\n        let signer = PrivateKeySigner::from_slice(&key_bytes[..]).map_err(|_| {\n            anyhow::anyhow!(\n                \"Signer private key in '{}' is not a valid secp256k1 private key\",\n                self.config.signer_private_key_env\n            )\n        })?;\n\n        if signer.address() != self.wallet_address {\n            anyhow::bail!(\n                \"Signer address {} derived from '{}' does not match configured wallet address {}\",\n                signer.address(),\n                self.config.signer_private_key_env,\n                self.wallet_address\n            );\n        }\n\n        self.signer = Some(Arc::new(signer));\n        drop(payload_connect_lease);\n\n        if self.cache.has_database()\n            && let Err(e) = self.reconcile_unresolved_execution().await\n        {\n            self.signer = None;\n            return Err(e);","sourceCodeStart":6170,"sourceCodeEnd":6206,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L6170-L6206","documentation":"During execution client initialization, the adapter loads the private key from the configured env var and derives its address. If the derived signer address differs from the configured wallet_address, the configuration is inconsistent (funds/orders would be tied to the wrong account), so init fails with both addresses and the env var name.","triggerScenarios":"Starting the execution client where the private key in signer_private_key_env corresponds to a different EOA than config.wallet_address.","commonSituations":"Rotating keys (new key env var, stale wallet_address in config); copy-pasting a wallet address from a different account; multiple env vars set and the wrong one is read.","solutions":["Set config.wallet_address to the address derived from the private key in signer_private_key_env","Or set the env var to the private key matching the configured wallet address","Verify with cast wallet address --private-key $KEY (foundry) which address the key produces","Check that the intended env var is actually set and no stale/different key is loaded"],"exampleFix":"// before\nwallet_address = \"0xAAAA...\"\nSIGNER_PRIVATE_KEY=0x<key for 0xBBBB...>\n// after\nwallet_address = \"0xBBBB...\"  # address matching SIGNER_PRIVATE_KEY\nSIGNER_PRIVATE_KEY=0x<key>","handlingStrategy":"validation","validationCode":"let signer = PrivateKeySigner::from_slice(&key_bytes)?;\nif signer.address() != expected_wallet_address {\n    return Err(anyhow::anyhow!(\"key/env address {} != configured {}\", signer.address(), expected_wallet_address));\n}","typeGuard":null,"tryCatchPattern":"match ExecutionClient::new(config) {\n    Ok(c) => run(c),\n    Err(e) if e.to_string().contains(\"does not match configured wallet\") => {\n        eprintln!(\"fix wallet_address or SIGNER_PRIVATE_KEY\"); std::process::exit(1);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pre-flight check: derive the key's address at startup and compare to config before trading","Keep one private-key env var per wallet and name it after the address","Never rotate the key without updating wallet_address in the same change"],"tags":["blockchain","config-mismatch","signer","security"],"backgroundTag":"checksum-mismatch","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}