diff --git a/op-node/rollup/derive/attributes_queue.go b/op-node/rollup/derive/attributes_queue.go index 190a298c4f4..99c94afb0be 100644 --- a/op-node/rollup/derive/attributes_queue.go +++ b/op-node/rollup/derive/attributes_queue.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum-optimism/optimism/espresso" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/log" "github.com/ethereum-optimism/optimism/op-node/rollup" @@ -196,7 +197,16 @@ func (aq *AttributesQueue) NextAttributes(ctx context.Context, parent eth.L2Bloc } aq.batch = batch aq.concluding = concluding - aq.log.Info("singular batch from op-node is ", "batch", aq.batch, "concluding", concluding) + // Log compact tx hashes instead of raw bytes to avoid being truncated by DataDog. + txHashes := make([]common.Hash, 0, len(aq.batch.Transactions)) + for _, rawTx := range aq.batch.Transactions { + var tx types.Transaction + if err := tx.UnmarshalBinary(rawTx); err == nil { + txHashes = append(txHashes, tx.Hash()) + } + // Malformed txs are skipped here and will be rejected during payload construction. + } + aq.batch.LogContext(aq.log).Info("singular batch from op-node", "tx_hashes", txHashes, "concluding", concluding) } // Actually generate the next attributes