Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Backend] Two indexers run concurrently - soroban-indexer.service + soroban-event-worker race on the same rows and double-count withdrawnAmount

Aperta
#801 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

@Banx17 ci sta già lavorando.

Dal 25/8/2026.

  • #980 di @Banx17 — chiusa senza merge
  • #1181 di @Banx17 — aperta
  • #1412 di @olu-cmd — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
node.js, postgresql, typescript

Direzione di ricerca

Start with backend/src/index.ts and compare the two startup paths, then read backend/src/services/soroban-indexer.service.ts and soroban-event-worker.ts to understand their event polling and WITHDRAWN handling. Add or run the regression test that verifies only one indexer polls the contract, and verify a repeated WITHDRAWN event cannot increment withdrawnAmount twice. Run tests and lint; note that an open linked pull request means this work may already be underway.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend bug critical database GrantFox OSS Maybe Rewarded Official Campaign | FWC26 Stellar Wave

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Labels: bug, backend, Stellar Wave, database, critical

Two indexers run at once and double-count withdrawnAmount, which corrupts claimable balances.

index.ts:32 calls sorobanIndexerService.start() and index.ts:33 startWorkers() starts SorobanEventWorker. Both poll STREAM_CONTRACT_ID and write Stream/StreamEvent. Their WITHDRAWN handlers both read-then-add withdrawnAmount (soroban-indexer.service.ts:216 and soroban-event-worker.ts:631) in separate transactions, so when both pick up the same event before either commits, the increment lands twice. That inflates withdrawnAmount and shrinks claimable. The legacy service also keeps its cursor in memory and ignores IndexerState. One indexer should own this.

What the fix has to hold to

  • Only one component indexes contract events
  • The same WITHDRAWN event never increments withdrawnAmount more than once

Done when

  • sorobanIndexerService.start()/stop() removed from index.ts so only SorobanEventWorker indexes
  • services/soroban-indexer.service.ts deleted or disabled
  • Regression test asserts only one indexer instance polls the contract
  • Verified withdrawnAmount isn't double-incremented for the same event
  • Tests + lint pass, CI green

Where to start
backend/src/index.ts (drop the legacy start), then remove backend/src/services/soroban-indexer.service.ts; soroban-event-worker.ts stays as the single indexer. Contract-side and frontend indexer-status UI are out of scope. Medium.

Lingua principale
TypeScript
Stelle
18
Fork
250
Merge medio
5g 6h
PR unite (30g)
85

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LabsCrypt/flowfi

Tutte le issue di LabsCrypt/flowfi

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.