Skip to content
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

tipSetCache.best() returns nil tipset #3554

Closed
hannahhoward opened this issue Sep 4, 2020 · 1 comment · Fixed by #3611
Closed

tipSetCache.best() returns nil tipset #3554

hannahhoward opened this issue Sep 4, 2020 · 1 comment · Fixed by #3611
Labels
dif/hard Suggests that having worked on the specific component affected by this issue is important effort/hours Effort: Hours help wanted Extra attention is needed kind/bug Kind: Bug P1 P1: Must be resolved

Comments

@hannahhoward
Copy link
Contributor

Describe the bug
We've had various reports of panics due to the checkFunc in the eventsAPI.Called interface being passed a nil tipset (#2865, also from DealBot operators). We've resolved this on an individual basis by adding nil checks:
#3553
#3011

It seems like this will be an ongoing issue unless:

  • We decide passing a nil tipset check to checkFunc is expected behavior, in which case, we should document it.
  • We investigate and determine why tipsetCache.best() is returning nil tipsets (I have various hypothesis)
@hannahhoward hannahhoward added area/chain/misc dif/hard Suggests that having worked on the specific component affected by this issue is important effort/hours Effort: Hours need/analysis Hint: Needs Analysis kind/bug Kind: Bug P1 P1: Must be resolved help wanted Extra attention is needed labels Sep 4, 2020
@hannahhoward
Copy link
Contributor Author

Possible hypothesis and possible solution:

Why it happens:

  • tipsets get reverted?
  • thread sync/race conditions
  • kind of hard to track down

Possible solutions:

Simple:
if tsc.cache[tsc.best] is nil, just fall back to loading directly from the API (i.e. tipsetCache already has a tipsetByHeight function (actually api.ChainGetTipsetByHeight when initialized in Events API -- if we added a chainHead function we could call that and supply it api.ChainHead in events API)

More complex:
Try to figure out how we're ending up in the condition where there is no value at tsc.best and resolve... probably not worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/hard Suggests that having worked on the specific component affected by this issue is important effort/hours Effort: Hours help wanted Extra attention is needed kind/bug Kind: Bug P1 P1: Must be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants