Skip to main content

Batch Root Updater

Updates Merkle roots for the BatchCommitRevealVault, which distributes commitments across 16 shards for higher throughput.

How it works

The BatchCommitRevealVault uses a ShardedTreeRegistry with 16 separate Merkle trees. Each shard has its own root that must be updated independently. The batch root updater:

  1. Watches for commitment events across all 16 shards
  2. Rebuilds each shard's Merkle tree
  3. Submits updated roots for each modified shard

Configuration

ParameterValue
Port3030
Shards16
Process namebatch-root-updater

When to use

The batch system is designed for high-throughput scenarios where the single-tree CommitmentTree becomes a bottleneck. Most developers should use the standard CommitRevealVault — the batch system is for advanced use cases.

See Batch Operations for more details.