From 7415d9ff7aa36f1e9678fe65385e58023f9a19d0 Mon Sep 17 00:00:00 2001 From: Dmytro Haidashenko Date: Fri, 17 Apr 2026 19:10:28 +0200 Subject: [PATCH 1/2] N-03 Document LogPoller Replay --- pkg/chains/legacyevm/chain.go | 5 +++++ pkg/logpoller/log_poller.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkg/chains/legacyevm/chain.go b/pkg/chains/legacyevm/chain.go index 5018285ac6..3dc07b2156 100644 --- a/pkg/chains/legacyevm/chain.go +++ b/pkg/chains/legacyevm/chain.go @@ -456,6 +456,11 @@ func (c *chain) Transact(ctx context.Context, from, to string, amount *big.Int, return errors.New("LOOPP not yet supported") } +// Replay signals that the poller should resume from a new block. Blocks until the replay is complete. +// Replay can be used to ensure that filter modification has been applied for all blocks from "fromBlock" up to latest. +// WARN: nil error does not necessarily mean the replay was successful, clients should monitor logs to identify success. +// This is a miss from original design, but due to the complexity of fix and the fact that callers generally don't need a strong guarantee of replay success, we choose to just log errors instead of returning them. +// Reach out, if you think you need a stronger guarantee, and we can discuss options. func (c *chain) Replay(ctx context.Context, fromBlock string, args map[string]any) error { block, err := strconv.ParseInt(fromBlock, 10, 64) if err != nil { diff --git a/pkg/logpoller/log_poller.go b/pkg/logpoller/log_poller.go index bea9817273..6262c7a06e 100644 --- a/pkg/logpoller/log_poller.go +++ b/pkg/logpoller/log_poller.go @@ -40,6 +40,11 @@ import ( type LogPoller interface { services.Service Healthy() error + // Replay signals that the poller should resume from a new block. Blocks until the replay is complete. + // Replay can be used to ensure that filter modification has been applied for all blocks from "fromBlock" up to latest. + // WARN: nil error does not necessarily mean the replay was successful, clients should monitor logs to identify success. + // This is a miss from original design, but due to the complexity of fix and the fact that callers generally don't need a strong guarantee of replay success, we choose to just log errors instead of returning them. + // Reach out, if you think you need a stronger guarantee, and we can discuss options. Replay(ctx context.Context, fromBlock int64) error ReplayAsync(fromBlock int64) RegisterFilter(ctx context.Context, filter Filter) error From c78619957b51b089a210b57779db74b241092c40 Mon Sep 17 00:00:00 2001 From: Dmytro Haidashenko Date: Mon, 20 Apr 2026 13:09:25 +0200 Subject: [PATCH 2/2] Force CI rerun