Why you need watchtowers
Payment channels have a dispute window (default 48 h). During this window:- Counterparty submits a stale-nonce close → you need to respond with the latest-nonce voucher.
- If you’re offline (maintenance, outage, DoS), you can’t respond.
- A watchtower can respond for you.
Requirement
Register with 2–3 independent watchtowers. Losing all of them simultaneously is rare; losing one is not. One of the seven accepting-paid-delivery criteria is “watchtowers registered.” Your node’s/health endpoint reports ready only once this is satisfied.
How to register
For each watchtower you want to use:- Discover the watchtower — via
WatchtowerAnnouncegossip oncdn/global/v1. - Open a
cdn/watchtower/v1QUIC stream. - Send
RegisterWatch: - Receive
Ackwith watch confirmation and escrow ID. - On every new voucher, send
UpdateVoucher { latest_voucher }over the same stream.
What to watch
Register every open channel with your watchtowers. A channel without a watchtower has only your in-process dispute monitor as defense — fine if you’re online, unsafe if you’re not.WatchtowerEscrow
On-chain fee accountability:
- Prepay fees into escrow.
- Watchtower submits periodic heartbeats on-chain, each including a BLAKE3 commitment over the set of vouchers they currently hold.
- If a heartbeat is missed, you reclaim the corresponding fee via
reclaimFees(). - If a heartbeat lies (commits to a voucher set they don’t actually hold and later fails to dispute), the on-chain evidence of the commitment lets you prove the failure.
Local dispute monitor
Every node runs an in-process dispute monitor that watches the chain for close events against your channels. If you’re online, this handles disputes without external help — watchtowers are defense-in-depth. Configuration:Voucher commitment
When a watchtower heartbeats on-chain with a voucher commitment, they’re publicly stating “I hold these vouchers.” If they later fail to dispute, the commitment is evidence that they had the authority to do so. This is why watchtowers are “non-custodial with accountability” rather than “non-custodial, good luck” — the escrow + heartbeat mechanism gives you a clean slash-your-watchtower-back path.Operational concerns
- Clock sync. Heartbeats have a freshness window. NTP on both your host and the watchtower’s host is non-negotiable.
- Peer table recency. Watchtowers live on the same iroh transport as other nodes. Keep your peer table fresh.
- Re-register after deregistration. If you deregister and re-register your node, re-register with your watchtowers too — old registrations use a stale NodeId.
- Watchtower diversity. Using two watchtowers owned by the same operator is not real diversity. Check operator addresses before selecting.
When watchtowers are abandoned
A watchtower that stops heartbeating is dead. Missed heartbeats are observable on-chain viaWatchtowerEscrow events:
- Reclaim escrowed fees via
WatchtowerEscrow.reclaimFees(). - Register with a replacement watchtower.
- Update your config to remove the dead one.