Open guidiaz opened 2 years ago
It's the node who, in first place, maybe shouldn't be encoding floats :thinking:
Perhaps not when encoding errored results. For sure it would make life easier for WitnetParserLib, as it could assume (as it currently does) that parameterized errors would always be encoded as an array of unsigned 64-bit integers.
However, Witnet Explorer seems to handle correctly errors with float parameters, so changing the node to avoid encoding floats could require changes in the Witnet Explorer side.
However, Witnet Explorer seems to handle correctly errors with float parameters, so changing the node to avoid encoding floats could require changes in the Witnet Explorer side.
Actually not. If we commit to using uint64 it will be able to decode it anyway, because it is using a generic CBOR decoder, and not expecting any specific types for the elements of the array.
In such case, +1 to force the node to encode error parameters as array of unsigned integers.
Actually sounds like this topic could use a WIP better specifying encoding of errors.
WitnetParserLib is currently unable to decode Witnet errors containing float values. For instance:
d827831851fb3fe6666666666666fb3fe6666666666666