Network Upgrade: Tuning for Performance
Selendra runs on a 1-second block time. This speed is possible thanks to the incredible efficiency of the Substrate framework and the Aura consensus engine.
However, as with any database system, default configurations need tuning as the dataset grows.
In our upcoming runtime upgrade (v20010), we are applying standard performance optimizations to the consensus and database layers.
The Bottleneck: State Access
Profiling our nodes showed that a significant portion of execution time is spent on RocksDB lookups. This is a common challenge in state-heavy blockchains.
Solution 1: Storage Weight Re-calibration
We are updating the RocksDbWeight constants in our runtime configuration.
This isn't a new invention; it's a necessary calibration. By more accurately reflecting the cost of storage reads in our weight definitions, we ensure that the block construction process remains within safe limits, preventing validators from missing their slots.
Solution 2: State Cache Pinning
We are enabling configuration options to "pin" frequently accessed keys in memory. This is a standard feature of the underlying database that we are now leveraging more aggressively to reduce disk I/O.
Tuning Aura
We use the Aura (Authority Round) consensus.
To ensure blocks are propagated efficiently within the 1-second window, we are optimizing our node configuration:
- Parallel Signature Verification: Utilizing Substrate's multi-threaded verification capabilities.
- Optimistic Import: Enabling optimistic header import to allow the finality gadget to work more efficiently.
Database Migration
We are also updating our column family configuration.
- State will be optimized for random reads.
- History will be optimized for sequential writes.
These are standard database tuning practices that help maintain performance at scale.
Impact
These changes are about stewardship. By properly tuning the powerful engine we've been given by the open-source community, we can ensure Selendra continues to run smoothly.
The upgrade is scheduled for block #15,000,000. Validators should prepare to update their binaries.
