Nitro-enclave-ready template for running the Sui Stack Messaging relayer under Nautilus.
This template is wired directly into nautilus-ops, so the CLI can scaffold it, generate its CI workflow, and manage the enclave lifecycle end to end.
It adapts the relayer to:
- expose enclave attestation at
/get_attestation - expose enclave health at
/health - expose relayer health at
/health_check - sign delivery responses from
POST /messages - stream logs through
/logs - sync group membership from Sui inside the enclave
- archive encrypted message batches to Walrus in the background
- Sui Stack Messaging:
https://github.com/MystenLabs/sui-stack-messaging/ - Sui Groups:
https://github.com/MystenLabs/sui-groups - Nautilus Ops:
https://github.com/Ashwin-3cS/nautilus-ops/
- The enclave runs the relayer on TCP
3000. run.shexposes it on VSOCK4000and receives config on VSOCK7000.- The parent EC2 host bridges public TCP
4000to enclave VSOCK4000. - The parent also exposes outbound VSOCK proxies for:
- Sui RPC on
8101 - Walrus publisher on
8102 - Walrus aggregator on
8103
- Sui RPC on
- Inside the enclave,
run.shbinds loopback shims for those remote endpoints so the relayer can use normal HTTPS URLs.
TEE_EC2_HOSTTEE_EC2_USERTEE_EC2_SSH_KEYRELAYER_SUI_RPC_URLRELAYER_GROUPS_PACKAGE_IDRELAYER_WALRUS_PUBLISHER_URLRELAYER_WALRUS_AGGREGATOR_URL
RELAYER_WALRUS_SYNC_INTERVAL_SECSRELAYER_WALRUS_SYNC_MESSAGE_THRESHOLD
If the optional Walrus sync secrets are unset, the relayer falls back to:
WALRUS_SYNC_INTERVAL_SECS=3600WALRUS_SYNC_MESSAGE_THRESHOLD=50
For live Walrus verification, use:
RELAYER_WALRUS_SYNC_INTERVAL_SECS=30
RELAYER_WALRUS_SYNC_MESSAGE_THRESHOLD=1
Generate the workflow from nautilus-ops:
nautilus init-ci --template messaging-relayer --cpu-count 2 --memory-mib 4096 -f ContainerfilePush to main after adding the required secrets.
GET /healthGET /get_attestationGET /health_checkGET /logs?lines=NPOST /messagesGET /messagesPUT /messagesDELETE /messages/:message_id
Read-only checks:
nautilus --template messaging-relayer status --host <EC2_IP>
nautilus --template messaging-relayer attest --host <EC2_IP> --out pcrs-live.json
nautilus --template messaging-relayer logs --host <EC2_IP> -n 100On-chain registration flow:
nautilus --template messaging-relayer update-pcrs --pcr-file pcrs-live.json
nautilus --template messaging-relayer register-enclave --host <EC2_IP>verify-signature is not a generic fit for this template. The relayer signs authenticated delivery responses from POST /messages, so verification should be done through the messaging E2E flow or a relayer-specific verification command.
From scripts:
cd /mnt/d/projects/nautilus-messaging-relayer/scripts
npm install
RELAYER_URL=http://<EC2_IP>:4000 \
TEST_WALLET_PRIVATE_KEY='suiprivkey1...' \
npx tsx test-e2e.ts | tee e2e.logThe script uses the current published testnet Groups package ID by default. Override GROUPS_PACKAGE_ID only if you are targeting a different deployment.
After setting the fast-sync secrets and redeploying:
- Run the E2E send path once.
- Inspect relayer logs:
nautilus --template messaging-relayer logs --host <EC2_IP> -n 300Expected lines:
Starting WalrusSyncServiceSyncing 1 pending messages to WalrusQuilt stored on WalrusWalrus pending sync cycle completed successfully
If those lines do not appear, confirm the deployed GitHub Actions secrets include the optional Walrus sync overrides and redeploy once more.