Scorum
Public Member Functions | Public Attributes | List of all members
scorum::protocol::recover_account_operation Struct Reference

Recovers an account to a new authority using a previous authority. More...

#include <scorum_operations.hpp>

Inheritance diagram for scorum::protocol::recover_account_operation:
scorum::protocol::base_operation

Public Member Functions

void get_required_authorities (std::vector< authority > &a) const
 
void validate () const
 
- Public Member Functions inherited from scorum::protocol::base_operation
void get_required_authorities (std::vector< authority > &) const
 
void get_required_active_authorities (flat_set< account_name_type > &) const
 
void get_required_posting_authorities (flat_set< account_name_type > &) const
 
void get_required_owner_authorities (flat_set< account_name_type > &) const
 
bool is_virtual () const
 
void validate () const
 

Public Attributes

account_name_type account_to_recover
 The account to be recovered. More...
 
authority new_owner_authority
 The new owner authority as specified in the request account recovery operation. More...
 
authority recent_owner_authority
 
extensions_type extensions
 ownership of the account to be recovered. More...
 

Detailed Description

Recovers an account to a new authority using a previous authority.

Recover an account to a new authority using a previous authority and verification of the recovery account as proof of identity. This operation can only succeed if there was a recovery request sent by the account's recover account.

In order to recover the account, the account holder must provide proof of past ownership and proof of identity to the recovery account. Being able to satisfy an owner authority that was used in the past 30 days is sufficient to prove past ownership. The get_owner_history function in the database API returns past owner authorities that are valid for account recovery.

Proving identity is an off chain contract between the account holder and the recovery account. The recovery request contains a new authority which must be satisfied by the account holder to regain control. The actual process of verifying authority may become complicated, but that is an application level concern, not a blockchain concern.

This operation requires both the past and future owner authorities in the operation because neither of them can be derived from the current chain state. The operation must be signed by keys that satisfy both the new owner authority and the recent owner authority. Failing either fails the operation entirely.

If a recovery request was made inadvertantly, the account holder should contact the recovery account to have the request deleted.

The two setp combination of the account recovery request and recover is safe because the recovery account never has access to secrets of the account to recover. They simply act as an on chain endorsement of off chain identity. In other systems, a fork would be required to enforce such off chain state. Additionally, an account cannot be permanently recovered to the wrong account. While any owner authority from the past 30 days can be used, including a compromised authority, the account can be continually recovered until the recovery account is confident a combination of uncompromised authorities were used to recover the account. The actual process of verifying authority may become complicated, but that is an application level concern, not the blockchain's concern.

Definition at line 643 of file scorum_operations.hpp.

Member Function Documentation

◆ get_required_authorities()

void scorum::protocol::recover_account_operation::get_required_authorities ( std::vector< authority > &  a) const
inline

Definition at line 654 of file scorum_operations.hpp.

◆ validate()

void scorum::protocol::recover_account_operation::validate ( ) const

Definition at line 249 of file scorum_operations.cpp.

Member Data Documentation

◆ account_to_recover

account_name_type scorum::protocol::recover_account_operation::account_to_recover

The account to be recovered.

Definition at line 645 of file scorum_operations.hpp.

◆ extensions

extensions_type scorum::protocol::recover_account_operation::extensions

ownership of the account to be recovered.

Extensions. Not currently used.

Definition at line 652 of file scorum_operations.hpp.

◆ new_owner_authority

authority scorum::protocol::recover_account_operation::new_owner_authority

The new owner authority as specified in the request account recovery operation.

Definition at line 647 of file scorum_operations.hpp.

◆ recent_owner_authority

authority scorum::protocol::recover_account_operation::recent_owner_authority

A previous owner authority that the account holder will use to prove past

Definition at line 649 of file scorum_operations.hpp.


The documentation for this struct was generated from the following files: