[#170] Increase receipt retry backoff and add client-side delay#172
[#170] Increase receipt retry backoff and add client-side delay#172realproject7 merged 2 commits intomainfrom
Conversation
- getReceiptWithRetry: 5 attempts with 2s multiplier (2/4/6/8/10s = 30s total) instead of 3 attempts with 1s (1/2/3s = 6s) - Add 5s client-side delay before indexer API calls in DonateWidget and usePublish hook to allow RPC propagation on Base Sepolia Fixes #170 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE
Minimal, targeted fix:
- Server-side (lib/rpc.ts) — 3→5 attempts, 1s→2s multiplier. Total window 30s vs previous 6s. Reasonable for Base Sepolia's propagation delays.
- Client-side (DonateWidget, usePublish) — 5s delay before indexer call. Both locations updated consistently.
The combined approach gives receipts time to propagate through load-balanced nodes on both sides. No issues.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
Increasing getReceiptWithRetry() to a longer server-side window is aligned with issue #170. The problem is the additional 5-second client-side delay in usePublish, which broadens this fix to every storyline/plot publish flow even though the reported bug is specifically the donation indexer on Base Sepolia.
Findings
- [medium] The new
await new Promise((r) => setTimeout(r, 5000))insideusePublishadds a forced 5-second delay to all publish flows (/api/index/storylineand/api/index/plot), not just the donation path that issue #170 is about. That is extra user-visible latency and scope creep for unrelated routes.- File:
src/hooks/usePublish.ts:86 - Suggestion: Keep the stronger server-side retry globally if desired, but scope any client-side delay to the donation flow that is actually failing, or gate it behind the specific route/environment that needs it.
- File:
Decision
Requesting changes because the server-side retry fix is reasonable, but the client-side delay currently overreaches beyond the bug described in #170 and unnecessarily slows unrelated publish operations.
Remove 5s delay from usePublish (storyline/plot creation) — the server-side retry window (30s) is sufficient. Keep delay only in DonateWidget where the issue was observed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up commit fixes the scope issue by keeping the 5-second client-side delay only on the donation path while leaving the stronger server-side retry window in place for all routes. The updated change now matches issue #170 without slowing unrelated publish flows.
Findings
- [info] No remaining blocking findings after
71c66b8.- File:
src/components/DonateWidget.tsx:91 - Suggestion: None.
- File:
Decision
Approving because the prior scope-creep issue is resolved, the donation-specific reliability fix is preserved, and lint-and-typecheck plus local typecheck, test, and build validation pass.
Summary
getReceiptWithRetryincreased to 5 attempts with 2s multiplier (2/4/6/8/10s = 30s total window vs previous 6s)DonateWidgetandusePublishhook to allow RPC propagation on Base SepoliaFixes #170
Test plan
tsc --noEmit— zero errorsnext build— cleanvitest run— 22/22 tests pass🤖 Generated with Claude Code