Module Logic Isolation #13431
tac0turtle
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Will add more thoughts when I'm at my computer, but huge supporter of this. x/staking is massively coupled to the core modules and makes doing all of the above a type system and protobuf nightmare. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been thinking a lot about module logic isolation after speaking with berachain.
What does this mean?
For example, staking is a lot of different things combined, delegator management, valset management, unbonding management and a few other things. The same thing happens with governance. While this has not been an issue in the past, in the current day there is a want to do large amounts of experimentation with different models of staking, governance and other things.
The idea here would be to separate parts of large modules into sub modules that can be composed into a module and used by a chain.
Staking coule become:
This would compose into the default staking module in the sdk, but allow other chains to pull in valset manager, delegator manager and create their own validator voting design or design multi token staking without having to rewrite the entire module.
Secondly, this isolates each part of staking and could make it easier to audit, understand and possibly write in wasm for some chains
Staking was an example here, but other modules could be done in a similar way.
Would love to hear thoughts on this form others
Beta Was this translation helpful? Give feedback.
All reactions