Skip to content

Conversation

@metachris
Copy link
Contributor

@metachris metachris commented Dec 3, 2025

Added relayscan service backfill-runner command that continuously runs the backfill + value-check operations:

# Test with just one relay (flashbots)
./relayscan service backfill-runner --relay fb

# Test with ultrasound relay and limited slots (last 50 slots)
./relayscan service backfill-runner --relay us --min-slot -50

# Combine flags for quick testing
./relayscan service backfill-runner --relay fb --min-slot -50 --skip-check-value

# Custom interval
./relayscan service backfill-runner --interval 10m

# Run once and exit (useful for testing)
./relayscan service backfill-runner --once

# Skip one of the steps
./relayscan service backfill-runner --skip-backfill
./relayscan service backfill-runner --skip-check-value

@metachris metachris requested review from Copilot and ilyaluk December 3, 2025 08:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new backfill-runner service that continuously executes data-api-backfill and check-payload-value operations at configurable intervals. The implementation refactors existing command logic into reusable functions to support both CLI and service-based execution.

Key Changes:

  • Introduced backfill-runner service with configurable execution intervals and relay filtering
  • Extracted core backfill logic from CLI command into reusable RunBackfill function
  • Extracted payload value checking logic into reusable RunCheckPayloadValue function with options struct

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cmd/service/service.go Registers the new backfill-runner command with the service command tree
cmd/service/backfill_runner.go Implements the backfill-runner service with interval-based execution, signal handling, and configuration options
cmd/core/data-api-backfill.go Refactors backfill command to extract reusable RunBackfill function and removes unused BackfillOpts struct
cmd/core/check-payload-value.go Refactors payload value checking into RunCheckPayloadValue function with CheckPayloadValueOpts configuration
README.md Documents the new backfill-runner service with usage examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +73 to +77
// BackfillOpts contains options for running the backfill
type BackfillOpts struct {
InitCursor uint64
MinSlot int64
}
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The BackfillOpts struct is defined but never used. The RunBackfill function takes individual parameters instead. Either remove this unused struct or refactor RunBackfill to accept BackfillOpts for consistency with CheckPayloadValueOpts in the other file.

Copilot uses AI. Check for mistakes.
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