This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
JSON serialisation of numbers (specifically u64) #1270
Labels
I4-annoyance
The client behaves within expectations, however this “expected behaviour” itself is at issue.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Milestone
Currently we serialise
u64
(e.g.BlockNumber
) into a plain number in the JSON over RPC, e.g. for a header we would return -(This is a good example since
BlockNumber
=u64
andSeal
=(u64, Signature)
)This is problematic for some middleware, e.g. in JavaScript where the maximum integer number is 2^53 - 1, anything over this and the JSON will not be parsed. We have not run into this yet, since we are reasonably far from limits, however there is a possibility of problems down the line. I would suggest that anything over
u32
be encoded as the hex value.The text was updated successfully, but these errors were encountered: