[Feat] Increase MAX_CERTIFICATES
on MainnetV0
#2586
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR plans to increase the number
N::MAX_CERTIFICATES
value forMainnetV0
. The main result of this change is that the maximum number of validators in a committee is also increased. Since Mainnet was launched, the codebase has undergone some extensive upgrades and optimizations and based on internal/external testing, we believe the number of validators can be expanded safely. The original maximum is 16 and this change increases that value to 25 (subject to change).Increasing the number of validators creates a more robust and more decentralized network. This increase also has a number of other effects (increasing TPS, increasing network overhead, and increasing block size to name a few), so we must be vigilant when deciding to expand this number. As we further improve the network, we can iteratively increase the maximum number of validators in order to ensure network stability, even if it feels conservative.
Migration:
N::CONSENSUS_V3_HEIGHT
to Network traitv2
consensus tov3
consensus.N::CONSENSUS_V3_HEIGHT
, otherwise there may be some issues.The migration and reward logic change will occur at the following block heights (These heights are subject to change):
Canary - Block 4,560,000 (~Jan 24, 2025 at the current 3.7s block times)
Testnet - Block 4,800,000 (~Jan 31, 2025 at the current 3.4s block times)
Mainnet - Block 4,900,000 (~Feb 18, 2025 at the current 3.0s block times)
These numbers were calculated by determining the planned release schedule and backing into the block height using the current block speeds and including a buffer between release and consensus change. This buffer is intended to give leeway for nodes to upgrade before the consensus change. The following table is the approximate timeline and buffers for the networks:
Test Plan
Tests have been added to ensure that the migration properly transitions the old
MAX_CERTIFICATES_BEFORE_V3
value to the newMAX_CERTIFICATES
value.CI can be found here.
Related PRs
Migration will coincide with #2575.
TODO
MAX_CERTIFICATES
and migration block heights