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
Hi @cmjc, from your context, rule NO. 10 is not defined in the rule set:
// Must match autonity/types.goenum Rule {
PN,
PO,
PVN,
PVO,
PVO12,
C,
C1,
InvalidProposal, // The value proposed by proposer cannot pass the blockchain's validation.
InvalidProposer, // A proposal sent from none proposer nodes of the committee.
Equivocation // Multiple distinguish votes(proposal, prevote, precommit) sent by validator.
}
// @dev return true if sending the event can lead to slashingfunction canSlash(address_offender, Rule _rule, uint256_block) publicviewreturns (bool) {
uint256 _severity =_ruleSeverity(_rule);
uint256 _epoch = autonity.getEpochFromBlock(_block);
return slashingHistory[_offender][_epoch] < _severity ;
}
As the typing system limits the input of _rule should be a type of Rule, from inside the canSlash funtion we cannot capture such error. Thus from AUT tool side, we can do some check on it. This issue so move to Aut tool.
Description
Calling
canSlash
with autcli to see if a validator is slashable:returns reverted, but without a revert reason:
If calling
getValidatorAccusation
and there are no accusations, a revert reason ofno accusation
is returned:System Information
Rationale
Returning a revert reason would be more informative to the user.
The text was updated successfully, but these errors were encountered: