Scaling
The Ghost Protocol includes scaling infrastructure for high-throughput scenarios. The standard CommitRevealVault handles moderate throughput, but applications requiring thousands of commitments per minute can use the batch and sharded systems.
Scaling approaches
| Approach | Description | Use case |
|---|---|---|
| Batch operations | Multiple commits/reveals in a single transaction | Reduce gas costs for bulk operations |
| Session vaults | Temporary session-based batching | Interactive sessions with multiple operations |
| Sharded trees | 16 parallel Merkle trees | Increase total throughput |
When to use scaling
- Standard vault — fewer than 100 commits/minute. Most applications.
- Batch vault — 100–1000 commits/minute. Payment processors, batch transfers.
- Sharded trees — 1000+ commits/minute. High-frequency trading, mass onboarding.