diff --git a/src/BLSSignatureChecker.sol b/src/BLSSignatureChecker.sol index 9bea67b9..6201345d 100644 --- a/src/BLSSignatureChecker.sol +++ b/src/BLSSignatureChecker.sol @@ -86,7 +86,7 @@ contract BLSSignatureChecker is IBLSSignatureChecker { for (uint i = 0; i < quorumNumbers.length; i++) { if (staleStakesForbidden) { require( - registryCoordinator.quorumUpdateBlocknumber(uint8(quorumNumbers[i])) + delegation.withdrawalDelayBlocks() <= block.number, + registryCoordinator.quorumUpdateBlockNumber(uint8(quorumNumbers[i])) + delegation.withdrawalDelayBlocks() <= block.number, "BLSSignatureChecker.checkSignatures: StakeRegistry updates must be within withdrawalDelayBlocks window" ); } diff --git a/src/RegistryCoordinator.sol b/src/RegistryCoordinator.sol index 91cc5576..9183abba 100644 --- a/src/RegistryCoordinator.sol +++ b/src/RegistryCoordinator.sol @@ -68,7 +68,7 @@ contract RegistryCoordinator is EIP712, Initializable, IRegistryCoordinator, ISo /// @notice whether the salt has been used for an operator churn approval mapping(bytes32 => bool) public isChurnApproverSaltUsed; /// @notice mapping from quorum number to the latest block that all quorums were updated all at once - mapping(uint8 => uint256) public quorumUpdateBlocknumber; + mapping(uint8 => uint256) public quorumUpdateBlockNumber; /// @notice the dynamic-length array of the registries this coordinator is coordinating @@ -321,8 +321,8 @@ contract RegistryCoordinator is EIP712, Initializable, IRegistryCoordinator, ISo } // Update timestamp that all operators in quorum have been updated all at once - quorumUpdateBlocknumber[quorumNumber] = block.number; - emit QuorumBlocknumberUpdated(quorumNumber, block.number); + quorumUpdateBlockNumber[quorumNumber] = block.number; + emit QuorumBlockNumberUpdated(quorumNumber, block.number); } } diff --git a/src/interfaces/IRegistryCoordinator.sol b/src/interfaces/IRegistryCoordinator.sol index 57a9a8f3..bd6fecd3 100644 --- a/src/interfaces/IRegistryCoordinator.sol +++ b/src/interfaces/IRegistryCoordinator.sol @@ -25,7 +25,7 @@ interface IRegistryCoordinator { event EjectorUpdated(address prevEjector, address newEjector); /// @notice emitted when all the operators for a quorum are updated at once - event QuorumBlocknumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber); + event QuorumBlockNumberUpdated(uint8 indexed quorumNumber, uint256 blocknumber); // DATA STRUCTURES enum OperatorStatus @@ -139,5 +139,5 @@ interface IRegistryCoordinator { function numRegistries() external view returns (uint256); /// @notice returns the blocknumber the quorum was last updated all at once for all operators - function quorumUpdateBlocknumber(uint8 quorumNumber) external view returns (uint256); + function quorumUpdateBlockNumber(uint8 quorumNumber) external view returns (uint256); } diff --git a/test/mocks/RegistryCoordinatorMock.sol b/test/mocks/RegistryCoordinatorMock.sol index d6fd80e9..89e4feee 100644 --- a/test/mocks/RegistryCoordinatorMock.sol +++ b/test/mocks/RegistryCoordinatorMock.sol @@ -59,5 +59,5 @@ contract RegistryCoordinatorMock is IRegistryCoordinator { function deregisterOperator(bytes calldata quorumNumbers, bytes calldata) external {} - function quorumUpdateBlocknumber(uint8 quorumNumber) external view returns (uint256) {} + function quorumUpdateBlockNumber(uint8 quorumNumber) external view returns (uint256) {} }