Skip to content

Commit

Permalink
feat: Delegation.withdrawalDelayBlocks in sigcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
8sunyuan committed Nov 21, 2023
1 parent 396c511 commit e4f39f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BLSSignatureChecker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ contract BLSSignatureChecker is IBLSSignatureChecker {
IRegistryCoordinator public immutable registryCoordinator;
IStakeRegistry public immutable stakeRegistry;
IBLSPubkeyRegistry public immutable blsPubkeyRegistry;
IDelegationManager public immutable delegation;

constructor(IBLSRegistryCoordinatorWithIndices _registryCoordinator) {
registryCoordinator = IRegistryCoordinator(_registryCoordinator);
stakeRegistry = _registryCoordinator.stakeRegistry();
blsPubkeyRegistry = _registryCoordinator.blsPubkeyRegistry();
delegation = stakeRegistry.delegation();
}

/**
Expand Down Expand Up @@ -76,7 +78,7 @@ contract BLSSignatureChecker is IBLSSignatureChecker {
BN254.G1Point memory apk = BN254.G1Point(0, 0);
for (uint i = 0; i < quorumNumbers.length; i++) {
require(
registryCoordinator.quorumUpdateTimestamp(uint8(quorumNumbers[i])) + QUORUM_STAKES_UPDATE_WINDOW <= block.timestamp,
registryCoordinator.quorumUpdateTimestamp(uint8(quorumNumbers[i])) + delegation.withdrawalDelayBlocks() <= block.timestamp,
"BLSSignatureChecker.checkSignatures: StakeRegistry updates must be within QUORUM_STAKES_UPDATE_WINDOW"
);
require(
Expand Down

0 comments on commit e4f39f6

Please sign in to comment.