Relayer
is the async request/response bridge for Morpheus Oracle.In the current production architecture, the relayer sits between the on-chain request surface and the confidential execution plane. It persists chain-originated work before checkpoint advancement and routes execution to the correct runtime lane.
It closes the loop:
- Oracle request is emitted on-chain
- Relayer detects the event
- Relayer forwards the payload to the Oracle or DataFeed runtime
- Relayer calls back on the Oracle contract
- Callback consumer receives the result
Supported chains
- Neo N3
- Neo X code still exists in-repo as archived reference, but the active supported relayer path is Neo N3 only
Request routing
The relayer maps
plus payload shape to worker routes:- →
- / / →
- / →
- and other Oracle requests →
- / / → internally for operator sync only
- The relayer prefers the compact smart-fetch response over raw query output
Commands
Required env
- or /
- ( or )
- or
Archived Neo X variables are intentionally omitted here because they are not part of the current supported operations path.
If direct worker-side provider default resolution is needed during relayer processing, also set:
- or
Reliability Model
The relayer persists:
- per-chain last scanned block checkpoints
- processed-event records for dedupe
- retry queue entries with exponential backoff
- dead-letter history for exhausted requests
- aggregate metrics for the latest runs
Config knobs:
Checkpoint note:
- if a saved checkpoint is ahead of the current confirmed chain tip, the relayer now resets that chain checkpoint to the configured start block instead of stalling forever
检查点说明:
- 如果已保存的 checkpoint 高于当前已确认链高度,relayer 现在会自动回退到配置的起始区块,而不是永久卡住
Neo N3 txproxy note:
- the Neo N3 txproxy allowlist now permits both and on the Morpheus Oracle contract so automation executions can be queued on-chain
Supabase Persistence
If
plus a service key are configured, the relayer also persists:- run snapshots to
- job lifecycle records to
The dashboard can read these through:
Manual operator actions:
These enqueue the stored event back into the relayer for manual retry / dead-letter replay.
State file
The relayer stores its durable runtime state in:
Override with:
Docker
Build and run:
systemd
Example unit file:
Typical install:
Phala Sidecar Pattern
A simple production pattern is:
- deploy to Phala
- run as a sidecar process on a small VM or container
- point at the public Morpheus runtime endpoint
- keep chain updater keys and Supabase service credentials only in the sidecar env