| Index | Status | Mainnet Bar | Protocol |
This is the operational contract for the current tower service. Product copy should call the two capabilities:
The implementation may run both capabilities in one standalone tower daemon. They remain separate services in protocol terms: different lookup namespaces, different payloads, different failure modes, and different user promises.
blind_backup.deriveRuntimeRecoveryLookupKey(runtimeId, runtimeSeed).runtimeId + runtimeSeed.delayed_last_resort.deriveRuntimeRecoveryActionLookupKey(runtimeId, runtimeSeed,
entityId, counterentity).encryptedRemedy is AES-GCM encrypted with the account
watchSeed.watchSeed only from a J-layer
DisputeStarted event.watchtowerCounterDispute(...) with a winning signed proof
inside the last-resort window; the same entry point finalizes after timeout.
At equal nonce, the signed LEFT proposal wins over the RIGHT proposal.Before breach:
lastResortPayload.watch: RPC URL, chain id, depository, watched entity, and
counterentity.triggerHint, proof nonce, proof body hash, appointment
sequence, and timing policy. It does not see balances/offdeltas/remedy
calldata.On breach:
DisputeStarted publishes the proof body’s watchSeed.encryptedRemedy.watchSeed does not decrypt runtime backups.watchSeed
may decrypt those retained action payloads too. The sweep engine still chooses
only the latest appointment by appointmentSequence, then proofNonce, then
bundle height/creation order.Public endpoints:
GET /
GET /healthz
GET /api/tower/healthz
PUT /api/tower/appointment
POST /api/tower/restore
GET /api/tower/receipt/:lookupKey
POST /api/recovery/discover
POST /api/recovery/state
POST /api/recovery/complaint
Operator endpoints:
POST /api/watchtower/sweep
GET /api/watchtower/actions/:lookupKey
Rules:
--enable-operator-api or
XLN_WATCHTOWER_OPERATOR_API=1 is set.XLN_WATCHTOWER_OPERATOR_TOKEN.XLN_WATCHTOWER_ACCEPT_COMPLAINTS=1.--enable-last-resort-agent or
XLN_WATCHTOWER_ENABLE_LAST_RESORT=1 is set.XLN_WATCHTOWER_PRIVATE_KEY.Backup-only tower:
bun core/watchtower/standalone-server.ts \
--host 0.0.0.0 \
--port 9100 \
--db data/watchtower \
--max-bundles 3 \
--quota-bytes 4194304
Backup plus last-resort disputer:
XLN_WATCHTOWER_PRIVATE_KEY=0x... \
XLN_WATCHTOWER_OPERATOR_TOKEN=... \
XLN_WATCHTOWER_ALLOWED_RPC_URLS=https://xln.finance/rpc,https://xln.finance/rpc2,https://xln.finance/rpc3,https://xln.finance/rpc4,https://xln.finance/rpc5,https://xln.finance/rpc6,https://xln.finance/rpc7,https://xln.finance/rpc8 \
bun core/watchtower/standalone-server.ts \
--host 0.0.0.0 \
--port 9100 \
--db data/watchtower \
--enable-last-resort-agent \
--enable-operator-api \
--sweep-interval-ms 30000
Defaults:
91000.0.0.03, clamped to 2..84 MiB8545/8546 plus
https://xln.finance/rpc through /rpc8Deployment must allowlist the exact RPC URL advertised to wallets. A tower
using a public upstream still rejects appointments naming an unlisted proxy.
Sepolia includes https://sepolia.xln.finance/rpc explicitly; verify upload
acceptance as well as tower health. The public P6 evidence
records the rejected upload and the bounded configuration correction.
Restore is backup-only from the user’s perspective:
runtimeId + runtimeSeed./api/tower/restore.The target restore SLA is under 1 minute. Current retention is designed for a small latest-state ring, not long-term audit history.
For each latest delayed-last-resort appointment:
DisputeStarted log for watched entity/counterentity.watchSeed to decrypt encryptedRemedy.watchSeed.watchtowerCounterDispute(...) to counter before timeout or finalize
after timeout; an already registered counter is not resubmitted before expiry.submitted, skipped, or error.The contract must enforce the last-resort delay. Tower policy alone is not a security boundary.
blind_backup appointments must not include last-resort payloads.delayed_last_resort appointments must include encrypted remedy payloads.watchSeed.appointmentSequence, then
higher proofNonce, then newer bundle metadata.Use the ladder, not a broad suite first.
L1 narrow:
bun test core/__tests__/storage/recovery/recovery-tower.test.ts
bun test core/__tests__/security/watchtower/watchtower-last-resort.test.ts
bun test tests/frontend/recovery/recovery-tower-config.test.ts
L2 targeted contract/RPC:
bun test core/__tests__/security/watchtower/watchtower-rpc-last-resort.test.ts
L2 browser restore:
E2E_BASE_URL=https://localhost:8080 \
E2E_API_BASE_URL=https://localhost:8080 \
E2E_RESET_BASE_URL=http://127.0.0.1:8082 \
PW_ONLY_CHROMIUM=1 PW_FAST=1 PW_VIDEO=off PW_TRACE=off PW_SCREENSHOT=only-on-failure \
bunx playwright test tests/e2e/recovery/e2e-watchtower-recovery.spec.ts --project=chromium
L3 gate:
bun run check
Mainnet cannot claim this subsystem ready unless encrypted backup restore and offline stale-dispute countering are both green.