This workspace contains two Rust services that connect the on-chain indexer to the off-chain verifier via tokio::sync::mpsc.
Blockchain (MilestoneSubmitted event)
│
▼
[ Indexer Service ] ──── mpsc channel ────▶ [ Verifier Service ]
- Subscribes to WS provider - HTTP API /verify
- Persists pending jobs to SQLite - Runs validation logic
- Sends jobs to verifier - Writes results to SQLite
- Connects to the blockchain via WebSocket
- Listens for
MilestoneSubmittedevents fromGrantStreamEscrow - Inserts pending verification jobs into SQLite
- Enqueues jobs onto the
tokio::sync::mpscchannel - Forwards jobs to the verifier HTTP API
- Exposes a POST
/verifyendpoint - Consumes jobs from the channel
- Validates the
evidenceURI(IPFS, HTTPS, ar://, data:) - Updates the SQLite record with
Approved/Rejectedand a timestamp
# Terminal 1
cd indexer
cargo run
# Terminal 2
cd verifier
cargo runBoth services maintain a milestone_verifications table keyed by (grant_id, milestone_id):
submitted_at— when the event was indexedverified_at— when the verifier finished processingstatus—Pending,Approved, orRejectedresult_reason— rejection reason if applicable