Open matthew1001 opened 1 week ago
I've done most of the work to fix this under https://github.com/hyperledger/firefly-common/pull/147 and https://github.com/hyperledger/firefly-signer/pull/76. PRs for other repos such as firefly-evmconnect
and firefly-transaction-manager
will be needed to pull in the updated firefly-common
and firefly-signer
packages.
Thanks for the work and context on this one @matthew1001!
This fix is important for all consumers of FireFly and I think warrants a new patch release to v1.3.2.
/invoke
and /query
calls/contract/invoke
api flow
When passing a JSON payload that contains parameters to FireFly (e.g. to deploy a contract that has constructor parameters) evmconnect returns
FF22062: Negative numeric value is invalid for component %!!(MISSING)s(uint16=256)%!!(MISSING)(EXTRA string=[0])
if the numeric parameter exceeds the maximum size of afloat64
.This appears to be because Golang deserialises large JSON numbers to
float64
when deserialising to aninterface{}
, and silently loses any precision caused by the JSON number exceeding the maximum representable value of afloat64
.