-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Write ADR for Coins #7046
Comments
I recently came across a funky bug living in Some points of discussion I think would be worthwhile to come to clear consensus on and follow up with well documented reasoning.
I have come across a lot of previous discussion making excellent points for deciding one way or another. Below is just my own short reflection on these points. IsValid on empty setsI think it is counter intuitive to return true for this function. I think this point is demonstrated by the fact that our own implementation of bank misinterprets the semantics here. @cwgoes pointed out to me that Bank allowing empty coin set usage?I think it could make sense to just add checks to return errors on empty coin sets in the short term. Zero coin to return false on IsValid?Currently a single One of my first prs on the SDK #4558 asked this question as well. There was partial agreement that this should be changed, but ultimately wasn't because the change was non-trivial and at the time I did not have enough understanding of the SDK. I think this is something worth changing before 1.0 Uints for coin amountsI think this issue requires more discussion. I found this comment, but from what I can tell, this is unimplemented? Do we have "regular coins"? There appear to be a host of coin related issues still alive #2443, #2627, #3012, #3866, we weren't validating denom for multiple coins until recently, #6727, #7326. I'd think it be spectacular if coins could get some much needed love and a face lift to ensure that one of the most security critical parts of the SDK is by far the most transparent in implementation and architecture decisions! |
Agree with most of the points there @colin-axner and thank you for writing this up. Just to summarize my position:
Absolutely not. Minting anything that's empty should not be allowed and just be ignored by an
Do you mean empty? A zero-sum coin should not be allowed anywhere in the SDK and should be considered invalid in every single case. We don't allow a zero-sum coin anywhere (i.e. it should be removed from a coin set). Is this no longer the case?
Maybe? I started work on this many moons ago and it's not trivial, hence the addition of |
I'm specifically referencing the |
Ahh right, but you should never be working with a zero-sum |
closing as coin is already in prod, if we have another design in mind we can write a ADR |
Summary
Write ADR with design desitions for the existing
Coin(s)
andDecCoin(s)
implementationProblem Definition
During #7027, multiple questions where rised on the decisions behind these types:
#6755 and #6744 by @okwme
Proposal
Write ADR that summarizes all these choices and decisions
For Admin Use
The text was updated successfully, but these errors were encountered: