Skip to content

Commit

Permalink
fix: isValidatorSlashable external func could revert for slashable va…
Browse files Browse the repository at this point in the history
…lidators, finding 759
  • Loading branch information
shaspitz committed Oct 30, 2024
1 parent 22fa110 commit 03033bc
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,17 @@ contract MevCommitMiddleware is IMevCommitMiddleware, MevCommitMiddlewareStorage
/// @notice Queries if a validator is slashable.
function isValidatorSlashable(bytes calldata blsPubkey) external view returns (bool) {
ValidatorRecord storage record = validatorRecords[blsPubkey];
require(record.exists, MissingValRecord(blsPubkey));
_checkVault(record.vault);
_checkOperator(record.operator);
if (!record.exists) {
return false;
}
VaultRecord storage vaultRecord = vaultRecords[record.vault];
if (!vaultRecord.exists) {
return false;
}
OperatorRecord storage operatorRecord = operatorRecords[record.operator];
if (!operatorRecord.exists) {
return false;
}
return _isValidatorSlashable(blsPubkey, record.vault, record.operator);
}

Expand Down

0 comments on commit 03033bc

Please sign in to comment.