Refactor module system into separate package to reduce coupling between modules
Opened this issue · 0 comments
Right now the module system is defined in the consensus
package and requires that many interfaces and structs must be defined in this package resulting in stronger coupling between the different modules than what is desirable. Ideally, the module system should not be required to know about the different module types that it can support up front.
It is not clear to me if what I'm proposing is possible... That is, I'm creating this issue without having reviewed the code in-depth, and so do not have good advice to offer at the moment. However, it might be possible to take advantage of generics in such a refactoring effort.
Perhaps we could prepare a design doc to better understand the requirements, challenges, and possible design alternatives.