Replies: 4 comments 9 replies
-
Thanks for kicking off this conversation Aaron. There are a bunch of very good ideas in your proposal. The first comment that comes to mind is: what is the benefit of creating a package (more comments will follow in the coming days) [1] The package |
Beta Was this translation helpful? Give feedback.
-
As a follow-up to our last discussion around this, I created this issue in regen-ledger for us to do a trial run of this approach: regen-network/regen-ledger#319. Will follow-up when we have any findings to report. |
Beta Was this translation helpful? Give feedback.
-
I think the biggest mess is with |
Beta Was this translation helpful? Give feedback.
-
Replaced by #10582 |
Beta Was this translation helpful? Give feedback.
-
Copying my notes from today's architecture call here:
Broader Framing
types/
is crowded and lacks coherence, too many globals, some inefficient and/or buggy codex/auth
suffers from conflation of authentication with vesting and legacy of tracking balancesx/bank
suffers from legacy of balances stored inx/auth
and supply stored inx/supply
, plus a general focus on a single denomstore
is being addressed separately, but in general suffers from performance issues related to IAVL and the non-atomicity of the multi-storesimapp
, all modules use simulations,simapp
depends on all modules, the whole design circularGeneral strategy
types/
from the ground upx/auth
x/bank
and design it better for multiple denomssimapp
↔ simulations ↔ module dependenciesSeparate go modules
Consider splitting the SDK into multiple go modules (in this same mono-repo) for a) a more disciplined dependency graph and b) decoupled release cycles. High level modules would be:
cosmovisor
(example git tag:cosmovisor/v1.0
)x/*
modules (example git tag:x/bank/v0.2
)base/
(see below): everything needed by every module developer to build modulesrosetta
Pros
base
, thenx/auth
, thenx/staking
, etc.)Cons
types/
Summary Audit and RecommendationsA more detailed audit will be posted later. This doesn't cover sub-packages of
types/
yet liketypes/module
.core/
package to replacetypes/
which modules can migrate to one by one, graduallycore/
could become its own go modulecore/
would include from the roottypes/
package and what would change:MsgRequest
and makeMsgRequest.GetSigners()
return[]string
and deal with bech32 at the framework layer - this also opens the door for other address representations likeDID
s, etc.core/address
package provide these for when they are needed:ParseAddress(sdk.Context, string) (AccAddress, error)
AccAddress.ToString(sdk.Context) string
Coin
, convertCoins
to use a tree structure under the hood, ditto forDecCoin
Int
,Uint
, andDec
, or move to atypes/math
package.Dec
needs to be refactored and fixedContext
should probably be converted to a pure interface with implementations elsewhere, ditto forStoreKey
types, etc.types/
package would not be includedbase
would also include some sub-packagestypes/
liketypes/module
(upgraded for ADR 033),codec
,store
APIs, testing infrastructure, simulations, maybebaseapp
, etc.Beta Was this translation helpful? Give feedback.
All reactions