var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=2&rec=1&url=https://alliance.terra.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);

# Benchmarks

Benchmarks were collected using a simulation app running 1000 blocks. The main computing bottlenecks are:

1. Rebalancing weights during endblockers when reward power changes.
• This bottleneck scales mainly by the number of bonded Alliance validators.
2. Allocating take rate rewards to validators every begin block (default x/distribution behavior)
• This bottleneck scales mainly by the number of assets with take rates.
• This event can be tuned by increasing the take rate claim interval.

The worst-case complexity of rebalancing reward weight scales by $O(nA)$, where n is the number of active Alliance validators, and A is the number of Alliance assets. In practice, rebalancing only updates bonded validators with staked Alliance assets. The following table shows the benchmark data as the number of Alliance assets and validators varies.

Validators (Average block time in seconds)
Assets150
10.018560.03456
100.021940.04164
800.050620.07966
1600.103780.3607
3200.637780.42728
6401.7052.24968
12804.266847.38552
Simulation results

These simulations were run on a MacBook Pro (M1 Pro Processor) with 32GB RAM. The numbers above are not reflective of actual block times. This simulation did not take into account the time to reach consensus.

It is recommended to have less than 500 Alliance assets and less than 200 validators to reduce the blocktime overhead to under a second.