Skip to content

Conversation

@DeVikingMark
Copy link
Contributor

Problem

blob.GetAll method randomly fails to return blocks that are above the tail but within the prune window, causing intermittent errors in lightclient nodes.

Root Cause

Race condition in GetByHeight method where blocks below the current tail were immediately rejected without checking if they're still available in the store.

Solution

  • Add fallback to check store directly before rejecting requests below tail
  • Only reject if header is truly unavailable in store
  • Maintain existing error behavior for genuinely unavailable blocks

Testing

  • Added TestGetByHeightBelowTailButAvailable - verifies accessible blocks below tail are returned
  • Added TestGetByHeightBelowTailNotAvailable - verifies truly unavailable blocks still return error
  • All existing tests pass

Fixes #4603

@github-actions github-actions bot added the external Issues created by non node team members label Oct 6, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.37%. Comparing base (2469e7a) to head (8f6c32a).
⚠️ Report is 590 commits behind head on main.

Files with missing lines Patch % Lines
nodebuilder/header/service.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4611      +/-   ##
==========================================
- Coverage   44.83%   35.37%   -9.47%     
==========================================
  Files         265      304      +39     
  Lines       14620    24328    +9708     
==========================================
+ Hits         6555     8605    +2050     
- Misses       7313    14771    +7458     
- Partials      752      952     +200     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Issues created by non node team members

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: nondeterministic timeout when querying past heights

2 participants