diff --git a/core/aggregation.go b/core/aggregation.go index 2a023e9bb7..7e311f8119 100644 --- a/core/aggregation.go +++ b/core/aggregation.go @@ -3,6 +3,7 @@ package core import ( "bytes" "context" + "encoding/hex" "errors" "fmt" "math/big" @@ -127,8 +128,9 @@ func (a *StdSignatureAggregator) AggregateSignatures(ctx context.Context, state if op, ok := state.IndexedOperators[r.Operator]; ok { socket = op.Socket } + batchHeaderHashHex := hex.EncodeToString(r.BatchHeaderHash[:]) if r.Err != nil { - a.Logger.Warn("error returned from messageChan", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket, "batchHeaderHash", r.BatchHeaderHash, "err", r.Err) + a.Logger.Warn("error returned from messageChan", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket, "batchHeaderHash", batchHeaderHashHex, "err", r.Err) continue } @@ -171,7 +173,7 @@ func (a *StdSignatureAggregator) AggregateSignatures(ctx context.Context, state aggPubKeys[ind].Add(op.PubkeyG2) } } - a.Logger.Info("received signature from operator", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket, "quorumIDs", fmt.Sprint(operatorQuorums), "batchHeaderHash", r.BatchHeaderHash) + a.Logger.Info("received signature from operator", "operatorID", operatorIDHex, "operatorAddress", operatorAddr, "socket", socket, "quorumIDs", fmt.Sprint(operatorQuorums), "batchHeaderHash", batchHeaderHashHex) } // Aggregate Non signer Pubkey Id diff --git a/node/node.go b/node/node.go index 253e0b9599..3c1e37c25e 100644 --- a/node/node.go +++ b/node/node.go @@ -2,6 +2,7 @@ package node import ( "context" + "encoding/hex" "errors" "fmt" "math" @@ -304,7 +305,8 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs } n.Metrics.AcceptBatches("received", batchSize) - log.Debug("Start processing a batch", "batchHeaderHash", batchHeaderHash, "batchSize (in bytes)", batchSize, "num of blobs", len(blobs), "referenceBlockNumber", header.ReferenceBlockNumber) + batchHeaderHashHex := hex.EncodeToString(batchHeaderHash[:]) + log.Debug("Start processing a batch", "batchHeaderHash", batchHeaderHashHex, "batchSize (in bytes)", batchSize, "num of blobs", len(blobs), "referenceBlockNumber", header.ReferenceBlockNumber) // Store the batch. // Run this in a goroutine so we can parallelize the batch storing and batch @@ -349,7 +351,7 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs result := <-storeChan if result.keys != nil { if deleteKeysErr := n.Store.DeleteKeys(ctx, result.keys); deleteKeysErr != nil { - log.Error("Failed to delete the invalid batch that should be rolled back", "batchHeaderHash", batchHeaderHash, "err", deleteKeysErr) + log.Error("Failed to delete the invalid batch that should be rolled back", "batchHeaderHash", batchHeaderHashHex, "err", deleteKeysErr) } } return nil, fmt.Errorf("failed to validate batch: %w", err)