Closed cmjc closed 6 months ago
Testing with aut 0.3.0
the problem remains:
aut contract call --address 0x5a443704dd4B594B382c22a083e2BD3090A6feF3 getValidatorAccusation 0xaf86859ea7e36f580d2702caeeaf7a79a3838449
web3.exceptions.ContractCustomError: 0x4e487b710000000000000000000000000000000000000000000000000000000000000011
...
aut --version
aut, version 0.3.0
@cmjc There is no need to re-test an issue unless the issue has been marked as fixed, or there is reason to believe there would be different behavior.
Expected behaviour
The method returns without error, the response being:
[]
if no accusation, else anEvent
object of typeFaultProof
.Note that an equivalent call to
getValidatorFault
succeeds.
I don't think this should be the expected behaviour.
The return type of getValidatorFault
is Event[]
i.e. the return value in case of no accusation is expected to be an empty array indeed.
However for getValidatorAccusation
the return type is a single Event
object. If there is no accusation, the exepected output is
web3.exceptions.ContractLogicError: execution reverted: no accusation
because of
require(validatorAccusation[_val] > 0 , "no accusation");
Interestingly, I got the expected output "no accusation" on Devnet and Bakerloo networks, but on Piccadilly the output is the reported
web3.exceptions.ContractCustomError: 0x4e487b710000000000000000000000000000000000000000000000000000000000000011
I suspect some kind of ABI version mismatch.
Closing as this has been fixed in the Accountability contract, see https://github.com/autonity/autonity/issues/951#issuecomment-1971926646.
Bug Calling the Accountability Contract Interface function
getValidatorAccusation
usingaut contract call
fails throwingweb3.exception.ContractCustomError
.Note that an equivalent call to
getValidatorFault
succeeds.Expected behaviour The method returns without error, the response being:
[]
if no accusation, else anEvent
object of typeFaultProof
.For example, a call to
getValidatorFaults
returns so:aut version
Example
To replicate
aut contract call
specifying the Accountability contract address and ABI, either in the call per example or in your.autrc
config file.