Skip to content

Progress reporting callbacks for cold scans #174

Description

@truthixify

Tier: S (1-2 days) | Type: dx

Context. fetchAnnouncementsStream and the pipeline scanner (src/chains/stellar/scanner/pipeline.ts) stream results but give the caller nothing to display while a cold scan chews through 50k events. Every example app (stellar-react-receive, stellar-cli-scan, the Chrome extension) currently guesses at a spinner. Add a first-class onProgress hook so UIs can render honest progress bars.

Scope.

  • ScanProgress type: { scannedLedgers, totalLedgers?, matches, elapsedMs }.
  • Optional onProgress?: (p: ScanProgress) => void on the public stellar scan entry.
  • Emit at a bounded rate (throttle to at most once per 100ms).
  • Wire it through the Chrome extension example so the popup shows real progress.

Acceptance.

  • Callback fires at least on start, on each batch boundary, and on completion
  • Emission is throttled (verified by test with a fake clock)
  • No public-API change when the callback is omitted
  • Chrome extension popup displays live progress

Files. src/chains/stellar/scan.ts, src/chains/stellar/scanner/pipeline.ts, examples/stellar-chrome-extension/src/, test/chains/stellar/scan.test.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkdxDeveloper experiencehelp wantedExtra attention is neededstellarTouches Stellar / Soroban codestellar-waveAuto-created for Wave 8wave-8Auto-created for Wave 8

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions