fix(logpoller): replay lower boundary revalidation#603
Merged
jadepark-dev merged 6 commits intomainfrom Feb 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates TON logpoller replay handling to revalidate the replay lower boundary (the stored prevBlock, i.e., fromBlock-1) during override application so replays are rejected if that boundary was pruned after the original Replay() request.
Changes:
- Revalidate
fromBlock-1(orfromBlockwhenfromBlock==1) inapplyReplayOverride()instead of revalidatingfromBlock. - Adjust existing replay override tests to match the new validation target (
prevBlock). - Add a new test case for the “prevBlock pruned between request and override” scenario.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/logpoller/replay.go | Changes replay override revalidation to validate prevBlock (lower boundary) to better handle pruning between request and override. |
| pkg/logpoller/replay_test.go | Updates comments/expectations for new validation behavior and adds a new rejection-path test. |
Comments suppressed due to low confidence (1)
pkg/logpoller/replay.go:147
- applyReplayOverride clears the replay state on validation failure after releasing the replay mutex. Since Replay() can be called concurrently while this validation is in-flight (and keeps status Pending), a newer replay request can be overwritten by clearReplayRequest(). Consider re-checking that the in-memory replay request still matches the validated fromBlock (and/or a request ID) before clearing, or downgrade status back to Requested when the request has changed so the newer request is not lost.
_, err := lp.lookupRequestedReplayBlock(ctx, blockToValidate, currentMasterchainBlock)
if err != nil {
lp.lggr.Warnw("replay rejected", "error", err, "fromBlock", fromBlock)
lp.clearReplayRequest()
return blockRange, 0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ogtownsend
previously approved these changes
Feb 16, 2026
…ractkit/chainlink-ton into fix/replay-boundary-validation
huangzhen1997
approved these changes
Feb 16, 2026
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.
No description provided.