diff --git a/cmd/tools/firehose/prometheus_exporter.go b/cmd/tools/firehose/prometheus_exporter.go index 10b9971..0c96b01 100644 --- a/cmd/tools/firehose/prometheus_exporter.go +++ b/cmd/tools/firehose/prometheus_exporter.go @@ -93,7 +93,7 @@ func runPrometheusExporterE[B firecore.Block](chain *firecore.Chain[B], zlog *za } if cursor, err := bstream.CursorFromOpaque(response.Cursor); err == nil { - zlog.Info("Got block", zap.Stringer("block", cursor.Block)) + zlog.Info("Got block", zap.String("block", cursor.Block.ID()), zap.Uint64("block_num", cursor.Block.Num())) lastBlockLock.Lock() lastBlockReceived = time.Now() diff --git a/merged_blocks_writer.go b/merged_blocks_writer.go index d141846..72f489d 100644 --- a/merged_blocks_writer.go +++ b/merged_blocks_writer.go @@ -38,11 +38,11 @@ func (w *MergedBlocksWriter) ProcessBlock(blk *pbbstream.Block, obj interface{}) return fmt.Errorf("received unexpected block %s (not a boundary, not the first streamable block %d)", blk, bstream.GetProtocolFirstStreamableBlock) } w.LowBlockNum = LowBoundary(blk.Number) - w.Logger.Debug("setting initial boundary to %d upon seeing block %s", zap.Uint64("low_boundary", w.LowBlockNum), zap.Stringer("blk", blk)) + w.Logger.Debug("setting initial boundary to %d upon seeing block %s", zap.Uint64("low_boundary", w.LowBlockNum), zap.Uint64("blk_num", blk.Number)) } if blk.Number > w.LowBlockNum+99 { - w.Logger.Debug("bundling because we saw block %s from next bundle (%d was not seen, it must not exist on this chain)", zap.Stringer("blk", blk), zap.Uint64("last_bundle_block", w.LowBlockNum+99)) + w.Logger.Debug("bundling because we saw block %s from next bundle (%d was not seen, it must not exist on this chain)", zap.Uint64("blk_num", blk.Number), zap.Uint64("last_bundle_block", w.LowBlockNum+99)) if err := w.writeBundle(); err != nil { return err } diff --git a/node-manager/mindreader/archiver.go b/node-manager/mindreader/archiver.go index d9fbb27..fe57702 100644 --- a/node-manager/mindreader/archiver.go +++ b/node-manager/mindreader/archiver.go @@ -81,7 +81,7 @@ func (a *Archiver) Start(ctx context.Context) { func (a *Archiver) StoreBlock(ctx context.Context, block *pbbstream.Block) error { if block.Number < a.startBlock { - a.logger.Debug("skipping block below start_block", zap.Stringer("block", block), zap.Uint64("start_block", a.startBlock)) + a.logger.Debug("skipping block below start_block", zap.Uint64("block_num", block.Number), zap.Uint64("start_block", a.startBlock)) return nil } diff --git a/node-manager/mindreader/mindreader.go b/node-manager/mindreader/mindreader.go index 4a64114..8845417 100644 --- a/node-manager/mindreader/mindreader.go +++ b/node-manager/mindreader/mindreader.go @@ -258,7 +258,7 @@ func (p *MindReaderPlugin) consumeReadFlow(blocks <-chan *pbbstream.Block) { err := p.archiver.StoreBlock(ctx, block) if err != nil { - p.zlogger.Error("failed storing block in archiver, shutting down and trying to send next blocks individually. You will need to reprocess over this range.", zap.Error(err), zap.Stringer("received_block", block)) + p.zlogger.Error("failed storing block in archiver, shutting down and trying to send next blocks individually. You will need to reprocess over this range.", zap.Error(err), zap.String("received_block", block.Id), zap.Uint64("received_block_num", block.Number)) if !p.IsTerminating() { go p.Shutdown(fmt.Errorf("archiver store block failed: %w", err))