yetanotherco / aligned_layer

Aligned is a verification layer for zero-knowledge proofs using EigenLayer. Our mission is to accelerate the adoption of zero-knowledge and validity proofs on Ethereum.
https://alignedlayer.com/
MIT License
146 stars 342 forks source link

Aggregator crashes if connection with rpc node is lost #1361

Open JulianVentura opened 1 week ago

JulianVentura commented 1 week ago

The aggregator crashes immediately if connection with rpc node fails.

PatStiles commented 1 week ago

Ref:

client.","server_address":"localhost:4001"}
{"level":"error","ts":1730147025.2860858,"caller":"bls_aggregation/blsagg.go:278","msg":"Task goroutine failed to get operators state from avs registry","taskIndex":0,"err":"Failed to get operator state: Failed to get operators state: Post \"http://localhost:8545/\": read tcp 127.0.0.1:62966->127.0.0.1:8545: read: connection reset by peer","stacktrace":"github.com/Layr-Labs/eigensdk-go/services/bls_aggregation.(*BlsAggregatorService).singleTaskAggregatorGoroutineFunc\n\t/Users/patstiles/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.12/services/bls_aggregation/blsagg.go:278"}
{"level":"error","ts":1730147025.286114,"caller":"operatorsinfo/operatorsinfo_inmemory.go:186","msg":"Error in websocket subscription for new pubkey registration events. Attempting to reconnect...","err":"websocket: close 1006 (abnormal closure): unexpected EOF","service":"OperatorPubkeysServiceInMemory","stacktrace":"github.com/Layr-Labs/eigensdk-go/services/operatorsinfo.(*OperatorsInfoServiceInMemory).startServiceInGoroutine.func1\n\t/Users/patstiles/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.12/services/operatorsinfo/operatorsinfo_inmemory.go:186"}
{"level":"error","ts":1730147025.2864661,"caller":"operatorsinfo/operatorsinfo_inmemory.go:196","msg":"Error opening websocket subscription for new pubkey registrations","err":"Failed to subscribe to NewPubkeyRegistration events: dial tcp [::1]:8545: connect: connection refused","service":"OperatorPubkeysServiceInMemory","stacktrace":"github.com/Layr-Labs/eigensdk-go/services/operatorsinfo.(*OperatorsInfoServiceInMemory).startServiceInGoroutine.func1\n\t/Users/patstiles/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.12/services/operatorsinfo/operatorsinfo_inmemory.go:196"}
panic: Failed to subscribe to NewPubkeyRegistration events: dial tcp [::1]:8545: connect: connection refused

goroutine 163 [running]:
github.com/Layr-Labs/eigensdk-go/services/operatorsinfo.(*OperatorsInfoServiceInMemory).startServiceInGoroutine.func1()
        /Users/patstiles/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.12/services/operatorsinfo/operatorsinfo_inmemory.go:204 +0xd20
created by github.com/Layr-Labs/eigensdk-go/services/operatorsinfo.(*OperatorsInfoServiceInMemory).startServiceInGoroutine in goroutine 70
        /Users/patstiles/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.12/services/operatorsinfo/operatorsinfo_inmemory.go:132 +0xd4