-
Notifications
You must be signed in to change notification settings - Fork 549
Deserialize JSON of a decimal number > MAX_UINT64 #8461
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
Conversation
2fa4178
to
6c41aa0
Compare
6c41aa0
to
7530058
Compare
Can be an issue here as Json should only technically be able to safely represent integers up to 9007199254740991; then it would be float rounded
|
@benaadams why is that. I can understand that this is a deviation from the standard, but why cant it safely be transmitted that way and then decentralized with a deviation from the standard? |
Javascript support is not really important here at all |
src/Nethermind/Nethermind.Serialization.Json/UInt256Converter.cs
Outdated
Show resolved
Hide resolved
Any reason its not being passed as quoted hex which is standard for all large numbers? |
Taiko did it this way |
src/Nethermind/Nethermind.Serialization.Json/UInt256Converter.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Serialization.Json/UInt256Converter.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Serialization.Json/UInt256Converter.cs
Outdated
Show resolved
Hide resolved
JSON standard states the numbers can be of any precision, only constrained by implementation. Standard library handles up to max ulong, I'm trying to cover uint256 range additionally. |
src/Nethermind/Nethermind.Serialization.Json/UInt256Converter.cs
Outdated
Show resolved
Hide resolved
dc7d193
to
acdc99d
Compare
acdc99d
to
a3588c1
Compare
Changes
Example:
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?