Testnet Setup
We will be breaking down the steps to create a testnet from mainnet state.Required Changes
Staking
When creating a testnet the important part is migrate the validator set from many validators to one or a few. This allows developers to spin up the chain without needing to replace validator keys.Distribution
Since the validator set has changed, we need to update the distribution records for the new validator.Slashing
We also need to set the validator signing info for the new validator.Bank
It is useful to create new accounts for your testing purposes. This avoids the need to have the same key as you may have on mainnet.Upgrade
If you would like to schedule an upgrade the below can be used.Optional Changes
If you have custom modules that rely on specific state from the above modules and/or you would like to test your custom module, you will need to update the state of your custom module to reflect your needsRunning the Testnet
Before we can run the testnet we must plug everything together. inroot.go
, in the initRootCmd
function we add: