theQRL / QRL

Quantum Resistant Ledger
https://theqrl.org/
MIT License
417 stars 109 forks source link

Decimal Limitation on TokenTransaction #1198

Closed cyyber closed 6 years ago

cyyber commented 6 years ago

A condition to verify the limit of decimal limitation while creating token is required. max decimals = 19 - log10(max amount) - 1

jleni commented 6 years ago

It would be a good idea to verify the formula and add positive/negative tests. There are some disabled tests here: https://github.com/theQRL/QRL/blob/20700bbe1be2622e563c9c226ee7d76bdc582b31/tests/tools/test_cli.py#L734

the proto definition uses uint64t. That limits the max value to 18,446,744,073,709,551,615. depending on the max amount defined for the token, the number of decimal positions should be restricted so all values are representable.

cyyber commented 6 years ago

Issue fixed in PR #1257