You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A problem we face right now is that BeginBlock, EndBlock, and Upgrades require specification of a total ordering of modules in an upgrade.
This causes a number of problems:
It is hard to understand where to put a new module
Listing every module obscures the important before/after relations
A lot of code bloat
Ideally we should just specify the relevant partial orderings, and it can then derive a satisfying total ordering.
e.g.
BeginBlockOrdering := osmoutils.NewPartialOrdering(AllModuleNames)
BeginBlockOrdering.AfterRelation(Staking.ModuleName, Bank.ModuleName) // Staking upgrade has to come after bank
BeginBlockOrdering.BeforeRelation(Auth.ModuleName, Bank.ModuleName) // Auth has to come before bank
// can also have a First or Last method if we want
App.SetBeginBlockOrdering(BeginBlockOrdering.TotalOrdering())
A problem we face right now is that BeginBlock, EndBlock, and Upgrades require specification of a total ordering of modules in an upgrade.
This causes a number of problems:
Ideally we should just specify the relevant partial orderings, and it can then derive a satisfying total ordering.
e.g.
(We then use this to replace
osmosis/app/modules.go
Line 188 in 44099c5
This should be relatively simple to add, by wrapping a topological sort library, e.g. https://github.com/stevenle/topsort . See topological sorting / partial ordering -> total ordering posts for more details: https://en.wikipedia.org/wiki/Topological_sorting#Relation_to_partial_orders
The text was updated successfully, but these errors were encountered: