Skip to content

账户恢复操作

恢复机制允许预先指定的受信账户(恢复账户)使用最近有效的主权限帮助恢复对被入侵账户的访问。

恢复流程:

request_account_recovery  →  recover_account  (24 小时内)
change_recovery_account   (30 天延迟后生效)

request_account_recovery_operation(ID 12)

授权: recovery_accountactive

发起账户恢复请求。恢复账户为被入侵账户提议新的主权限;账户所有者有 24 小时通过 recover_account_operation 确认。

字段类型描述
recovery_accountaccount_name_type受信恢复账户
account_to_recoveraccount_name_type要恢复的被入侵账户
new_master_authorityauthority确认后要分配的新主权限
extensionsextensions_type始终为 []
json
[12, {
  "recovery_account": "recover-service",
  "account_to_recover": "alice",
  "new_master_authority": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [["VIZ5newkey...", 1]]
  },
  "extensions": []
}]
  • 只有 account_to_recover 的指定恢复账户才能发送此操作。
  • 每个账户只允许一个活跃恢复请求;再次发送会更新请求并重置 24 小时窗口。
  • 取消:将 new_master_authority.weight_threshold 设置为 0

recover_account_operation(ID 13)

授权: 同时满足 new_master_authority recent_master_authority 的签名

通过证明过去的所有权确认恢复。必须在恢复请求后 24 小时内广播。

字段类型描述
account_to_recoveraccount_name_type正在恢复的账户
new_master_authorityauthority新的主权限(必须与恢复请求完全匹配)
recent_master_authorityauthority过去 30 天内有效的主权限
extensionsextensions_type始终为 []
json
[13, {
  "account_to_recover": "alice",
  "new_master_authority": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [["VIZ5newkey...", 1]]
  },
  "recent_master_authority": {
    "weight_threshold": 1,
    "account_auths": [],
    "key_auths": [["VIZ5oldkey...", 1]]
  },
  "extensions": []
}]
  • 交易必须由同时满足新旧两种权限的密钥签名。
  • new_master_authority 必须与待处理恢复请求中的完全一致。
  • 恢复后,旧的主密钥失效。

change_recovery_account_operation(ID 14)

授权: account_to_recovermaster

更改恢复账户。更改在 30 天延迟后生效,以防止攻击者在活跃攻击期间替换恢复账户。

字段类型描述
account_to_recoveraccount_name_type更改其恢复账户的账户
new_recovery_accountaccount_name_type新的恢复账户名
extensionsextensions_type始终为 []
json
[14, {
  "account_to_recover": "alice",
  "new_recovery_account": "new-recovery-service",
  "extensions": []
}]
  • new_recovery_account 必须是现有账户。
  • 如果 new_recovery_account"",得票最多的验证者成为恢复账户。

参见:数据类型操作概述账户