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

Move EOS-related stuff to HdRoot #357

Open
5 tasks
denisshevchenko opened this issue Feb 21, 2019 · 0 comments
Open
5 tasks

Move EOS-related stuff to HdRoot #357

denisshevchenko opened this issue Feb 21, 2019 · 0 comments
Assignees
Labels
ACCEPTED ADR has been accepted

Comments

@denisshevchenko
Copy link
Contributor

denisshevchenko commented Feb 21, 2019

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

@denisshevchenko denisshevchenko added the PROPOSED ADR just proposed label Feb 21, 2019
@KtorZ KtorZ added ACCEPTED ADR has been accepted and removed PROPOSED ADR just proposed labels Feb 22, 2019
@KtorZ KtorZ self-assigned this Feb 22, 2019
@KtorZ KtorZ added this to the Address Derivation à la BIP-44 milestone Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ACCEPTED ADR has been accepted
Projects
None yet
Development

No branches or pull requests

2 participants