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

fix: shed: backfill events from correct starting height #11720

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

arajasek
Copy link
Contributor

Related Issues

If we want to get events and other indices for the from height, we need to be starting from a tipset that is guaranteed to be later than from. The current code will incorrectly return the tipset at from in the event that the tipset at from+1 is null, and thus miss one epoch.

Proposed Changes

Request the tipset using ChainGetTipSetAfterHeight(from+1). If from+1 is non-null, this will make no difference. If from is null, this will now return the first non-null tipset at a greater height, thus giving us a tipset whose parent is at from height (or earlier, assuming from itself is null). I believe that's what we want for this code.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@Stebalien Stebalien merged commit 4bed223 into master Mar 14, 2024
90 checks passed
@Stebalien Stebalien deleted the asr/fix-events-shed branch March 14, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants