All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Each version will have a separate Breaking Changes
section as well. To describe in how to upgrade from one version to another if needed
-
feat: new BLS aggregation service interface by @maximopalopoli in #578
-
The new interface implies starting the service before using it, interact with it using a handler and receiving the aggregated responses in a separate channel.
-
An example using the interface is:
// initialize service blsAgg := NewBlsAggregatorBuilder(fakeAvsRegistryService, hashFunction, logger) handler, aggResponsesC := blsAgg.Start() // Initialize task metadata := NewTaskMetadata(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) err := handler.InitializeNewTask(metadata) // Process signature taskSignature := NewTaskSignature(taskIndex, taskResponse, blsSig, testOperator1.OperatorId) err = handler.ProcessNewSignature( context.Background(), taskSignature, ) // Receive responses aggregationServiceResponse := <-aggResponsesC
-
-
Added field
DontUseAllocationManager
toBuildAllConfig
by @MegaRedHand in #580 -
Added
AnvilC
field toclients.Clients
struct by @maximopalopoli in #585 -
Added
IsOperatorRegisteredWithAvs
,GetAVSRegistrar
methods to elcontracts chain reader and andSetAVSRegistrar
to chain writer by @maximopalopoli in #585- An example for
IsOperatorRegisteredWithAvs
would be the following:// Given an operator registered to a M2 Quorum isOperator, err := clients.ElChainReader.IsOperatorRegisteredWithAvs(ctx, operatorAddress, avsAddress) assert.NoError(t, err) assert.Equal(t, isOperator, true) // Assuming is registered
- An example for
GetAVSRegistrar
would be the following:avsRegistrar, err := clients.ElChainReader.GetAVSRegistrar(context.Background(), avsAddress) assert.NoError(t, err)
- An example for
SetAVSRegistrar
would be the following:// Usually the AVSRegistrar is the registryCoordinator receipt, err := clients.ElChainWriter.SetAVSRegistrar(context.Background(), avsAddress, contractAddrs.RegistryCoordinator, true) require.NoError(t, err) require.Equal(t, gethtypes.ReceiptStatusSuccessful, receipt.Status)
- An example for
-
Added
RegisterAsOperatorPreSlashing
to register an operator in M2 workflows by @maximopalopoli in #595- A use example would be the following:
operator := types.M2Operator{ Address: fundedAccount, DelegationApproverAddress: "0xd5e099c71b797516c10ed0f0d895f429c2781142", StakerOptOutWindowBlocks: 100, MetadataUrl: "https://madhur-test-public.s3.us-east-2.amazonaws.com/metadata.json", } receipt, err := clients.ElChainWriter.RegisterAsOperatorPreSlashing(context.Background(), operator, true) assert.NoError(t, err) assert.True(t, receipt.Status == 1)
This PR also introduces the
M2Operator
type - A use example would be the following:
-
Added support for registering operators in operator sets with churn approval in #596
-
We added the fields
ChurnApprovalEcdsaPrivateKey
andOperatorKickParams
toelcontracts.RegistrationRequest
. Specifying the first one makes theChainWriter.RegisterForOperatorSets
function sign a churn approval for the operator registration, making the AVS eject operators specified by the other field to make space for the registering operator.request := elcontracts.RegistrationRequest{ // ...old fields are required... ChurnApprovalEcdsaPrivateKey: /* ECDSA key of the AVS churn approver */, OperatorKickParams: /* which operators to kick for each registering quorum */, } receipt, err := chainWriter.RegisterForOperatorSets( context.Background(), registryCoordinatorAddress, request, )
-
- Fixed BLS aggregation for multiple quorums by @TomasArrachea in #394
- fix: change requested pr url in changelog's workflow by @maximopalopoli in #575
- chore: use utils WrapError function instead of fmt's Errorf by @pablodeymo and @maximopalopoli in #579
- fix: propagate DontUseAllocationManager flag between builders configs by @maximopalopoli in #581
-
refactor: encapsulate parameters into
TaskSignature
in #487-
Introduced
TaskSignature
struct to encapsulate parameters related to task signatures: -
Updated
ProcessNewSignature
to accept aTaskSignature
struct instead of multiple parameters.// BEFORE blsAggServ.ProcessNewSignature( context.Background(), taskIndex, taskResponse, blsSigOp1, testOperator1.OperatorId, ) // AFTER taskSignature := NewTaskSignature(taskIndex, taskResponse, blsSig, testOperator1.OperatorId) blsAggServ.ProcessNewSignature( context.Background(), taskSignature, )
-
-
refactor: update interface on
bls aggregation
in #485.-
Introduces a new struct
TaskMetadata
with a constructorNewTaskMetadata
to initialize a new task and a methodWithWindowDuration
to set the window duration. -
Refactors
InitializeNewTask
andsingleTaskAggregatorGoroutineFunc
to accept aTaskMetadata
struct instead of multiple parameters.// BEFORE blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, hashFunction, logger) blsAggServ.InitializeNewTask( taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry, ) // AFTER blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, hashFunction, logger) metadata := NewTaskMetadata(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry) blsAggServ.InitializeNewTask(metadata)
-
Removes
InitializeNewTaskWithWindow
sincewindowDuration
can now be set inTaskMetadata
.// BEFORE blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, hashFunction, logger) err = blsAggServ.InitializeNewTaskWithWindow( taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, timeToExpiry, windowDuration, ) // AFTER blsAggServ := NewBlsAggregatorService(fakeAvsRegistryService, hashFunction, logger) metadata := NewTaskMetadata( taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry, ).WithWindowDuration(windowDuration) blsAggServ.InitializeNewTask(metadata)
-
-
In elcontracts,
ChainReader.IsOperatorRegisteredWithOperatorSet
no longer queries theAVSDirectory
, and so now only works for operator sets by @maximopalopoli in #585- To query if an operator is registered to an M2 quorum you should now use
chainReader.IsOperatorRegisteredWithAvs
, which queries theAVSDirectory
.
- To query if an operator is registered to an M2 quorum you should now use
-
egnaddrs
utility now works with slashing release middleware contracts and, in that case, the returned service manager will be the zero address, unless the--service-manager
is specified by @maximopalopoli in #585. -
The
elcontracts.NewChainWriter
function now receives an additional parameter, the delegation manager address by @maximopalopoli in #595. -
Renamed
SetAccountIdentifier
toSetAvs
#597- The underlying call was renamed in the v1.1.1 eigenlayer-middleware release.
- Removed
IsOperatorSetQuorum
method of avsRegistry chain reader by @maximopalopoli in #585- This function was removed in the v1.1.1 eigenlayer-middleware release.
Changes made in the v0.1.X versions weren't tracked by this changelog.