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

Add Reffered Snapshot Index to Transaction #1770

Open
GalRogozinski opened this issue Feb 27, 2020 · 3 comments
Open

Add Reffered Snapshot Index to Transaction #1770

GalRogozinski opened this issue Feb 27, 2020 · 3 comments

Comments

@GalRogozinski
Copy link
Contributor

GalRogozinski commented Feb 27, 2020

Description

Let's define Approved Transaction Root as any confirmed transaction that can be reached by walking from a given transaction down to its parents. The walk must terminate once we reached a confirmed transaction.

We want each unapproved tip to have a field that tells what is the lowest snapshotIndex of its Approved Transaction Root set.

Motivation

We will use this to define a laziness score, see #1771
We want to quickly decide whether we approve a tip that approves a tangle is "Below Max Depth"

Requirements

  1. Add a fields to each transaction oldestTxRootSnapshot, youngestTxRootSnapshot
  2. Calculate the value of the above fields in O(1) for a new incoming tip assuming that the parents have the value updated.
  3. When a new milestone comes in, make sure to update this value for tips in parallel subtangles above the confirmed transactions.

Open Questions (optional)

Perhaps it is best to release this before we are done with the new tipselection?
Whether we should persist those values or not will be handled in a different issue

@GalRogozinski
Copy link
Contributor Author

Idea: we can start calculating this value only when milestones come in by walking down from milestone until we hit tails with a different snapshot index and then walking up
This won't be O(1) though

@GalRogozinski
Copy link
Contributor Author

GalRogozinski commented Mar 12, 2020

We also need youngest transaction root snapshot. Edited the issue

@GalRogozinski GalRogozinski removed the L-Groom This issue needs to be groomed label Mar 16, 2020
@GalRogozinski GalRogozinski added this to the Corona milestone Mar 16, 2020
@GalRogozinski
Copy link
Contributor Author

milestone_numbers

@GalRogozinski GalRogozinski modified the milestones: Corona, Mardi Gras Mar 30, 2020
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

2 participants