-
Notifications
You must be signed in to change notification settings - Fork 56
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
Make nodes commit encode error when aggregation script result cannot be encoded as CBOR #2312
Comments
So unfortunately it looks like See the test from this branch: https://github.com/tmpolaczyk/witnet-rust/tree/encode-encode-error it fails with an encode error
|
That one is definitely needed. |
Issue #2310 describes a radon script whose result cannot be encoded. If that happens, nodes will not commit any value and the data request will probably resolve with "insufficient commits" error. We could have nodes report an "encode" error to detect this case. There is already a
RadError::Encode
error, we could reuse it or we could create a more specificEncodeAggregationResultToCbor
error.This is the code that decides to ignore this case:
witnet-rust/node/src/actors/chain_manager/mining.rs
Lines 591 to 594 in 2fa9a2f
I tried to find similar issues to #2310, which fails to encode integers greater than 2^64-1, but didn't find any yet. But anyway, it would be great to have that in case something unexpectedly breaks in the future.
The text was updated successfully, but these errors were encountered: