Skip to content

Releases: Layr-Labs/eigensdk-go

v1.0.0-rc.1 - mainnet slashing

15 Apr 22:00
7455027
Compare
Choose a tag to compare
Pre-release

What's Changed

  • Changed foundry image used in the repo to stable tag in #633

Full Changelog: v1.0.0-rc.0...v1.0.0-rc.1

v1.0.0-rc.0 - mainnet slashing

11 Apr 16:01
a49314b
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v0.3.0...v1.0.0-rc.0

v0.3.0 - Holesky testnet

19 Mar 17:12
492d59c
Compare
Choose a tag to compare
Pre-release

What's Changed

This release includes bindings updates to the v1.4.0-testnet-holesky middleware release, with related functionality added to the chainio module. It also adds mainnet compatibility by adding a set of bindings for M2 EigenLayer contracts, the DontUseAllocationManager config option, and RegisterAsOperatorPreSlashing method to elcontracts.ChainWriter. Apart from that, we include some interface changes on the BlsAggregationService, with a fix for aggregating signatures on multiple quorums.

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 bindings configuration structs. When true, the bindings won't try to fetch the AllocationManager address, which avoids errors on pre-slashing deployments (like the current mainnet one).

  • feat: add missing contract addresses on BuildAllConfig by @MegaRedHand in #558

  • 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,
      )
  • Introduces two new functions for elcontracts.chainReader from core contracts v1.3.0-rc.0 release by @maximopalopoli in #602

    • IsOperatorSlashable

        isSlashable, err := chainReader.IsOperatorSlashable(
          context.Background(),
          operatorAddress,
          operatorSet,
        )
        require.NoError(t, err)
    • GetAllocatedStake

        allocatedStakes, err = chainReader.GetAllocatedStake(
          context.Background(),
          operatorSet,
          operatorAddresses,
          strategyAddresses,
        )
        require.NoError(t, err)
  • feat: added setMinimumStakeForQuorum by @Sidu28 in #554

  • feat: added StakeRegistryStorage functions by @Sidu28 in #555

  • feat: added BlsApkRegistryStorage functions by @Sidu28 in #556

  • feat: added AllocationManagerStorage functions by @Sidu28 in #563

  • feat: added DelegationManagerStorage functions by @Sidu28 in #564

  • feat: added ServiceManagerBase.getRestakeableStrategies wrapper by @MegaRedHand in #559

  • feat: added ServiceManagerBase.createOperatorDirectedAVSRewardsSubmission wrapper by @MegaRedHand in #561

  • feat: added new method registerOperatorWithChurn by @damiramirez in #566

  • feat: added method ModifyStrategyParams by @damiramirez in #570

  • feat: added new method AddStrategies by @damiramirez in #568

  • feat: added ServiceManagerBase.getOperatorRestakedStrategies wrapper by @MegaRedHand in #560

  • feat: added method RemoveStrategies by @damiramirez in #569

  • feat: added updateAVSMetadataURI wrapper by @MegaRedHand in #553

  • feat: added ServiceManagerBase.createAVSRewardsSubmission wrapper by @MegaRedHand in #557

  • feat: Add RewardsCoordinatorStorage functions by @Sidu28 in #565

Changed

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,
      )
      
      /...
Read more

v0.3.0-rc.1 - Slashing

19 Feb 22:41
69e7d28
Compare
Choose a tag to compare
Pre-release

What's Changed

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 setMinimumStakeForQuorum by @Sidu28 in #554

  • feat: added StakeRegistryStorage functions by @Sidu28 in #555

  • BLS APK Registry Storage functions by @Sidu28 in #556

  • feat: add missing contract addresses on BuildAllConfig by @MegaRedHand in #558

  • feat: implement updateAVSMetadataURI wrapper by @MegaRedHand in #553

  • feat: add ServiceManagerBase.createAVSRewardsSubmission wrapper by @MegaRedHand in #557

  • AllocationManagerStorage functions by @Sidu28 in #563

  • Added delegationmanagerstorage functions by @Sidu28 in #564

  • feat: implement ServiceManagerBase.getRestakeableStrategies wrapper by @MegaRedHand in #559

  • feat: implement ServiceManagerBase.createOperatorDirectedAVSRewardsSubmission wrapper by @MegaRedHand in #561

  • feat: implement new method registerOperatorWithChurn by @damiramirez in #566

  • feat: implement method ModifyStrategyParams by @damiramirez in #570

  • feat: implement new method AddStrategies by @damiramirez in #568

  • feat: implement ServiceManagerBase.getOperatorRestakedStrategies wrapper by @MegaRedHand in #560

  • feate: implement method RemoveStrategies by @damiramirez in #569

  • feat: Add RewardsCoordinatorStorage functions by @Sidu28 in #565

