-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gov: simplify governance-controlled parameter changes
This commit refactors the governance component to dramatically simplify the way that governance-controlled parameter changes are performed. Previously, the governance component duplicated all of the parameter data of all of the other components, which had to be kept in sync in a complicated and error-prone way. Now, parameter changes are specified and performed as key-value edits: - A parameter change proposal specifies a list of `(component, key, value)` pairs - The governance component can apply these without knowledge of other components' structures by operating on a `serde_json::Value` - The application can validate the changed parameters by deserializing a complete `AppParameters` from ProtoJSON. The logic around applying these changes is also dramatically simplified. The top-level app is responsible for all parameter changes. Components do not need to track their own individual "dirty bit" for parameter changes. The governance component can report to any other component when a parameter change was scheduled to occur. In followup work, we should change the `pcli` interface to work with JSON proposal data and delete the `ProposalToml` entirely.
- Loading branch information
1 parent
db773d8
commit fc6fe29
Showing
38 changed files
with
832 additions
and
676 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.