PLEX-3129 LP skip blocks#501
Open
dhaidashenko wants to merge 8 commits into
Open
Conversation
Contributor
|
2af46d9 to
8b39b14
Compare
Contributor
There was a problem hiding this comment.
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
SkipToBlockplus 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.
a8e4588 to
6207437
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose the API to force LP to fast-forward to a new finalized checkpoint.