Relayer
is the authoritative Rust async request/response bridge for the Morpheus MiniApp OS kernel. is the frozen Node compatibility/parity implementation; it is not a production authority and is never the target of the canonical run commands below.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:
- MiniApp OS kernel request is emitted on-chain
- Relayer detects the event
- Relayer forwards the payload to the appropriate built-in module lane
- Relayer calls back on the kernel contract
- The kernel persists the canonical inbox item
- Optional external callback adapters receive the result when configured
Supported chains
- Neo N3
- NeoX
Both chains support request and feed delivery. Select either or both with
, and choose , , or . Automation is not part of this authority boundary and must remain disabled.Request routing
The relayer is still migrating from legacy
routing to the kernel's model.Today it effectively maps legacy request taxonomy onto built-in module lanes:
The relayer maps
plus payload shape to worker routes:- → built-in compute module →
- / / → built-in shared resource module →
- / →
- and other legacy Oracle request types → built-in fetch/query module →
- / / → internally for operator sync only
- The relayer prefers the compact smart-fetch response over raw query output
Long-term target:
- requests should be interpreted as kernel requests
- built-in modules should remain reusable across many registered miniapps
- miniapps should not need their own generic relayer plumbing
Commands
The historical Node commands carry the explicit
suffix, for example ; use them only under the documented boundary.Required env
- or /
- for every request lane
- ( or )
- a network-scoped Neo N3 RPC list and oracle/datafeed contract for each enabled Neo N3 lane
- , , and the NeoX oracle/datafeed contract for each enabled NeoX lane
- / with and — the token belongs to a dedicated bearer caller; assertions are not yet supported by the relayer transport. All relayer Neo N3 signing goes through the custody signer service; the relayer holds no signing key material
- / — separate NeoX custody identities for EIP-1559 submission and semantic EIP-191 fulfillment proofs; the same key id must not be used for both
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 kernel contract so automation executions can be queued on-chain through the compatibility path
- that automation statement describes the frozen Node compatibility path; the production Rust relayer rejects
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 the production Rust image. Its default command is deliberately
, so selecting a run loop is explicit:
For a loop use
with an immutable image. The historical is Node compatibility only and is not published as a production service image.systemd
Example unit file:
Typical install:
The unit launches
, never npm. Neo N3 and NeoX request/feed delivery are production Rust lanes; automation remains disabled and is rejected during configuration validation. See .Nitro Sidecar Pattern
A simple production pattern is:
- deploy the Rust EIF and its paired custody boundary
- run the Rust binary as a sidecar process on a small VM or container
- point enclave-fulfillment traffic at the authenticated vsock gateway
- keep Neo private keys in ; the sidecar holds only its scoped workload credential and non-custody provider configuration