{"record":{"id":"da387af175573f7a","repo":"diem/diem","slug":"unable-to-retrieve-the-account-address-0-stora","errorCode":null,"errorMessage":"Unable to retrieve the account address: {0}, storage error: {1}","messagePattern":"Unable to retrieve the account address: (.+?), storage error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"secure/key-manager/src/lib.rs","lineNumber":83,"sourceCode":"    WaitForReconfiguration,\n    /// Storage and the blockchain are inconsistent, wait for rotation transaction execution.\n    WaitForTransactionExecution,\n}\n\n#[allow(clippy::large_enum_variant)]\n#[derive(Debug, Error, PartialEq, Eq)]\npub enum Error {\n    #[error(\"Key mismatch, config: {0}, info: {1}\")]\n    ConfigInfoKeyMismatch(Ed25519PublicKey, Ed25519PublicKey),\n    #[error(\"Key mismatch, config: {0}, storage: {1}\")]\n    ConfigStorageKeyMismatch(Ed25519PublicKey, Ed25519PublicKey),\n    #[error(\"Data does not exist: {0}\")]\n    DataDoesNotExist(String),\n    #[error(\n        \"The diem_timestamp value on-chain isn't increasing. Last value: {0}, Current value: {1}\"\n    )]\n    LivenessError(u64, u64),\n    #[error(\"Unable to retrieve the account address: {0}, storage error: {1}\")]\n    MissingAccountAddress(String, String),\n    #[error(\"Storage error: {0}\")]\n    StorageError(String),\n    #[error(\"ValidatorInfo not found in ValidatorConfig: {0}\")]\n    ValidatorInfoNotFound(AccountAddress),\n    #[error(\"Unknown error: {0}\")]\n    UnknownError(String),\n}\n\nimpl From<anyhow::Error> for Error {\n    fn from(error: anyhow::Error) -> Self {\n        Error::UnknownError(format!(\"{}\", error))\n    }\n}\n\nimpl From<diem_client::Error> for Error {\n    fn from(error: diem_client::Error) -> Self {\n        Error::UnknownError(format!(\"Client error: {}\", error))","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/diem/diem/blob/fc4714a8ea273b6efe8b13dbce72ea60aad9a16c/secure/key-manager/src/lib.rs#L65-L101","documentation":"The key manager could not derive the validator's account address because the required account data was missing from storage. The payloads are a description of the missing address source and the underlying storage error string. It wraps the storage failure that prevented reading the account address.","triggerScenarios":"Key manager startup or transaction construction calls into storage to fetch the account address (e.g. via the config's account key chain or storage backend) and the underlying storage call returns an error, surfaced here as MissingAccountAddress.","commonSituations":"Uninitialized or misconfigured secure storage backend, wrong storage file/namespace for this validator, corrupted storage backend, or storage backend connection failures.","solutions":["Fix the underlying storage error reported in the message (permissions, missing file, wrong backend URL)","Initialize/restore storage so the account address data exists for this validator","Verify the key manager config points at the correct storage backend and namespace","Restart the key manager after remediation so it re-attempts address retrieval"],"exampleFix":"// before\nstorage: { backend: { type: \"on-disk\", path: \"/wrong/path/db\" } }\n// after\nstorage: { backend: { type: \"on-disk\", path: \"/opt/diem/data/<validator>/db\" } }","handlingStrategy":"validation","validationCode":"// ensure storage is reachable and account address is resolvable before start\nlet addr_result = storage.get::<String>(&AccountAddressPath);\nif let Err(e) = addr_result {\n    return Err(anyhow!(\"cannot start key manager; account address unavailable: {}\", e));\n}","typeGuard":"fn address_recoverable(res: &Result<AccountAddress, Error>) -> bool {\n    !matches!(res, Err(Error::MissingAccountAddress(_, _)))\n}","tryCatchPattern":"match result {\n    Err(Error::MissingAccountAddress(ctx, storage_err)) => eprintln!(\"fix storage backend ({}): {}\", storage_err, ctx),\n    Err(e) => return Err(e.into()),\n    Ok(v) => Ok(v),\n}","preventionTips":["Verify storage backend connectivity and permissions at startup health checks","Configure the correct per-validator storage path/namespace","Restore storage from backup after host migrations before restarting the manager","Alert on the wrapped storage error string to catch backend outages early"],"tags":["rust","key-management","storage","account-address"],"backgroundTag":"missing-storage-key","analyzedSha":"fc4714a8ea273b6efe8b13dbce72ea60aad9a16c","analyzedAt":"2026-09-04T21:07:05.890Z","contentChangedAt":"2026-09-04T21:07:05.890Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}