Skip to content

Latest commit

 

History

History
189 lines (154 loc) · 8.9 KB

CHANGELOG.md

File metadata and controls

189 lines (154 loc) · 8.9 KB

Changelog

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

[Unreleased]

Added 🎉

  • 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 to BuildAllConfig by @MegaRedHand in #580

  • Added AnvilC field to clients.Clients struct by @maximopalopoli in #585

  • Added IsOperatorRegisteredWithAvs, GetAVSRegistrar methods to elcontracts chain reader and and SetAVSRegistrar 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)
  • 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

  • Added support for registering operators in operator sets with churn approval in #596

    • We added the fields ChurnApprovalEcdsaPrivateKey and OperatorKickParams to elcontracts.RegistrationRequest. Specifying the first one makes the ChainWriter.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,
      )

Changed

  • 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

Breaking changes

  • refactor: encapsulate parameters into TaskSignature in #487

    • Introduced TaskSignature struct to encapsulate parameters related to task signatures:

    • Updated ProcessNewSignature to accept a TaskSignature 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 constructor NewTaskMetadata to initialize a new task and a method WithWindowDuration to set the window duration.

    • Refactors InitializeNewTask and singleTaskAggregatorGoroutineFunc to accept a TaskMetadata 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 since windowDuration can now be set in TaskMetadata.

      // 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 the AVSDirectory, 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 the AVSDirectory.
  • 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 to SetAvs #597

Removed


Changes made in the v0.1.X versions weren't tracked by this changelog.