You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# v2.0.0 UX Improvements
This release brings 2 UX improvements to the middleware repo. We increment the major release due to the new `createSlashableStakeQuorum` interface.
🚀 New Features
- NonSigner View Function for Bn254 Table Calculator: Constructs nonsigner witness onchain by passing in a list of signers
⛔ Breaking Changes
- Update `createSlashableStakeQuorum` to take in a slasher address
🔧 Improvements
- Move to foundry v1.5.0 and update formatting
- Upgrade solc to 0.8.29
## Changelog
- feat: update registry coordinator for new createOperatorSets [PR #548](#548)
- feat: nonsigner view and operator index [PR #545](#542)
- chore: update readMe for middlewarev2 deployment [PR #539](#539)
This function creates a new quorum that tracks the total delegated stake for operators. The quorum is initialized with the provided parameters and integrated with the underlying registry contracts.
78
87
88
+
Note that this function *does not* allow for stake to be slashed. To create a quorum with slashable delegated stake, see [`createSlashableStakeQuorum`](#createslashablestakequorum).
89
+
79
90
*Effects:*
80
91
* Increments the `quorumCount` by 1
81
92
* Sets the operator set parameters for the new quorum
82
-
* Creates an operator set in the `AllocationManager`
93
+
* Creates an operator set in the `AllocationManager` with a slasher address that is the the `DELEGATED_STAKE_SLASHER`
83
94
* Initializes the quorum in all registry contracts:
84
95
*`StakeRegistry`: Sets minimum stake and strategy parameters
85
96
*`IndexRegistry`: Prepares the quorum for tracking operator indices
@@ -93,19 +104,31 @@ This function creates a new quorum that tracks the total delegated stake for ope
93
104
#### `createSlashableStakeQuorum`
94
105
95
106
```solidity
107
+
/**
108
+
* @notice Creates a new quorum that tracks slashable stake for operators.
109
+
* @param operatorSetParams Configures the quorum's max operator count and churn parameters.
110
+
* @param minimumStake Sets the minimum stake required for an operator to register or remain registered.
111
+
* @param strategyParams A list of strategies and multipliers used by the StakeRegistry to calculate
112
+
* an operator's stake weight for the quorum.
113
+
* @param lookAheadPeriod The number of blocks to look ahead when calculating slashable stake.
114
+
* @param slasher The address of the slasher to use for the operatorSet (quorum) in EigenLayer core
115
+
* @dev Can only be called when operator sets are enabled.
This function creates a new quorum that specifically tracks slashable stake for operators. This type of quorum provides slashing enforcement through the `AllocationManager`.
106
127
107
128
*Effects:*
108
-
* Same as `createTotalDelegatedStakeQuorum`, but initializes the quorum with slashable stake type
129
+
* Same as `createTotalDelegatedStakeQuorum`, but
130
+
- initializes the quorum with slashable stake type
131
+
- Sets the `slasher` to an address that is controlled by the AVS
109
132
* Additionally configures the `lookAheadPeriod` for slashable stake calculation
110
133
111
134
*Requirements:*
@@ -117,7 +140,7 @@ This function creates a new quorum that specifically tracks slashable stake for
117
140
function setOperatorSetParams(
118
141
uint8 quorumNumber,
119
142
OperatorSetParam memory operatorSetParams
120
-
)
143
+
)
121
144
external
122
145
```
123
146
@@ -151,7 +174,7 @@ function registerOperator(
151
174
address avs,
152
175
uint32[] calldata operatorSetIds,
153
176
bytes calldata data
154
-
)
177
+
)
155
178
external
156
179
onlyAllocationManager
157
180
onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR)
@@ -184,7 +207,7 @@ function deregisterOperator(
184
207
address operator,
185
208
address avs,
186
209
uint32[] calldata operatorSetIds
187
-
)
210
+
)
188
211
external
189
212
onlyAllocationManager
190
213
onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR)
@@ -210,7 +233,7 @@ This function is called by the `AllocationManager` when an operator wants to der
210
233
```solidity
211
234
function updateSocket(
212
235
string memory socket
213
-
)
236
+
)
214
237
external
215
238
```
216
239
@@ -229,7 +252,7 @@ This function allows a registered operator to update their socket information.
229
252
function ejectOperator(
230
253
address operator,
231
254
bytes memory quorumNumbers
232
-
)
255
+
)
233
256
external
234
257
onlyEjector
235
258
```
@@ -261,7 +284,7 @@ The `SlashingRegistryCoordinator` manages operator stakes through the `StakeRegi
261
284
function updateOperatorsForQuorum(
262
285
address[][] memory operatorsPerQuorum,
263
286
bytes calldata quorumNumbers
264
-
)
287
+
)
265
288
external
266
289
```
267
290
@@ -308,18 +331,18 @@ The contract implements two helper functions to calculate these thresholds:
308
331
function _individualKickThreshold(
309
332
uint96 operatorStake,
310
333
OperatorSetParam memory setParams
311
-
)
312
-
internal
313
-
pure
334
+
)
335
+
internal
336
+
pure
314
337
```
315
338
316
339
```solidity
317
340
function _totalKickThreshold(
318
341
uint96 totalStake,
319
342
OperatorSetParam memory setParams
320
-
)
321
-
internal
322
-
pure
343
+
)
344
+
internal
345
+
pure
323
346
```
324
347
325
348
#### Churn Approval
@@ -340,7 +363,7 @@ function calculateOperatorChurnApprovalDigestHash(
340
363
OperatorKickParam[] memory operatorKickParams,
341
364
bytes32 salt,
342
365
uint256 expiry
343
-
)
366
+
)
344
367
public
345
368
```
346
369
@@ -349,7 +372,7 @@ function calculateOperatorChurnApprovalDigestHash(
349
372
```solidity
350
373
function setChurnApprover(
351
374
address _churnApprover
352
-
)
375
+
)
353
376
external
354
377
```
355
378
@@ -377,11 +400,11 @@ The `SlashingRegistryCoordinator` integrates with `AllocationManager`, and is id
377
400
```solidity
378
401
function setAVS(
379
402
address _avs
380
-
)
403
+
)
381
404
external
382
405
```
383
406
384
-
This function sets the AVS address for the AVS (this identitiy is used for UAM integration). Note: updating this will break existing operator sets, this value should only be set once.
407
+
This function sets the AVS address for the AVS (this identitiy is used for UAM integration). Note: updating this will break existing operator sets, this value should only be set once.
385
408
This value should be the address of the `ServiceManager` contract.
386
409
387
410
*Effects:*
@@ -395,7 +418,7 @@ This value should be the address of the `ServiceManager` contract.
395
418
```solidity
396
419
function supportsAVS(
397
420
address _avs
398
-
)
421
+
)
399
422
public
400
423
```
401
424
@@ -420,7 +443,7 @@ These functions allow the contract owner to configure various parameters and rol
420
443
```solidity
421
444
function setEjector(
422
445
address _ejector
423
-
)
446
+
)
424
447
external
425
448
```
426
449
@@ -438,7 +461,7 @@ This function updates the address that is authorized to forcibly eject operators
0 commit comments