Fixes

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)

Removed

Other Changes

  • chore(deps): bump github.com/ethereum/go-ethereum from 1.14.0 to 1.15.0 by @dependabot in #543
  • chore(deps): bump github.com/ethereum/go-ethereum from 1.14.0 to 1.14.13 in /signer by @dependabot in #490
  • feat: make SDK compatible with mainnet contracts by @MegaRedHand in #464
  • fix: respect context in new signature call by @MegaRedHand in #502
  • chore(deps): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.5 by @dependabot in #431
  • ci: add job to enforce updates to the changelog by @ricomateo in #483
  • chore(deps): bump github.com/prometheus/client_golang from 1.19.0 to 1.20.5 by @dependabot in #432
  • chore(deps): bump github.com/consensys/gnark-crypto from 0.14.0 to 0.16.0 by @dependabot in #573
  • test: avsregistry add new tests cases for reader methods by @damiramirez in #458
  • fix: change PR url in Changelog workflow by @maximopalopoli in #575

Full Changelog: v0.2.0...v0.3.0-rc.1

v0.2.0 - Rewards v2.1 testnet

10 Feb 22:01
6c75e89
Compare
Choose a tag to compare

Notable changes

  • Added functions related to the rewards v2.1 release:

    • ChainReader.GetOperatorSetSplit in chainio/clients/elcontracts

      operatorSplit, err = chainReader.GetOperatorSetSplit(
          context.Background(),
          operatorAddr,
          operatorSet,
      )
    • ChainWriter.SetOperatorSetSplit in chainio/clients/elcontracts

      receipt, err = chainWriter.SetOperatorSetSplit(
          context.Background(),
          operatorAddr,
          operatorSet,
          split,
          waitForReceipt,
      )
  • Removed deprecated functions:

    • NewAVSRegistryContractBindings: use avsregistry.NewBindingsFromConfig instead
    • BuildAvsRegistryChainReader: use avsregistry.NewReaderFromConfig instead
    • BuildAvsRegistryChainSubscriber: use avsregistry.NewSubscriberFromConfig instead
    • BuildAvsRegistryChainWriter: use avsregistry.NewWriterFromConfig instead
    • NewEigenlayerContractBindings: use elcontracts.NewBindingsFromConfig instead
    • BuildELChainReader: use elcontracts.NewReaderFromConfig instead
  • Removed RegisterOperatorInQuorumWithAVSRegistryCoordinator from avsregistry.ChainWriter.

    • Users should use RegisterOperator or interact with bindings directly.
  • Removed panics from some functions. BuildReadClients, BuildAll, NewZapLoggerByConfig, and AvsRegistryServiceChainCaller.GetOperatorsAvsStateAtBlock return errors instead of panicking. The OperatorsInfoServiceInMemory no longer panics (errors are only logged).

  • Added documentation to all functions in chainio/clients/elcontracts and chainio/clients/avsregistry.

  • Added some functions related to slashing. More incoming in a future release.

What's Changed

New Contributors

Full Changelog: v0.1.14...v0.2.0

v0.1.14

21 Jan 21:47
7211728
Compare
Choose a tag to compare

Notable Changes

  • Rewards v2 methods for setting and getting operator/avs splits
  • Rewards v2 methods for batch claiming

What's Changed

  • chore: update to latest dev contracts by @gpabst in #397
  • feat: add ProcessClaims convenience method for batch claiming by @gpabst in #399
  • feat: methods to set and read operator avs split by @gpabst in #401
  • feat: convenience methods to get/set operator PI split by @gpabst in #406

Full Changelog: v0.1.13...v0.1.14

[Holesky] v0.2.0-beta.1

06 Jan 21:48
a0cf13a
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: v0.2.0-beta...v0.2.0-beta.1

[Holesky] v0.2.0-beta

03 Jan 21:11
fce9e63
Compare
Choose a tag to compare
[Holesky] v0.2.0-beta Pre-release
Pre-release

Notable Changes

What's Changed

New Contributors

Full Changelog: v0.1.13...v0.2.0-beta

October mainnet

18 Dec 18:15
c559c41
Compare
Choose a tag to compare

Contracts

This release points to

What's Changed

New Contributors

Full Changelog: v0.1.12...v0.1.12-mainnet

v0.1.13

19 Nov 18:53
648c118
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.12...v0.1.13