-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
u64
field should be serialized as string in json format
#2045
Comments
Thank you for reporting this issue @HarukaMa. This is puzzling, the |
wow, this might be an invalid issue then. It looks like That said, I've seen another consumer of the rest api incorrectly dealing with those large numbers. Maybe using strings could raise the awareness about that? To clarify, there is another block explorer outta there and it's also losing precision on the |
I see, good to know and agreed; we'll definitely consider the switch and if we don't end up making the change we'll document this better. Thanks again! |
u64
field should be serialized as string in json formatu64
field should be serialized as string in json format
yeah, |
please note that |
Check in here, is this issue still relevant? |
Yes, the nonce is still returned in json as a number. |
Is this issue still relevant after AleoNet/snarkVM#2559? |
🐛 Bug Report
The json formatter is storing
u64
fields as a number, and it's silently losing some precision for the data. I'm not sure why it happened during the serialization though - I'd expect rust libraries useu64
instead ofdouble
for that.Currently the only place affected is the nonce of the
PartialSolution
.Steps to Reproduce
REST endpoint
testnet3/latest/block
reports inaccurate nonce for coinbase solutions.Expected Behavior
The data should either be accurate numbers or strings.
Your Environment
Assume latest
The text was updated successfully, but these errors were encountered: