-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add method for finding oldest state and computing state #1038
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1038 +/- ##
======================================
Coverage 34.4% 34.4%
======================================
Files 44 44
Lines 2925 2925
======================================
Hits 1008 1008
Misses 1821 1821
Partials 96 96 |
lens/lily/impl.go
Outdated
HasReceipts: maybeFullTS.HasReceipts, | ||
HasState: maybeFullTS.HasState, | ||
}) | ||
if !maybeFullTS.HasState || int64(head.Height()-abi.ChainEpoch(i)) == limit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is probably wrong due to null rounds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be sufficient to allow for some N number of null rounds before breaking? A value which skips null rounds and increments M until it's more than N and then break? Is there another way you would approach this?
781795a
to
9d827a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! if i could give feedback, would it be possible to have a json output option of find-oldest
? prob not in scope of this pr.
* chore: Refactor state list commands into one; Output JSON * chore: Add docs and prefixes * chore: fmt the go Co-authored-by: Mike Greenberg <[email protected]>
c149d21
to
ad7e623
Compare
@kasteph this PR exports the output in JSON:
(If you want to find oldest state, run with |
@placer14 thanks! I probably missed the |
What
This PR adds 4 new commands to the chain command.
find oldest
Finds the range of states lily has a complete state tree for:
list states
Lists all states lily has and their completeness:
compute
compute the state of a tipset specified by epoch:
compute range
computes a range of tipsets specified by epochs: