-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: Write bank module specification, check spec/code consistency #2853
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2853 +/- ##
===========================================
+ Coverage 56.29% 56.86% +0.57%
===========================================
Files 120 120
Lines 8406 8298 -108
===========================================
- Hits 4732 4719 -13
+ Misses 3352 3261 -91
+ Partials 322 318 -4 |
Discovered two issues so far:
|
|
||
# Keeper | ||
|
||
## Denom Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we still want this metadata store?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU This is moreso a spec for what we want at launch, not a spec for the ideal #pre-ibc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done prelaunch.
- It makes the staking codebase much simpler (removing this Pool that's being constantly passed around)
- Any UI/block explorer will want this.
- Having the loose token supply accounted by staking module is absurd and causes all sorts of weird situations. Governance currently gets around this in a super super hacky way (creating a burn account where it sends coins in order to "burn them"). Now, the loose token supply known by staking doesn't reflect reality. Had a discussion with @jaekwon about this, he agreed it needs to be prelaunch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, agreed, I'll do that in this PR.
Never mind, @sunnya97 wants to do this! 🎉
@@ -0,0 +1,130 @@ | |||
## Keepers | |||
|
|||
The bank module provides three different exported keeper interfaces which can be passed to other modules which need to read or update account balances. Modules should use the least-permissive interface which provides the functionality they require. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the interfaces maybe go in the sdk
(types
) folder? And the structs go in the bank
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec looks great @cwgoes -- left some minor comments, but overall LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
…istency * Update PENDING.md * New structure * Start transactions section * Remove MsgIssue * Update keepers.md * Add state.md * Update keepers.md, discovered #2887 * Move inputOutputCoins to BaseKeeper * Remove no-loner-applicable tests * More spec updates * Tiny cleanup * Clarify storage rationale * Warn the user * Remove extra newline
Closes #1277
Closes #2887
Also does a bit of minor cleanup in
x/bank
.If you think anything else should be added to the spec, do comment!
docs/
)PENDING.md
with issue #Files changed
in the github PR explorerFor Admin Use: