Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update eigen sdk to v0.2.0-beta #179

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
7 changes: 3 additions & 4 deletions generic-operator-proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import (
"os/signal"
"syscall"

"github.com/ethereum/go-ethereum/ethclient"
"github.com/pkg/errors"
"github.com/urfave/cli"

"github.com/Layr-Labs/eigensdk-go/chainio/clients/eth"

"github.com/alt-research/avs-generic-aggregator/core"
"github.com/alt-research/avs-generic-aggregator/core/config"
proxyUtils "github.com/alt-research/avs-generic-aggregator/proxy/utils"
Expand Down Expand Up @@ -56,12 +55,12 @@ func operatorProxyMain(ctx *cli.Context) error {
return errors.Wrap(err, "New logger")
}

avsConfigs, err := config.NewAVSConfigs(ctx)
avsConfigs, err := config.NewAVSConfigs(ctx, logger)
if err != nil {
return err
}

ethRpcClient, err := eth.NewClient(nodeConfig.EthRpcUrl)
ethRpcClient, err := ethclient.Dial(nodeConfig.EthRpcUrl)
if err != nil {
logger.Errorf("Cannot create http ethclient", "err", err)
return err
Expand Down
2 changes: 1 addition & 1 deletion generic-operator-proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ProxyHashRpcServer struct {

func NewAlertProxyRpcServer(
logger logging.Logger,
ethClient eth.Client,
ethClient eth.HttpBackend,
avsCfgs []config.GenericAVSConfig,
defaultAVSName string,
method string,
Expand Down
20 changes: 15 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/alt-research/avs

go 1.21
go 1.21.13

toolchain go1.21.1
toolchain go1.22.10

require (
github.com/Layr-Labs/eigensdk-go v0.1.7
github.com/alt-research/avs-generic-aggregator v0.1.5
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1
github.com/alt-research/avs-generic-aggregator v0.3.0-beta
github.com/ethereum/go-ethereum v1.14.3
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.1
Expand All @@ -17,6 +17,7 @@ require (
golang.org/x/crypto v0.23.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.34.1
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand All @@ -39,6 +40,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/carlmjohnson/versioninfo v0.22.5 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
Expand Down Expand Up @@ -67,6 +69,7 @@ require (
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand All @@ -86,11 +89,18 @@ require (
github.com/rs/cors v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
github.com/uptrace/bun v1.2.1 // indirect
github.com/uptrace/bun/dialect/pgdialect v1.2.1 // indirect
github.com/uptrace/bun/driver/pgdriver v1.2.1 // indirect
github.com/urfave/cli/v2 v2.27.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand All @@ -101,7 +111,7 @@ require (
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
mellium.im/sasl v0.3.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

Expand Down
34 changes: 26 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg6
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Layr-Labs/eigensdk-go v0.1.7 h1:2qC3Wl2gKw/mJJfESeXTH7bKoHWqQCFz6qKO3Ny7TDI=
github.com/Layr-Labs/eigensdk-go v0.1.7/go.mod h1:OF9lmS/57MKxS0xpSpX0qHZl0SKkDRpvJIvsGvMN1y8=
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1 h1:vW7AKcvt7fGlIeOMl2Ft9Au/ib8Z9ush8fSrpFSVr10=
github.com/Layr-Labs/eigensdk-go v0.2.0-beta.1/go.mod h1:G4yqiK+5NfUuEMVGGncOEm7QskuGRPmKA7bKxpPzPT4=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o=
github.com/alt-research/avs-generic-aggregator v0.1.5-0.20240521140244-4b403b0f7805 h1:wtosyF8T8s6hRzQ8t5ONrU8fpGCfEls3q3JJJytK1rA=
github.com/alt-research/avs-generic-aggregator v0.1.5-0.20240521140244-4b403b0f7805/go.mod h1:lE631BS7IRUJCdtT6Mb79bGIL7dwUtdSwR7XTQiU/0I=
github.com/alt-research/avs-generic-aggregator v0.1.5 h1:iA6/Md+WIRAsCuPqAFuobuG/wGXvyDHJGOtloS3fOd8=
github.com/alt-research/avs-generic-aggregator v0.1.5/go.mod h1:lE631BS7IRUJCdtT6Mb79bGIL7dwUtdSwR7XTQiU/0I=
github.com/alt-research/avs-generic-aggregator v0.3.0-beta h1:BpoQiEwVZw31+ONWILOCHdKM5YjwBnDS3HX0hi0fOMI=
github.com/alt-research/avs-generic-aggregator v0.3.0-beta/go.mod h1:EIzvC7VzO/CTfINgDdQnvmRpI+e3mEBhaEAu0tf3zIk=
github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA=
github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
github.com/aws/aws-sdk-go-v2/config v1.27.12 h1:vq88mBaZI4NGLXk8ierArwSILmYHDJZGJOeAc/pzEVQ=
Expand Down Expand Up @@ -53,6 +51,8 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.3 h1:6+iXlDKE8RMtKsvK0gshlXIuPbyWM/h84Ens
github.com/btcsuite/btcd/btcec/v2 v2.3.3/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/carlmjohnson/versioninfo v0.22.5 h1:O00sjOLUAFxYQjlN/bzYTuZiS0y6fWDQjMRvwtKgwwc=
github.com/carlmjohnson/versioninfo v0.22.5/go.mod h1:QT9mph3wcVfISUKd0i9sZfVrPviHuSF+cUtLjm2WSf8=
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
Expand Down Expand Up @@ -99,8 +99,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnN
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg=
github.com/docker/docker v25.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
Expand Down Expand Up @@ -176,6 +176,8 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
Expand Down Expand Up @@ -268,6 +270,8 @@ github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11
github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 h1:17JxqqJY66GmZVHkmAsGEkcIu0oCe3AM420QDgGwZx0=
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466/go.mod h1:9dIRpgIY7hVhoqfe0/FcYp0bpInZaT7dc3BYOprrIUE=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sourcegraph/jsonrpc2 v0.2.0 h1:KjN/dC4fP6aN9030MZCJs9WQbTOjWHhrtKVpzzSrr/U=
Expand All @@ -293,12 +297,24 @@ github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZ
github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY=
github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
github.com/uptrace/bun v1.2.1 h1:2ENAcfeCfaY5+2e7z5pXrzFKy3vS8VXvkCag6N2Yzfk=
github.com/uptrace/bun v1.2.1/go.mod h1:cNg+pWBUMmJ8rHnETgf65CEvn3aIKErrwOD6IA8e+Ec=
github.com/uptrace/bun/dialect/pgdialect v1.2.1 h1:ceP99r03u+s8ylaDE/RzgcajwGiC76Jz3nS2ZgyPQ4M=
github.com/uptrace/bun/dialect/pgdialect v1.2.1/go.mod h1:mv6B12cisvSc6bwKm9q9wcrr26awkZK8QXM+nso9n2U=
github.com/uptrace/bun/driver/pgdriver v1.2.1 h1:Cp6c1tKzbTIyL8o0cGT6cOhTsmQZdsUNhgcV51dsmLU=
github.com/uptrace/bun/driver/pgdriver v1.2.1/go.mod h1:jEd3WGx74hWLat3/IkesOoWNjrFNUDADK3nkyOFOOJM=
github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM=
github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0=
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok=
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -405,5 +421,7 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mellium.im/sasl v0.3.1 h1:wE0LW6g7U83vhvxjC1IY8DnXM+EU095yeo8XClvCdfo=
mellium.im/sasl v0.3.1/go.mod h1:xm59PUYpZHhgQ9ZqoJ5QaCqzWMi8IeS49dhp6plPCzw=
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
21 changes: 18 additions & 3 deletions legacy/aggregator/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package aggregator
import (
"context"
"encoding/hex"
"errors"
"fmt"
"sync"
"time"
Expand All @@ -13,6 +14,7 @@ import (
"github.com/Layr-Labs/eigensdk-go/services/avsregistry"
blsagg "github.com/Layr-Labs/eigensdk-go/services/bls_aggregation"
"github.com/Layr-Labs/eigensdk-go/services/operatorsinfo"
eigentypes "github.com/Layr-Labs/eigensdk-go/types"

"github.com/alt-research/avs/legacy/aggregator/rpc"
"github.com/alt-research/avs/legacy/aggregator/types"
Expand All @@ -27,7 +29,7 @@ type AggregatorService struct {
cfg *config.Config

avsReader chainio.AvsReaderer
ethClient eth.Client
ethClient eth.HttpBackend

blsAggregationService blsagg.BlsAggregationService
tasks map[types.TaskIndex]*message.AlertTaskInfo
Expand Down Expand Up @@ -62,9 +64,22 @@ func NewAggregatorService(c *config.Config) (*AggregatorService, error) {
return nil, err
}

operatorsinfoService := operatorsinfo.NewOperatorsInfoServiceInMemory(context.Background(), clients.AvsRegistryChainSubscriber, clients.AvsRegistryChainReader, c.Logger)
operatorsinfoService := operatorsinfo.NewOperatorsInfoServiceInMemory(
context.Background(),
clients.AvsRegistryChainSubscriber,
clients.AvsRegistryChainReader,
nil,
// TODO: support start block number
operatorsinfo.Opts{},
c.Logger)
avsRegistryService := avsregistry.NewAvsRegistryServiceChainCaller(avsReader, operatorsinfoService, c.Logger)
blsAggregationService := blsagg.NewBlsAggregatorService(avsRegistryService, c.Logger)
blsAggregationService := blsagg.NewBlsAggregatorService(avsRegistryService, func(taskResponse eigentypes.TaskResponse) (eigentypes.TaskResponseDigest, error) {
taskResponseDetails, ok := taskResponse.(eigentypes.Bytes32)
if !ok {
return eigentypes.TaskResponseDigest{}, errors.New("the taskResponse should be types.Bytes32")
}
return taskResponseDetails, nil
}, c.Logger)

return &AggregatorService{
logger: c.Logger,
Expand Down
3 changes: 1 addition & 2 deletions legacy/cli/actions/deposit_into_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"log"
"math/big"

sdkutils "github.com/Layr-Labs/eigensdk-go/utils"
"github.com/alt-research/avs/legacy/core/config"
"github.com/alt-research/avs/legacy/operator"
"github.com/ethereum/go-ethereum/common"
Expand All @@ -19,7 +18,7 @@ func DepositIntoStrategy(ctx *cli.Context) error {
nodeConfig := config.NodeConfig{}

if configPath != "" {
err := sdkutils.ReadYamlConfig(configPath, &nodeConfig)
err := config.ReadYamlConfig(configPath, &nodeConfig)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions legacy/cli/actions/deregister_operator_with_avs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"log"

sdkutils "github.com/Layr-Labs/eigensdk-go/utils"
"github.com/alt-research/avs/legacy/core/config"
"github.com/alt-research/avs/legacy/operator"
"github.com/urfave/cli"
Expand All @@ -15,7 +14,7 @@ func DeregisterOperatorWithAvs(ctx *cli.Context) error {
nodeConfig := config.NodeConfig{}

if configPath != "" {
err := sdkutils.ReadYamlConfig(configPath, &nodeConfig)
err := config.ReadYamlConfig(configPath, &nodeConfig)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions legacy/cli/actions/print_operator_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"log"

sdkutils "github.com/Layr-Labs/eigensdk-go/utils"
"github.com/alt-research/avs/legacy/core/config"
"github.com/alt-research/avs/legacy/operator"
"github.com/urfave/cli"
Expand All @@ -16,7 +15,7 @@ func PrintOperatorStatus(ctx *cli.Context) error {
nodeConfig := config.NodeConfig{}

if configPath != "" {
err := sdkutils.ReadYamlConfig(configPath, &nodeConfig)
err := config.ReadYamlConfig(configPath, &nodeConfig)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions legacy/cli/actions/register_operator_with_avs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strings"

sdkecdsa "github.com/Layr-Labs/eigensdk-go/crypto/ecdsa"
sdkutils "github.com/Layr-Labs/eigensdk-go/utils"
"github.com/alt-research/avs/legacy/core/config"
"github.com/alt-research/avs/legacy/operator"
"github.com/pkg/errors"
Expand All @@ -21,7 +20,7 @@ func RegisterOperatorWithAvs(ctx *cli.Context) error {
nodeConfig := config.NodeConfig{}

if configPath != "" {
err := sdkutils.ReadYamlConfig(configPath, &nodeConfig)
err := config.ReadYamlConfig(configPath, &nodeConfig)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions legacy/cli/actions/register_operator_with_eigenlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/urfave/cli"

sdkutils "github.com/Layr-Labs/eigensdk-go/utils"
"github.com/alt-research/avs/legacy/core/config"
"github.com/alt-research/avs/legacy/operator"
)
Expand All @@ -17,7 +16,7 @@ func RegisterOperatorWithEigenlayer(ctx *cli.Context) error {
nodeConfig := config.NodeConfig{}

if configPath != "" {
err := sdkutils.ReadYamlConfig(configPath, &nodeConfig)
err := config.ReadYamlConfig(configPath, &nodeConfig)
if err != nil {
return err
}
Expand Down
20 changes: 14 additions & 6 deletions legacy/core/chainio/avs_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ import (
)

type AvsReaderer interface {
sdkavsregistry.AvsRegistryReader
IsOperatorRegistered(
opts *bind.CallOpts,
operatorAddress gethcommon.Address,
) (bool, error)

GetOperatorFromId(
opts *bind.CallOpts,
operatorId sdktypes.OperatorId,
) (gethcommon.Address, error)

CheckSignatures(
ctx context.Context, msgHash [32]byte, quorumNumbers []byte, referenceBlockNumber uint32, nonSignerStakesAndSignature csservicemanager.IBLSSignatureCheckerNonSignerStakesAndSignature,
Expand All @@ -33,7 +41,7 @@ type AvsReaderer interface {
}

type AvsReader struct {
sdkavsregistry.AvsRegistryReader
*sdkavsregistry.ChainReader
AvsServiceBindings *AvsManagersBindings
logger logging.Logger
}
Expand All @@ -43,7 +51,7 @@ var _ AvsReaderer = (*AvsReader)(nil)
func BuildAvsReaderFromConfig(c *config.Config) (*AvsReader, error) {
return BuildAvsReader(c.RegistryCoordinatorAddr, c.OperatorStateRetrieverAddr, c.EthHttpClient, c.Logger)
}
func BuildAvsReader(registryCoordinatorAddr, operatorStateRetrieverAddr gethcommon.Address, ethHttpClient eth.Client, logger logging.Logger) (*AvsReader, error) {
func BuildAvsReader(registryCoordinatorAddr, operatorStateRetrieverAddr gethcommon.Address, ethHttpClient eth.HttpBackend, logger logging.Logger) (*AvsReader, error) {
avsManagersBindings, err := NewAvsManagersBindings(registryCoordinatorAddr, operatorStateRetrieverAddr, ethHttpClient, logger)
if err != nil {
return nil, err
Expand All @@ -54,9 +62,9 @@ func BuildAvsReader(registryCoordinatorAddr, operatorStateRetrieverAddr gethcomm
}
return NewAvsReader(avsRegistryReader, avsManagersBindings, logger)
}
func NewAvsReader(avsRegistryReader sdkavsregistry.AvsRegistryReader, avsServiceBindings *AvsManagersBindings, logger logging.Logger) (*AvsReader, error) {
func NewAvsReader(avsRegistryReader *sdkavsregistry.ChainReader, avsServiceBindings *AvsManagersBindings, logger logging.Logger) (*AvsReader, error) {
return &AvsReader{
AvsRegistryReader: avsRegistryReader,
ChainReader: avsRegistryReader,
AvsServiceBindings: avsServiceBindings,
logger: logger,
}, nil
Expand Down Expand Up @@ -86,7 +94,7 @@ func (r *AvsReader) IsAlertContains(ctx context.Context, messageHash [32]byte) (
}

func (r *AvsReader) GetQuorumsByBlockNumber(ctx context.Context, blockNumber uint32) (sdktypes.QuorumNums, error) {
quorumCount, err := r.AvsRegistryReader.GetQuorumCount(&bind.CallOpts{
quorumCount, err := r.ChainReader.GetQuorumCount(&bind.CallOpts{
Context: ctx,
BlockNumber: big.NewInt(int64(blockNumber)),
})
Expand Down
Loading
Loading