Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Analyze milestones as soon as they arrive #1448

Open
9 tasks
GalRogozinski opened this issue May 13, 2019 · 1 comment
Open
9 tasks

Analyze milestones as soon as they arrive #1448

GalRogozinski opened this issue May 13, 2019 · 1 comment

Comments

@GalRogozinski
Copy link
Contributor

GalRogozinski commented May 13, 2019

Description

As soon as we hear on a milestone, add it to the milestone to be analyzed queue. If we hear of a new milestone candidate we analyze it right away. To avoid having to read it from the DB afterwards.

At the moment, we load all the milestones that we want to analyze from the DB.

Motivation

Save on DB reads and synchronize your node more quickly

Requirements

  • We hear of a milestone candidate and we start analyzing it right away.
  • The latestSolidMilestoneTracker keeps on solidifying according to index order.
  • We bootstrap from a DB and we already have the milestones in the DB we bootstrap from, but we don't have the state - to make sure we read the milestones from the DB.
  • We check milestone candidates for whether they are in the DB already (by index), and if we already validated them, we discard the TX.
  • The list (queue) of milestone hashes waiting to solidify (needs to be capped at Y milestones.)
  • The latestMilestoneTracker only needs a list of milestones, no need for a map. (Also capped at Y milestones.)
  • We should maybe have a milestoneCandidate map in the milestoneSolidifier so that we can get the milestones in the right order.
  • We perform simple syntactic checks - size of the bundle, index in obsoleteTag, and if fail we skip the signature validation
  • We only store milestone hashes in the queues

Follow-up

Another follow up issue will be discarding the milestones that we have already loaded.

@jakubcech jakubcech added the L-Groom This issue needs to be groomed label May 13, 2019
@kwek20 kwek20 self-assigned this Jun 10, 2019
@jakubcech jakubcech removed the L-Groom This issue needs to be groomed label Jun 11, 2019
@GalRogozinski
Copy link
Contributor Author

We need to pay attention to --rescan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants