To make this work for both new and existing networks, we should implement it behind a Liberdus versionFlag.
-
Fresh network: If the versionFlag is enabled, populate the Shardus configuration and the initial network parameters as the first entry in listOfChanges, with cycle set to 1, when the network account is created.
-
Existing network: When the versionFlag enabled after the new version validator is activated, check whether the first entry in the network account's listOfChanges already exists with cycle set to 1. If it does, no action is needed. Otherwise, insert the current Shardus configuration and the initial network parameters as the first entry in listOfChanges.
To make this work for both new and existing networks, we should implement it behind a Liberdus
versionFlag.Fresh network: If the
versionFlagis enabled, populate the Shardus configuration and the initial network parameters as the first entry inlistOfChanges, withcycleset to1, when the network account is created.Existing network: When the
versionFlagenabled after the new version validator is activated, check whether the first entry in the network account'slistOfChangesalready exists withcycleset to1. If it does, no action is needed. Otherwise, insert the current Shardus configuration and the initial network parameters as the first entry inlistOfChanges.