-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Remove MAX_SAFE_INTEGER limitation #2082
Comments
If we remove the limit, it's very possible that we will need a custom json implementation in all languages (like go), isn't it? |
It's very easy to fix for me while still staying decimal, but I'm not so sure about other client/server implementations. We need to solve this one way or another though. |
Pretty much everything needs a custom implementation if you want to be strict compliant with how C# works, so that's nothing new for me. |
This still is a problem, create some NEP-17 token with 16 decimals and try to work with it via RPC, there will be problems doing so. |
The best way is to use string. |
If we use strings for large integers in JSON, I think there will be a problem with |
Summary or problem description
Following https://github.com/neo-project/proposals/pull/126/files#r522304412 discussion and nspcc-dev/neofs-node#122 (comment) problem. We use 256-bit integers in VM, but they don't always convert to/from JSON nicely because of MAX_SAFE_INTEGER limitation and this limit is too low, even 100M with 8 decimals can't fit there.
Do you have any solution you want to propose?
I see two options:
[-(2⁵³)+1, (2⁵³)-1]
, but JSON technically doesn't impose any hard limit)Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: