Skip to content

Watcher implementation & Stellar on Tilt#38

Open
svlachakis wants to merge 1 commit intomainfrom
watcher-implementation
Open

Watcher implementation & Stellar on Tilt#38
svlachakis wants to merge 1 commit intomainfrom
watcher-implementation

Conversation

@svlachakis
Copy link

@svlachakis svlachakis commented Nov 7, 2025

Stellar Watcher (Draft)

Core Functionality

The Stellar watcher monitors the Wormhole Core Bridge contract on Stellar for cross-chain message publications

Event Polling

  • Continuously polls the Soroban RPC getEvents endpoint at configurable intervals (default 700ms)
  • Detects new message_published events from the Wormhole contract

Event Parsing

  • Decodes base64-encoded XDR event data from Soroban contract events
  • Extracts message fields: nonce, sequence, emitter_address, payload, consistency_level
  • Converts Stellar-specific formats to Wormhole's standard MessagePublication format

Message Publishing

Publishes parsed messages to the guardian's message processing pipeline with:

  • Timestamp: current time
  • Emitter chain: Stellar
  • Fields: all extracted message fields
Ledger Tracking
  • Maintains state of the last processed ledger
  • Avoids duplicate processing
  • Handles restarts gracefully

Reobservation Support

Reobservation Request Handling

  • Listens for reobservation requests from the guardian network
  • Queries events by specific transaction hash
  • Re-parses and republishes messages with IsReobservation = true flag
  • Enables message recovery and debugging workflows

Future Work

Tests

  • Integration tests for reobservation requests
  • End-to-end tests with local Stellar network

Metrics (Maybe?)

  • Message observation counters (observed / confirmed / orphaned)
  • Reobservation request metrics (success / failure / latency)
  • Connection error tracking
  • Current ledger height gauges
  • RPC call latency histograms

Guardian Set Management (Maybe?)

  • Read guardian sets from Soroban contract storage
  • Requires implementing simulateTransaction or getLedgerEntries RPC calls or another approach
  • Periodic polling to detect guardian set updates
  • Publish guardian set changes to the guardian network

Tilt Infra

  • Someone needs to look on Tilt infra an make it even better, that's just a POC.

Example Result / Signed VAA

2025-11-07T15:10:43.230Z	INFO	guardian-0.root.61_watch	stellar message published	{"component": "stellar_watcher", "rpc": "[http://stellar.default.svc.cluster.local:8000/soroban/rpc",](http://stellar.default.svc.cluster.local:8000/soroban/rpc%22,) "contract": "CBWQUIB4R65Z2DGC263FQ7BBI7TGIGOLFTYMLE6QPWBD5QDOUVJY3AKR", "chain": "stellar", "ledger": 2438, "tx": "2e5c06ece7fc8191d2028ed6dd06d53506956f1ca7fabfb0e952ec258b33c456", "seq": 1, "consistency": 1}
2025-11-07T15:10:43.251Z	INFO	guardian-0.root	signed VAA with quorum	{"message_id": "61/fda6fcf519faef33c6cce224fe5eb856da4212588c6202eaa32a6db8facdceac/1", "digest": "1e08121ec71dc2e3ce18945b7ffdd71a0fe9773216308230d5e337c61df2222e"}

@svlachakis svlachakis changed the title Watcher implementation & stellar on tilt Watcher implementation & Stellar on Tilt Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant