Skip to content
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
12 changes: 8 additions & 4 deletions beacon-chain/blockchain/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ func logStateTransitionData(b interfaces.ReadOnlyBeaconBlock) error {
txsPerSlotCount.Set(float64(len(txs)))
}
}
if b.Version() >= version.Deneb {
kzgs, err := b.Body().BlobKzgCommitments()
if err != nil {
log.WithError(err).Error("Failed to get blob KZG commitments")
} else if len(kzgs) > 0 {
log = log.WithField("blobCommitmentCount", len(kzgs))
}
}
log.Info("Finished applying state transition")
return nil
}
Expand Down Expand Up @@ -88,10 +96,6 @@ func logBlockSyncStatus(block interfaces.ReadOnlyBeaconBlock, blockRoot [32]byte
"chainServiceProcessedTime": prysmTime.Now().Sub(receivedTime),
"deposits": len(block.Body().Deposits()),
}
commits, err := block.Body().BlobKzgCommitments()
if err == nil {
lf["commitments"] = len(commits)
}
Comment on lines -91 to -94
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should either log the field count in either Synced new block or Finished applying state transition. It seems to me Finished applying state transition is more appropriate because there's where we log attestation, slashing, exit counts... etc

log.WithFields(lf).Debug("Synced new block")
} else {
log.WithFields(logrus.Fields{
Expand Down
9 changes: 9 additions & 0 deletions validator/client/propose.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
}
log = log.WithField("withdrawalCount", len(withdrawals))
}
if blk.Version() >= version.Deneb {
kzgs, err := blk.Block().Body().BlobKzgCommitments()
if err != nil {
log.WithError(err).Error("Failed to get blob KZG commitments")
return
} else if len(kzgs) != 0 {
log = log.WithField("blobCommitmentCount", len(kzgs))
}
}
}

blkRoot := fmt.Sprintf("%#x", bytesutil.Trunc(blkResp.BlockRoot))
Expand Down