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

fix: Upgrade eigensdk to fix query log failed in boot #80

Merged
merged 1 commit into from
Apr 3, 2024
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
28 changes: 28 additions & 0 deletions aggregator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Aggregator

config:

```yaml
# 'production' only prints info and above. 'development' also prints debug
environment: production

eth_rpc_url: https://ethereum-holesky-rpc.publicnode.com
eth_ws_url: wss://ethereum-holesky-rpc.publicnode.com

# address which the aggregator listens on for operator signed messages
aggregator_server_ip_port_address: 0.0.0.0:8090

# the layer1 chain id the avs contracts in
layer1_chain_id: 17000

# the layer2 chain id
layer2_chain_id: 20240219

```

envs:

```bash
AVS_REGISTRY_COORDINATOR_ADDRESS=0x1eA7D160d325B289bF981e0D7aB6Bf3261a0FFf2
OPERATOR_STATE_RETRIEVER_ADDRESS=0xBE1c904525910fdB49dB33b4960DF9aC9f603dC7
```
5 changes: 2 additions & 3 deletions aggregator/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"sync"
"time"

"github.com/Layr-Labs/eigensdk-go/crypto/bls"
"github.com/Layr-Labs/eigensdk-go/logging"
"github.com/ethereum/go-ethereum/common"

Expand Down Expand Up @@ -45,8 +44,8 @@ type FinishedTaskStatus struct {
}

type OperatorStatus struct {
LastTime int64 `json:"lastTime"`
OperatorId bls.OperatorId `json:"operatorId"`
LastTime int64 `json:"lastTime"`
OperatorId sdktypes.OperatorId `json:"operatorId"`
}

// Aggregator sends tasks (numbers to square) onchain, then listens for operator signed TaskResponses.
Expand Down
2 changes: 1 addition & 1 deletion core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func NewConfig(ctx *cli.Context) (*Config, error) {
if err != nil {
return nil, types.WrapError(errors.New("Failed to create transaction sender"), err)
}
txMgr := txmgr.NewSimpleTxManager(txSender, ethRpcClient, logger, signerV2, aggregatorAddr)
txMgr := txmgr.NewSimpleTxManager(txSender, ethRpcClient, logger, aggregatorAddr)

config := &Config{
Logger: logger,
Expand Down
4 changes: 2 additions & 2 deletions core/message/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (a AlertTaskInfo) ToIMachServiceManagerAlertHeader() csservicemanager.IMach
type InitOperatorRequest struct {
Layer1ChainId uint32
ChainId uint32
OperatorId bls.OperatorId
OperatorId sdktypes.OperatorId
OperatorAddress common.Address
OperatorStateRetrieverAddr common.Address
RegistryCoordinatorAddr common.Address
Expand Down Expand Up @@ -125,7 +125,7 @@ type ProcessSignedTaskResponseResponse struct {
type SignedTaskRespRequest struct {
Alert AlertTaskInfo
BlsSignature bls.Signature
OperatorId bls.OperatorId
OperatorId sdktypes.OperatorId
}

type SignedTaskRespResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.1

require (
github.com/Layr-Labs/eigensdk-go v0.1.2
github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240330002735-c0efcad71d31
github.com/ethereum/go-ethereum v1.13.14
github.com/prometheus/client_golang v1.19.0
github.com/sourcegraph/jsonrpc2 v0.2.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMd
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Layr-Labs/eigensdk-go v0.1.2 h1:0CbdLMr9IPWFW3RPfPORFWQYgXMAa/K4tA8rncBQ/YY=
github.com/Layr-Labs/eigensdk-go v0.1.2/go.mod h1:J+d9zxN4VyMtchmsPzGASFcCjpnh1eT4aE2ggiqOz/g=
github.com/Layr-Labs/eigensdk-go v0.1.3 h1:GYRd3CYtPFkLVP07Ml284j9m4igKvPxeAhgSCpRCtpc=
github.com/Layr-Labs/eigensdk-go v0.1.3/go.mod h1:J+d9zxN4VyMtchmsPzGASFcCjpnh1eT4aE2ggiqOz/g=
github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240330002735-c0efcad71d31 h1:edCd/bQIrnlImZe6os35okWDb1I4S/QeQ4voF/xPhok=
github.com/Layr-Labs/eigensdk-go v0.1.4-0.20240330002735-c0efcad71d31/go.mod h1:HOSNuZcwaKbP4cnNk9c1hK2B2RitcMQ36Xj2msBBBpE=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
Expand Down
4 changes: 2 additions & 2 deletions operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Operator struct {
eigenlayerReader sdkelcontracts.ELReader
eigenlayerWriter sdkelcontracts.ELWriter
blsKeypair *bls.KeyPair
operatorId bls.OperatorId
operatorId sdktypes.OperatorId
operatorAddr common.Address
metadataURI string
rpcServer RpcServer
Expand Down Expand Up @@ -290,7 +290,7 @@ func NewOperatorFromConfig(cfg config.NodeConfig) (*Operator, error) {
if err != nil {
return nil, err
}
txMgr := txmgr.NewSimpleTxManager(txSender, ethRpcClient, logger, signerV2, addr)
txMgr := txmgr.NewSimpleTxManager(txSender, ethRpcClient, logger, addr)

avsWriter, err := chainio.BuildAvsWriter(
txMgr, common.HexToAddress(c.AVSRegistryCoordinatorAddress),
Expand Down
6 changes: 3 additions & 3 deletions operator/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/alt-research/avs/metrics"
"github.com/ethereum/go-ethereum/common"

"github.com/Layr-Labs/eigensdk-go/crypto/bls"
"github.com/Layr-Labs/eigensdk-go/logging"
sdktypes "github.com/Layr-Labs/eigensdk-go/types"
)

type AggregatorRpcClienter interface {
Expand All @@ -26,14 +26,14 @@ type AggregatorRpcClient struct {
metrics metrics.Metrics
logger logging.Logger
config config.NodeConfig
operatorId bls.OperatorId
operatorId sdktypes.OperatorId
operatorAddr common.Address
OperatorStateRetrieverAddr common.Address
RegistryCoordinatorAddr common.Address
aggregatorIpPortAddr string
}

func NewAggregatorRpcClient(config config.NodeConfig, operatorId bls.OperatorId, operatorAddr common.Address, logger logging.Logger, metrics metrics.Metrics) (*AggregatorRpcClient, error) {
func NewAggregatorRpcClient(config config.NodeConfig, operatorId sdktypes.OperatorId, operatorAddr common.Address, logger logging.Logger, metrics metrics.Metrics) (*AggregatorRpcClient, error) {
return &AggregatorRpcClient{
// set to nil so that we can create an rpc client even if the aggregator is not running
rpcClient: nil,
Expand Down