-
Notifications
You must be signed in to change notification settings - Fork 17
Worker pool for parallel multichain scanning #25
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programdripsFunded via Drips NetworkFunded via Drips NetworkfeatureNew feature workNew feature workhelp wantedExtra attention is neededExtra attention is neededperfPerformance / optimizationPerformance / optimizationstellarTouches Stellar / Soroban codeTouches Stellar / Soroban code
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programdripsFunded via Drips NetworkFunded via Drips NetworkfeatureNew feature workNew feature workhelp wantedExtra attention is neededExtra attention is neededperfPerformance / optimizationPerformance / optimizationstellarTouches Stellar / Soroban codeTouches Stellar / Soroban code
Type
Fields
Give feedbackNo fields configured for issues without a type.
Labels:
Stellar Wave,stellar,perf,feature,drips,help-wantedTier: L (1–2 weeks)
Type: perf / feature
Context
A multichain Spectre agent or a multichain wallet has to scan EVM, Stellar, Solana, and CKB. Today those happen sequentially. The four scans don't share data or depend on each other — they're embarrassingly parallel. A worker pool that fans them out can cut wall-clock time by 4×.
Scope
Build
sdk/src/scanner-pool.ts:worker_threadsfor ≥ 2 chains, run inline otherwise (worker overhead isn't worth it for one chain).AbortSignalcancels all workers cleanly.Constraints
structuredClonecarefully — private keys areUint8Arraywhich structuredClone handles, but document the threat model).Acceptance criteria
Why this matters
A multichain wallet's "refresh" button is the user's most-used interaction. Making it 4× faster is the difference between "this app feels modern" and "this app feels slow."