Root Updater
Watches for new commitments on-chain and updates the Merkle tree root. This is a critical infrastructure service — without it, reveals cannot succeed because proofs require an up-to-date root.
How it works
- Listens for
CommitmentAddedevents from the CommitmentTree contract - Rebuilds the off-chain incremental Merkle tree
- Computes the new root
- Submits the root on-chain via
updateRoot() - Typically completes within 5–15 seconds of a new commitment
Configuration
| Parameter | Value |
|---|---|
| Port | 3001 |
| Contract | CommitmentTree (0xB7E37E...4D87) |
| RPC | http://localhost:8545 |
| Process name | ghost-root-updater |
Health check
curl http://localhost:3001/health
Why it matters
The CommitmentTree maintains a history window of the last 100 roots. Reveal proofs must reference a root within this window. If the root updater falls behind, new commitments won't be provable until the root catches up.
The Stale Monitor watches for this condition and alerts operators.