From b2d6ffe59e8ecf7a9a9a85441da2bffd6c83b0bd Mon Sep 17 00:00:00 2001 From: Florent Tapponnier <160007691+Flotapponnier@users.noreply.github.com> Date: Tue, 11 Aug 2026 16:06:48 +0200 Subject: [PATCH] fix(solana-exec): cap backfill at 30 pages per account to avoid unbounded first-run pagination --- harnesses/solana-exec/cmd/collector/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/harnesses/solana-exec/cmd/collector/main.go b/harnesses/solana-exec/cmd/collector/main.go index 012089f1..496bb3e8 100644 --- a/harnesses/solana-exec/cmd/collector/main.go +++ b/harnesses/solana-exec/cmd/collector/main.go @@ -78,9 +78,10 @@ func collect(ctx context.Context, db *store.DB, h *helius.Client, plt string, fe } const sigLimit = 1000 + const maxPages = 30 // cap backfill at 30k sigs per account to avoid unbounded first-run pagination var sigs []helius.SigEntry before := "" - for { + for page := 0; page < maxPages; page++ { batch, err := h.GetSignaturesForAddress(ctx, feeAccount, sigLimit, cursor.LastSig, before) if err != nil { return fmt.Errorf("get sigs %s (before=%s): %w", feeAccount, before, err)