Skip to content

Commit

Permalink
Use hex representation of operator ID in dispatcher logs (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanc authored Dec 16, 2024
1 parent a7a4484 commit 9ee2fe7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions disperser/controller/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/Layr-Labs/eigenda/disperser/common/v2/blobstore"
"github.com/Layr-Labs/eigensdk-go/logging"
gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/prometheus/client_golang/prometheus"

Check failure on line 20 in disperser/controller/dispatcher.go

View workflow job for this annotation

GitHub Actions / Linter

prometheus redeclared in this block

Check failure on line 20 in disperser/controller/dispatcher.go

View workflow job for this annotation

GitHub Actions / Linter

"github.com/prometheus/client_golang/prometheus" imported and not used (typecheck)

Check failure on line 20 in disperser/controller/dispatcher.go

View workflow job for this annotation

GitHub Actions / Linter

prometheus redeclared in this block

Check failure on line 20 in disperser/controller/dispatcher.go

View workflow job for this annotation

GitHub Actions / Linter

"github.com/prometheus/client_golang/prometheus" imported and not used) (typecheck)

Check failure on line 20 in disperser/controller/dispatcher.go

View workflow job for this annotation

GitHub Actions / Linter

prometheus redeclared in this block
)

var errNoBlobsToDispatch = errors.New("no blobs to dispatch")
Expand Down Expand Up @@ -153,7 +154,7 @@ func (d *Dispatcher) HandleBatch(ctx context.Context) (chan core.SigningMessage,

client, err := d.nodeClientManager.GetClient(host, dispersalPort)
if err != nil {
d.logger.Error("failed to get node client", "operator", opID, "err", err)
d.logger.Error("failed to get node client", "operator", opID.Hex(), "err", err)
continue
}

Expand Down Expand Up @@ -208,7 +209,7 @@ func (d *Dispatcher) HandleBatch(ctx context.Context) (chan core.SigningMessage,
break
}

d.logger.Warn("failed to send chunks", "operator", opID, "NumAttempts", i, "err", err)
d.logger.Warn("failed to send chunks", "operator", opID.Hex(), "NumAttempts", i, "err", err)
time.Sleep(time.Duration(math.Pow(2, float64(i))) * time.Second) // Wait before retrying
}
d.metrics.reportSendChunksRetryCount(float64(i))
Expand Down

0 comments on commit 9ee2fe7

Please sign in to comment.