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

AIP #61 v5: Unified precision (8) #384

Closed
4 tasks done
elpiel opened this issue Mar 15, 2021 · 1 comment
Closed
4 tasks done

AIP #61 v5: Unified precision (8) #384

elpiel opened this issue Mar 15, 2021 · 1 comment
Assignees

Comments

@elpiel
Copy link
Member

elpiel commented Mar 15, 2021

https://github.com/AdExNetwork/aips/issues/61

Create a Unified Precision number (UnifiedNum) with precision of 8 that will be used for all calculations, except when we are creating the MerkleTree, where we need the actual precision of the token in order of the MerkleTree to be calculated properly.

@elpiel
Copy link
Member Author

elpiel commented Mar 22, 2021

Postgres: Since we are using a u64 to store the UnifiedNum we can use bigint (max of 9_223_372_036_854_775_807) and although we can handle half of what u64::MAX = 184_467_440_737.09551615, it should not cause any issues.
Otherwise an error will be raised by the database and caught in Sentry.

elpiel added a commit that referenced this issue Mar 23, 2021
AdEx v5: Issue #384 Unified precision - primitives::UnifiedNum
@elpiel elpiel changed the title AIP #61 AdEx v5: Unified precision (8) AIP#61 v5: Unified precision (8) Mar 30, 2021
@elpiel elpiel changed the title AIP#61 v5: Unified precision (8) AIP #61 v5: Unified precision (8) Mar 30, 2021
@elpiel elpiel closed this as completed Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant