Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/SlashingRegistryCoordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/interfaces/IBN254TableCalculator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -54,6 +55,10 @@ 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`. 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,
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces/ISlashingRegistryCoordinator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ 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,
OperatorSetParam operatorSetParams,
uint96 minimumStake,
IStakeRegistryTypes.StrategyParams[] strategyParams,
IStakeRegistryTypes.StakeType stakeType,
uint32 lookAheadPeriod
uint32 lookAheadPeriod,
address slasher
);

/**
Expand Down
6 changes: 4 additions & 2 deletions test/unit/SlashingRegistryCoordinatorUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -786,7 +787,8 @@ contract SlashingRegistryCoordinator_CreateTotalDelegatedStakeQuorum is
minimumStake: minimumStake,
strategyParams: strategyParams,
stakeType: IStakeRegistryTypes.StakeType.TOTAL_DELEGATED,
lookAheadPeriod: 0
lookAheadPeriod: 0,
slasher: slashingRegistryCoordinator.DELEGATED_STAKE_SLASHER()
});

vm.prank(proxyAdminOwner);
Expand Down