-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestneeds-triage
Description
🔍 Problem Statement
📖 Description
Develop a background worker service that listens to Stellar blockchain events and keeps the application state in sync. This service will update escrow statuses and milestone progress in the database based on real-time blockchain activity.
Expected Behavior
-
Listen to Stellar Events:
- Subscribe to relevant Stellar network events (e.g., contract execution, escrow updates).
- Continuously monitor for changes without blocking main application flow.
-
Update Escrow Status in DB:
- Reflect escrow deposits, releases, and refunds in the database.
- Ensure consistency between blockchain state and application state.
-
Sync Milestone Updates:
- Update milestone status when blockchain events confirm completion or payment release.
- Trigger notifications for clients and freelancers when milestones change state.
🛠 Technical Notes
- Implement as a background worker (e.g., Node.js worker, queue consumer, or cron job).
- Use Stellar SDK or Soroban APIs for event subscription and parsing.
- Ensure idempotent updates to prevent duplicate records.
- Maintain secure error handling and logging.
- Optimize for scalability to handle multiple contracts and milestones concurrently.
- Ensure compatibility with existing Postgres schema (projects, milestones, contracts, disputes).
✅ Acceptance Criteria
- Worker successfully subscribes to Stellar events.
- Escrow status updates are reflected in the database in real time.
- Milestone progress is synced correctly with blockchain confirmations.
- Notifications are triggered for relevant updates.
- Service runs reliably in background without blocking API routes.
npm run lintandnpm run buildsucceed.- No regression in authentication, wallet connection, or dashboard features.
📈 Expected Impact
High — Would significantly improve user experience
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestneeds-triage