You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 specific EncodeAggregationResultToCbor error.
This is the code that decides to ignore this case:
log::error!("Couldn't decode tally value from bytes: {}", e);
actix::fut::err(())
}
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:
So unfortunately it looks like RadError::Encode is not a valid RadonError, so we cannot use that. Not sure why, but it looks like if we want to fix this issue we will have to introduce new radon error codes.
thread 'actors::chain_manager::mining::tests::encode_error_can_be_encoded' panicked at 'called `Result::unwrap()` on an `Err` value: Encode { from: "RadonTypes", to: "Vec<u8>" }', node/src/actors/chain_manager/mining.rs:1617:12
So unfortunately it looks like RadError::Encode is not a valid RadonError, so we cannot use that. Not sure why, but it looks like if we want to fix this issue we will have to introduce new radon error codes.
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: