Skip to content

PLEX-3129 LP skip blocks#501

Open
dhaidashenko wants to merge 7 commits into
developfrom
feature/PLEX-3129-lp-skip-blocks
Open

PLEX-3129 LP skip blocks#501
dhaidashenko wants to merge 7 commits into
developfrom
feature/PLEX-3129-lp-skip-blocks

Conversation

@dhaidashenko

@dhaidashenko dhaidashenko commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Expose the API to force LP to fast-forward to a new finalized checkpoint.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-evm

⚠️ Breaking Changes (3)

pkg/logpoller.Client (1)
  • HeaderByNumberWithOpts — ➕ Added
pkg/logpoller.LogPoller (1)
  • SkipToBlock — ➕ Added
pkg/logpoller.ORM (1)
  • StoreNewFinalizedCheckpoint — ➕ Added

✅ Compatible Changes (7)

pkg/logpoller.(*DSORM) (1)
  • StoreNewFinalizedCheckpoint — ➕ Added
pkg/logpoller.(*ObservedORM) (1)
  • StoreNewFinalizedCheckpoint — ➕ Added
pkg/logpoller.(*logPoller) (1)
  • SkipToBlock — ➕ Added
pkg/logpoller/mocks (1)
  • LogPoller_SkipToBlock_Call — ➕ Added
pkg/logpoller/mocks.(*LogPoller) (1)
  • SkipToBlock — ➕ Added
pkg/logpoller/mocks.(*LogPoller_Expecter) (1)
  • SkipToBlock — ➕ Added
pkg/relay.(*evmService) (1)
  • LPSkipToBlock — ➕ Added

📄 View full apidiff report

@dhaidashenko dhaidashenko force-pushed the feature/PLEX-3129-lp-skip-blocks branch from 2af46d9 to 8b39b14 Compare July 13, 2026 18:23
@dhaidashenko dhaidashenko marked this pull request as ready for review July 13, 2026 18:48
@dhaidashenko dhaidashenko requested review from a team as code owners July 13, 2026 18:48
Copilot AI review requested due to automatic review settings July 13, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds an operator/API mechanism to fast-forward the EVM LogPoller to a new finalized checkpoint (“skip blocks”), including DB-side pruning and the necessary concurrency/atomicity safeguards.

Changes:

  • Exposes a relayer-level method to request a LogPoller fast-forward to a target block.
  • Adds LogPoller SkipToBlock plus a new ORM transactional method to prune logs/blocks and store a new finalized checkpoint anchor.
  • Adds/updates tests and mocks to cover checkpoint storage, transactional behavior, and SkipToBlock edge cases.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/relay/evm_service.go Adds LPSkipToBlock API surface that delegates to the chain LogPoller.
pkg/logpoller/orm.go Introduces StoreNewFinalizedCheckpoint and refactors delete/insert helpers for transactional reuse.
pkg/logpoller/orm_test.go Adds coverage for checkpoint storage semantics and verifies transactional DS usage.
pkg/logpoller/observability.go Wires StoreNewFinalizedCheckpoint through the observed ORM wrapper for metrics/tracing.
pkg/logpoller/mocks/log_poller.go Extends the LogPoller mock with SkipToBlock.
pkg/logpoller/mock_orm_test.go Extends the ORM mock with StoreNewFinalizedCheckpoint.
pkg/logpoller/log_poller.go Implements SkipToBlock, adds runMu coordination, and refactors main loop tick handlers.
pkg/logpoller/log_poller_internal_test.go Adds unit tests for SkipToBlock behavior and error handling.
pkg/logpoller/disabled.go Implements SkipToBlock on the disabled LogPoller to return ErrDisabled.
Files not reviewed (2)
  • pkg/logpoller/mock_orm_test.go: Generated file
  • pkg/logpoller/mocks/log_poller.go: Generated file

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

}
lp.backupPollerNextBlock = anchorBlockNumber

lp.lggr.Infof("Skipped to block %d. Next poll starts at %d", anchorBlockNumber, blockNumber)
Comment thread pkg/logpoller/orm.go
Comment on lines +423 to +425
if err != nil {
return fmt.Errorf("failed to delete logs and block after minBlockToPrune %d: %w", minBlockToPrune, err)
}
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