Skip to content
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

Feat: Improve Witnet errors decoding #215

Open
guidiaz opened this issue Dec 17, 2021 · 5 comments
Open

Feat: Improve Witnet errors decoding #215

guidiaz opened this issue Dec 17, 2021 · 5 comments

Comments

@guidiaz
Copy link
Collaborator

guidiaz commented Dec 17, 2021

WitnetParserLib is currently unable to decode Witnet errors containing float values. For instance: d827831851fb3fe6666666666666fb3fe6666666666666

@aesedepece
Copy link
Member

It's the node who, in first place, maybe shouldn't be encoding floats 🤔

@guidiaz
Copy link
Collaborator Author

guidiaz commented Dec 29, 2021

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.

@aesedepece
Copy link
Member

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.

@guidiaz
Copy link
Collaborator Author

guidiaz commented Dec 29, 2021

In such case, +1 to force the node to encode error parameters as array of unsigned integers.

@aesedepece
Copy link
Member

aesedepece commented Dec 30, 2021

Actually sounds like this topic could use a WIP better specifying encoding of errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants