Bug
Calling the Accountability Contract Interface function getValidatorFaults to a validator with slashing history using aut contract call fails throwing TypeErrors for JSON serialization and encoding.
Expected behaviour
The method returns without error, the response being:
[] if no accusation - this is done
else Returns an array of Event object(s) of type FaultProof - this is where the error condition is encountered
For example, a call to getValidatorFaults on a validator with slashing history returns so:
aut contract call --address 0x5a443704dd4B594B382c22a083e2BD3090A6feF3 getValidatorFaults 0xaf86859ea7e36f580d2702caeeaf7a79a3838449
TypeError: Object of type bytes is not JSON serializable
During handling of the above exception, another exception occurred:
TypeError: list had unencodable value at index: [0: because (dict had unencodable value at keys: {'rawProof': because (Object of type bytes is not JSON serializable)})]
During handling of the above exception, another exception occurred:
TypeError: Could not encode to JSON: list had unencodable value at index: [0: because (dict had unencodable value at keys: {'rawProof': because (Object of type bytes is not JSON serializable)})]
Bug Calling the Accountability Contract Interface function
getValidatorFaults
to a validator with slashing history usingaut contract call
fails throwing TypeErrors for JSON serialization and encoding.Expected behaviour The method returns without error, the response being:
[]
if no accusation - this is doneFaultProof
- this is where the error condition is encounteredFor example, a call to
getValidatorFaults
on a validator with slashing history returns so: