Closed gzukel closed 1 week ago
FYI We already defined default parameters. The issue is the param module that panic when reading a key for a value that has not been previously set. Preventing the panic prevents the chain halt: https://github.com/zeta-chain/node/pull/1864
Describe the Bug A recent system upgrade encountered an issue where an emissions parameter was not set, leading to a halt of the binary. To prevent such occurrences, it is proposed that all parameters expected by the Chain should have default values unless explicitly set or overridden. This approach would ensure that the addition of new parameters does not cause a system panic due to missing state information, by instantiating a default value when the parameter is not present in the state. However, if the parameter is explicitly set, the system should utilize the specified value.
To Reproduce
Expected Behavior The system should automatically assign a default value to any new parameter that is not explicitly set in the state during an upgrade. This action would prevent the system from halting and ensure smooth operation, even when new parameters are introduced.
Screenshots/Logs
Environment (please complete the following information): ALL