Skip to content
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

upstream GDA based decimal type #11783

Closed
Tracked by #17750
aaronc opened this issue Apr 26, 2022 · 5 comments
Closed
Tracked by #17750

upstream GDA based decimal type #11783

aaronc opened this issue Apr 26, 2022 · 5 comments
Assignees
Labels
C:math Component: Math T:Epic Epics

Comments

@aaronc
Copy link
Member

aaronc commented Apr 26, 2022

Based on the discussions in #7773, the decision regarding decimals in the SDK is to use a GDA-based decimal implementation to replace the current sdk.Dec.

This would likely be based on one of these two libraries and we should plan on providing upstream changes when needed:

This new decimal type should likely go into a new standalone math go module along with a copy of the current sdk.Int implementation so these are broken out of the monolithic SDK.

The apd-based Dec wrapper type in regen-ledger can possibly be the basis for this new math.Dec type: https://github.com/regen-network/regen-ledger/tree/master/types/math

@alexanderbez
Copy link
Contributor

The apd-based Dec wrapper type in regen-ledger can possibly be the basis for this new math.Dec type: https://github.com/regen-network/regen-ledger/tree/master/types/math

Assuming we have a math go sub-module, can we just copy/upstream the Regen type(s)?

@aaronc
Copy link
Member Author

aaronc commented Apr 26, 2022

The apd-based Dec wrapper type in regen-ledger can possibly be the basis for this new math.Dec type: https://github.com/regen-network/regen-ledger/tree/master/types/math

Assuming we have a math go sub-module, can we just copy/upstream the Regen type(s)?

If we agree the regen API and behavior is what we want. It is based off of 128-bit decimal arithmetic, but can have configurable rounding

@robert-zaremba
Copy link
Collaborator

Is there anything blocking adding the Regen version? I can port the it if nobody is looking at it.

@faddat
Copy link
Contributor

faddat commented Jul 6, 2023

I don't have a ton of context here, but I wanted to bring this Twitter feedback here:

https://twitter.com/smsunarto/status/1676769181520523265

Scott also mentions that regen's wrapper cures the issue he was describing.

Go Regen!

@julienrbrt julienrbrt mentioned this issue Sep 15, 2023
3 tasks
@tac0turtle tac0turtle moved this to ❌ Blocked in Cosmos-SDK Nov 16, 2023
@tac0turtle tac0turtle moved this from ❌ Blocked to 🧑‍🔧 Needs Design in Cosmos-SDK Nov 16, 2023
@tac0turtle tac0turtle changed the title Create GDA based decimal type upstream GDA based decimal type Apr 16, 2024
@tac0turtle tac0turtle moved this from ☃️ Icebox to 📋 Backlog in Cosmos-SDK Apr 16, 2024
@tac0turtle tac0turtle added the C:math Component: Math label Apr 16, 2024
@tac0turtle tac0turtle moved this from 📋 Backlog to 🤸‍♂️ In Progress in Cosmos-SDK Jun 18, 2024
@julienrbrt julienrbrt moved this from 🤸‍♂️ In Progress to 📋 Backlog in Cosmos-SDK Sep 9, 2024
@tac0turtle
Copy link
Member

done

@github-project-automation github-project-automation bot moved this from Epic Backlog to Done in Cosmos SDK: Framework WG Dec 12, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to 🥳 Done in Cosmos-SDK Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:math Component: Math T:Epic Epics
Projects
Status: 🥳 Done
7 participants