Skip to main content

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

  1. Listens for CommitmentAdded events from the CommitmentTree contract
  2. Rebuilds the off-chain incremental Merkle tree
  3. Computes the new root
  4. Submits the root on-chain via updateRoot()
  5. Typically completes within 5–15 seconds of a new commitment

Configuration

ParameterValue
Port3001
ContractCommitmentTree (0xB7E37E...4D87)
RPChttp://localhost:8545
Process nameghost-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.