Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Move EOS-related stuff to HdRoot #357

@denisshevchenko

Description

@denisshevchenko

Context

Currently, EOS-related stuff (accounts public keys and address pool gap) are storing in HdAccounts (to be more precise, in HdAccountBase which is a part of HdAccount). But this solution comes with a few problems:

  • Trying to keep consistency with the address pool gaps between accounts.
  • Having to review most of our structure to work with HdAccountBase, changing in the end a lot of code that is very little concerned by the E.O. wallets.
  • Having extra checks to make sure that when accessing accounts of a wallets, we only deal with the correct sort of account (i.e. with correct branch of HdAccountBase).

So, we want to modify the HdRoot to hold a list of account public keys in a keystore fashion, as well as the address pool gap. In the end, this allows us to have very similar implementation between E.O. and F.O. wallet where they both go looking for public keys in a "keystore" from a list of keys.

Decision

Make a list of account public keys and address pool gap a part of HdRoot.

Acceptance Criterias

  1. List of account public keys must be a part of HdRoot.
  2. Address pool gap must be a part of HdRoot.

Development Plan

  • Move AddressPoolGap and [Core.PublicKey] (probably NonEmpty instead of []) to HdRoot.
  • Return HdAccountId to HdAccount.
  • Remove HdAccountBase.
  • Change all corresponding lenses, in DB-layer.
  • Change (and probably remove) all related functions. For example, update AddressPoolGap value not in corresponding accounts, but in HdRoot itself.

PR

Number Base
#? develop

QA

Criteria Coverage
? -

Retrospective

Metadata

Metadata

Assignees

Labels

ACCEPTEDADR has been accepted

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions