From 05b1f0b9dfe1ca33bf3a106002aca7d5315f7dc6 Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:56:38 -0500 Subject: [PATCH 1/4] fix: add slasher parameter in event --- CHANGELOG/CHANGELOG-2.0.0.md | 1 + src/SlashingRegistryCoordinator.sol | 3 ++- src/interfaces/ISlashingRegistryCoordinator.sol | 4 +++- test/unit/SlashingRegistryCoordinatorUnit.t.sol | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG/CHANGELOG-2.0.0.md b/CHANGELOG/CHANGELOG-2.0.0.md index e02270437..f0afc1f09 100644 --- a/CHANGELOG/CHANGELOG-2.0.0.md +++ b/CHANGELOG/CHANGELOG-2.0.0.md @@ -8,6 +8,7 @@ This release brings 2 UX improvements to the middleware repo. We increment the m ⛔ Breaking Changes - Update `createSlashableStakeQuorum` to take in a slasher address +- The `QuorumCreated` event now emits the `slasher` address of the quorum. 🔧 Improvements - Update `foundry.toml` solc to 0.8.29 diff --git a/src/SlashingRegistryCoordinator.sol b/src/SlashingRegistryCoordinator.sol index 01c334abb..caad35491 100644 --- a/src/SlashingRegistryCoordinator.sol +++ b/src/SlashingRegistryCoordinator.sol @@ -849,7 +849,8 @@ contract SlashingRegistryCoordinator is minimumStake: minimumStake, strategyParams: strategyParams, stakeType: stakeType, - lookAheadPeriod: lookAheadPeriod + lookAheadPeriod: lookAheadPeriod, + slasher: slasher }); // Hook to allow for any post-create quorum logic diff --git a/src/interfaces/ISlashingRegistryCoordinator.sol b/src/interfaces/ISlashingRegistryCoordinator.sol index 2c450ca8e..bfb788406 100644 --- a/src/interfaces/ISlashingRegistryCoordinator.sol +++ b/src/interfaces/ISlashingRegistryCoordinator.sol @@ -166,6 +166,7 @@ interface ISlashingRegistryCoordinatorEvents is ISlashingRegistryCoordinatorType * @param strategyParams The strategy parameters for stake calculation. * @param stakeType The type of stake being tracked (TOTAL_DELEGATED or TOTAL_SLASHABLE). * @param lookAheadPeriod The number of blocks to look ahead when calculating slashable stake (only used for TOTAL_SLASHABLE). + * @param slasher The address of the slasher to use for the operatorSet (quorum) in EigenLayer core. The slasher is set to DELEGATED_STAKE_SLASHER for total delegated stake quorums. */ event QuorumCreated( uint8 indexed quorumNumber, @@ -173,7 +174,8 @@ interface ISlashingRegistryCoordinatorEvents is ISlashingRegistryCoordinatorType uint96 minimumStake, IStakeRegistryTypes.StrategyParams[] strategyParams, IStakeRegistryTypes.StakeType stakeType, - uint32 lookAheadPeriod + uint32 lookAheadPeriod, + address slasher ); /** diff --git a/test/unit/SlashingRegistryCoordinatorUnit.t.sol b/test/unit/SlashingRegistryCoordinatorUnit.t.sol index 2ef94c835..2f7d54269 100644 --- a/test/unit/SlashingRegistryCoordinatorUnit.t.sol +++ b/test/unit/SlashingRegistryCoordinatorUnit.t.sol @@ -687,7 +687,8 @@ contract SlashingRegistryCoordinator_CreateSlashableStakeQuorum is minimumStake: minimumStake, strategyParams: strategyParams, stakeType: IStakeRegistryTypes.StakeType.TOTAL_SLASHABLE, - lookAheadPeriod: lookAheadPeriod + lookAheadPeriod: lookAheadPeriod, + slasher: proxyAdminOwner }); vm.prank(proxyAdminOwner); @@ -786,7 +787,8 @@ contract SlashingRegistryCoordinator_CreateTotalDelegatedStakeQuorum is minimumStake: minimumStake, strategyParams: strategyParams, stakeType: IStakeRegistryTypes.StakeType.TOTAL_DELEGATED, - lookAheadPeriod: 0 + lookAheadPeriod: 0, + slasher: proxyAdminOwner }); vm.prank(proxyAdminOwner); From 17105587596781e8c206f592d7003f2b4cf8dc95 Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:02:02 -0500 Subject: [PATCH 2/4] fix: clarify getNOnSignerWitnessAndApk behavior chore: format --- src/interfaces/IBN254TableCalculator.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interfaces/IBN254TableCalculator.sol b/src/interfaces/IBN254TableCalculator.sol index 52a7fcdf7..7780c6d6b 100644 --- a/src/interfaces/IBN254TableCalculator.sol +++ b/src/interfaces/IBN254TableCalculator.sol @@ -54,6 +54,8 @@ interface IBN254TableCalculator is IOperatorTableCalculator, IOperatorTableCalcu * @return nonSignerWitnesses The witnesses for operators that did not sign * @return nonSignerApk The aggregate BN254 G1 public key of the non-signers * @dev Reconstructs the operator info merkle tree deterministically to produce proofs and indices. + * @dev The output of this function is only valid when the operator table has been freshly updated and the current operator set state exactly matches the state at + * a given `referenceTimestamp`. In all other cases, the generated `nonSignerWitnesses` will be inconsistent with verification logic. */ function getNonSignerWitnessesAndApk( OperatorSet calldata operatorSet, From 7af7c074922ce4979508afd749477792c41f5cdb Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:08:59 -0500 Subject: [PATCH 3/4] fix: address gas intensive comment --- src/interfaces/IBN254TableCalculator.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/interfaces/IBN254TableCalculator.sol b/src/interfaces/IBN254TableCalculator.sol index 7780c6d6b..638df050a 100644 --- a/src/interfaces/IBN254TableCalculator.sol +++ b/src/interfaces/IBN254TableCalculator.sol @@ -55,7 +55,9 @@ interface IBN254TableCalculator is IOperatorTableCalculator, IOperatorTableCalcu * @return nonSignerApk The aggregate BN254 G1 public key of the non-signers * @dev Reconstructs the operator info merkle tree deterministically to produce proofs and indices. * @dev The output of this function is only valid when the operator table has been freshly updated and the current operator set state exactly matches the state at - * a given `referenceTimestamp`. In all other cases, the generated `nonSignerWitnesses` will be inconsistent with verification logic. + * a given `referenceTimestamp`. It is recommended to call this function at blockchain state that matches the `referenceTimestamp` of the certificate being verified. + * In all other cases, the generated `nonSignerWitnesses` will be inconsistent with verification logic. + * @dev This function is intended to be called offchain due to large gas costs. */ function getNonSignerWitnessesAndApk( OperatorSet calldata operatorSet, From 875d6cb9de63907ad09710f21170711feb10afa9 Mon Sep 17 00:00:00 2001 From: Yash Patil <40046473+ypatil12@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:17:50 -0500 Subject: [PATCH 4/4] fix: update natspec on getOperatorInfos chore: fix test fix: test --- src/interfaces/IBN254TableCalculator.sol | 1 + test/unit/SlashingRegistryCoordinatorUnit.t.sol | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interfaces/IBN254TableCalculator.sol b/src/interfaces/IBN254TableCalculator.sol index 638df050a..f3715e108 100644 --- a/src/interfaces/IBN254TableCalculator.sol +++ b/src/interfaces/IBN254TableCalculator.sol @@ -27,6 +27,7 @@ interface IBN254TableCalculator is IOperatorTableCalculator, IOperatorTableCalcu * @param operatorSet The operatorSet to get the operatorInfos for * @return operatorInfos The array of BN254OperatorInfo structs containing pubkeys and weights for registered operators * @dev Only returns operators that have registered their BN254 keys with the KeyRegistrar + * @dev Note: This function is not intended to derive the index of an operator. Use `getOperatorIndex` instead. */ function getOperatorInfos( OperatorSet calldata operatorSet diff --git a/test/unit/SlashingRegistryCoordinatorUnit.t.sol b/test/unit/SlashingRegistryCoordinatorUnit.t.sol index 2f7d54269..6e726ecd1 100644 --- a/test/unit/SlashingRegistryCoordinatorUnit.t.sol +++ b/test/unit/SlashingRegistryCoordinatorUnit.t.sol @@ -788,7 +788,7 @@ contract SlashingRegistryCoordinator_CreateTotalDelegatedStakeQuorum is strategyParams: strategyParams, stakeType: IStakeRegistryTypes.StakeType.TOTAL_DELEGATED, lookAheadPeriod: 0, - slasher: proxyAdminOwner + slasher: slashingRegistryCoordinator.DELEGATED_STAKE_SLASHER() }); vm.prank(proxyAdminOwner);