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

Add consumed block header persistance in pull mechanism #267

Open
4 tasks
paweljakubas opened this issue Jan 28, 2019 · 0 comments
Open
4 tasks

Add consumed block header persistance in pull mechanism #267

paweljakubas opened this issue Jan 28, 2019 · 0 comments
Assignees
Labels
ACCEPTED ADR has been accepted

Comments

@paweljakubas
Copy link
Contributor

paweljakubas commented Jan 28, 2019

Context

We want to have two modes of operation when it comes to consuming blocks from the node. The old one (well tested, but introducing coupling) based on readerT mechanism and in essence being the push mechanism with all the responsibility of tracking consumed blocks laying on the node side. The new pull mechanism is based on active wallet side, polling tip of the block and requesting proper blocks (it is not fully tested but introduces decoupling from the node). As in the pull mechanism the responsibility to track blocks to be downloaded is on the wallet side we have to introduce mechanism of persistence. In case of push mechanism the node db is persisting all info needed to resume operation after stop. In order to have proper stop/restart we need to persist last consumed header block.

Decision

We will add last header storage added to already existed persistance mechanism for sql db and checkpoints with flush every time the new header is consumed.

Acceptance Criterias

  1. Persistance of the header of lastly consumed block has to be in wallet-db-path
  2. The mechanism must only work for pull mechanism
  3. Continuity of blocks has to be guaranteed (no holes) and all start/stop/restart scenarios (normal/backfilling/restoration) has to work properly

Development Plan

  • Added persistence of header of lastly consumed block using pull mechanism (backfilling and restoration does not count here)
  • Test start/stop/restart with different configurations (normal, backfilling, restoration)
  • update documentation accordingly
  • header persistance has to take place only when -pull-mechanism is used. No persistance in case of default push mechanism

PR

Number Base
develop

QA

Criteria Coverage
? -

Retrospective

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