Skip to content

Conversation

@Savid
Copy link
Member

@Savid Savid commented Jan 23, 2026

Implement two-phase block completion tracking to prevent queue overload:

  • Phase 1: Mark blocks as enqueued (complete=false) with task count
  • Phase 2: Mark blocks complete (complete=true) when all tasks finish

Introduce tracker package with reusable abstractions:

  • Limiter: distance-based throttling via maxPendingBlockRange config
  • PendingTracker: Redis-based pending task counting per block
  • Completion: shared block completion tracking logic

Additional changes:

  • Add infinite retries with exponential backoff (5s to 10min cap)
  • Add state manager methods for incomplete block queries
  • Add ClickHouse QueryUInt64Slice for batch queries
  • Add sentinel errors in pkg/ethereum/errors.go
  • Centralize defaults in pkg/processor/defaults.go
  • Improve manager goroutine lifecycle with WaitGroup

…miter

Implement two-phase block completion tracking to prevent queue overload:
- Phase 1: Mark blocks as enqueued (complete=false) with task count
- Phase 2: Mark blocks complete (complete=true) when all tasks finish

Introduce tracker package with reusable abstractions:
- Limiter: distance-based throttling via maxPendingBlockRange config
- PendingTracker: Redis-based pending task counting per block
- Completion: shared block completion tracking logic

Additional changes:
- Add infinite retries with exponential backoff (5s to 10min cap)
- Add state manager methods for incomplete block queries
- Add ClickHouse QueryUInt64Slice for batch queries
- Add sentinel errors in pkg/ethereum/errors.go
- Centralize defaults in pkg/processor/defaults.go
- Improve manager goroutine lifecycle with WaitGroup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Savid Savid merged commit 6cd6f87 into master Jan 23, 2026
4 checks passed
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.

3 participants