Skip to content

Sync and progress#3

Merged
dwerner merged 4 commits intomainfrom
sync-and-progress
Oct 2, 2025
Merged

Sync and progress#3
dwerner merged 4 commits intomainfrom
sync-and-progress

Conversation

@dwerner
Copy link
Copy Markdown
Collaborator

@dwerner dwerner commented Oct 2, 2025

  • Add historical log streaming support to erigon-bridge
  • Implements historical log data streaming using custom Erigon's Logs RPC.
  • Completes the bridge's ability to serve all three data types (blocks, transactions, logs)

Implements historical log data streaming using Erigon's Logs RPC.
Completes the bridge's ability to serve all three data types
(blocks, transactions, logs) in both historical and live modes.
Adds DataScanner module that:
- Detects existing parquet files and finds gaps in block coverage
- Identifies historical/live sync boundaries to prevent overlap
- Enables resumable sync by cleaning failed historical temp files
- Preserves active live sync temp files using modification time checks
- Validates filename ranges to reject corrupted data

Sync improvements:
- Workers continue on failure, tracking failed segments for retry
- 10-minute timeout per segment prevents hung workers
- Temp filenames show actual block ranges being written
- Three-phase sync per segment: blocks → transactions → logs

Includes 8 comprehensive tests covering edge cases:
- Live vs historical temp file detection
- Gap finding and boundary calculation
- Temp file cleanup with race condition protection
- Complete vs incomplete segment detection
Progress now correctly represents work across blocks, transactions,
and logs (3 phases per segment). Updated CLI display to clarify
that progress includes all data types.
- Remove deprecated BIT_PACKED parquet encoding
- Change ToString to Display implementation for StreamType
- Remove unused struct fields (endpoint, query, batch_size)
- Replace .get(0) with .first() for clarity
- Prefix intentionally unused parameters with underscore
- Fix useless format!() calls
@dwerner dwerner merged commit 6ca424f into main Oct 2, 2025
@dwerner dwerner deleted the sync-and-progress branch October 2, 2025 18:24
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.

1 participant