diff --git a/protocol/blockfetch/server.go b/protocol/blockfetch/server.go index b3d563b8..bd7d2f67 100644 --- a/protocol/blockfetch/server.go +++ b/protocol/blockfetch/server.go @@ -61,21 +61,37 @@ func (s *Server) initProtocol() { func (s *Server) NoBlocks() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called NoBlocks()", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("calling NoBlocks()", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgNoBlocks() return s.SendMessage(msg) } func (s *Server) StartBatch() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called StartBatch()", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("calling StartBatch()", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgStartBatch() return s.SendMessage(msg) } func (s *Server) Block(blockType uint, blockData []byte) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called Block(blockType: %+v, blockData: %x)", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr, blockType, blockData)) + Debug( + fmt.Sprintf("calling Block(blockType: %+x, blockData: %x)", blockType, blockData), + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) wrappedBlock := WrappedBlock{ Type: blockType, RawBlock: blockData, @@ -90,7 +106,12 @@ func (s *Server) Block(blockType uint, blockData []byte) error { func (s *Server) BatchDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called BatchDone()", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("calling BatchDone()", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgBatchDone() return s.SendMessage(msg) } @@ -114,7 +135,12 @@ func (s *Server) messageHandler(msg protocol.Message) error { func (s *Server) handleRequestRange(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server request range for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("request range", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config == nil || s.config.RequestRangeFunc == nil { return fmt.Errorf( "received block-fetch RequestRange message but no callback function is defined", @@ -130,7 +156,12 @@ func (s *Server) handleRequestRange(msg protocol.Message) error { func (s *Server) handleClientDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server client done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("client done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) // Restart protocol s.Protocol.Stop() s.initProtocol() diff --git a/protocol/chainsync/server.go b/protocol/chainsync/server.go index 974f8973..671ef586 100644 --- a/protocol/chainsync/server.go +++ b/protocol/chainsync/server.go @@ -79,21 +79,47 @@ func (s *Server) initProtocol() { func (s *Server) RollBackward(point common.Point, tip Tip) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called RollBackward(point: {Slot: %d, Hash: %x}, tip: {Point: %+v, BlockNumber: %d})", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr, point.Slot, point.Hash, tip.Point, tip.BlockNumber)) + Debug( + fmt.Sprintf("calling RollBackward(point: {Slot: %d, Hash: %x}, tip: {Point: {Slot: %d, Hash: %x}, BlockNumber: %d})", + point.Slot, point.Hash, + tip.Point.Slot, tip.Point.Hash, + tip.BlockNumber, + ), + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgRollBackward(point, tip) return s.SendMessage(msg) } func (s *Server) AwaitReply() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called AwaitReply()", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("calling AwaitReply()", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgAwaitReply() return s.SendMessage(msg) } func (s *Server) RollForward(blockType uint, blockData []byte, tip Tip) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called RollForward(blockType: %+v, blockData: %x, tip: {Point: {Slot: %d, Hash: %x}, BlockNumber: %d})", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr, blockType, blockData, tip.Point.Slot, tip.Point.Hash, tip.BlockNumber)) + Debug( + fmt.Sprintf("calling RollForward(blockType: %+x, blockData: %x, tip: {Point: {Slot: %d, Hash: %x}, BlockNumber: %d})", + blockType, + blockData, + tip.Point.Slot, tip.Point.Hash, + tip.BlockNumber, + ), + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.Mode() == protocol.ProtocolModeNodeToNode { eraId := ledger.BlockToBlockHeaderTypeMap[blockType] msg := NewMsgRollForwardNtN( @@ -136,7 +162,12 @@ func (s *Server) handleRequestNext() error { // TODO: figure out why this one log message causes a panic (and only this one) // during tests //s.Protocol.Logger(). - // Debug(fmt.Sprintf("%s: server request next for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + // Debug("request next", + // "component", "network", + // "protocol", ProtocolName, + // "role", "server", + // "connection_id", s.callbackContext.ConnectionId.String(), + // ) if s.config == nil || s.config.RequestNextFunc == nil { return fmt.Errorf( "received chain-sync RequestNext message but no callback function is defined", @@ -147,7 +178,12 @@ func (s *Server) handleRequestNext() error { func (s *Server) handleFindIntersect(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server find intersect for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("find intersect", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config == nil || s.config.FindIntersectFunc == nil { return fmt.Errorf( "received chain-sync FindIntersect message but no callback function is defined", @@ -177,7 +213,12 @@ func (s *Server) handleFindIntersect(msg protocol.Message) error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) // Restart protocol s.Protocol.Stop() s.initProtocol() diff --git a/protocol/handshake/server.go b/protocol/handshake/server.go index e5a6edbc..b745b2a5 100644 --- a/protocol/handshake/server.go +++ b/protocol/handshake/server.go @@ -77,7 +77,12 @@ func (s *Server) handleMessage(msg protocol.Message) error { func (s *Server) handleProposeVersions(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server propose versions for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("propose versions", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.FinishedFunc == nil { return fmt.Errorf( "received handshake ProposeVersions message but no callback function is defined", diff --git a/protocol/keepalive/server.go b/protocol/keepalive/server.go index 8d353c68..8025c201 100644 --- a/protocol/keepalive/server.go +++ b/protocol/keepalive/server.go @@ -70,7 +70,12 @@ func (s *Server) messageHandler(msg protocol.Message) error { func (s *Server) handleKeepAlive(msgGeneric protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server keep alive for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("keep alive", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := msgGeneric.(*MsgKeepAlive) if s.config != nil && s.config.KeepAliveFunc != nil { // Call the user callback function @@ -84,7 +89,12 @@ func (s *Server) handleKeepAlive(msgGeneric protocol.Message) error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config != nil && s.config.DoneFunc != nil { // Call the user callback function return s.config.DoneFunc(s.callbackContext) diff --git a/protocol/localstatequery/server.go b/protocol/localstatequery/server.go index c42f920f..21a67c4f 100644 --- a/protocol/localstatequery/server.go +++ b/protocol/localstatequery/server.go @@ -93,7 +93,12 @@ func (s *Server) messageHandler(msg protocol.Message) error { func (s *Server) handleAcquire(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server acquire for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("acquire", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.AcquireFunc == nil { return fmt.Errorf( "received local-state-query Acquire message but no callback function is defined", @@ -112,7 +117,12 @@ func (s *Server) handleAcquire(msg protocol.Message) error { func (s *Server) handleQuery(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server query for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("query", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.QueryFunc == nil { return fmt.Errorf( "received local-state-query Query message but no callback function is defined", @@ -125,7 +135,12 @@ func (s *Server) handleQuery(msg protocol.Message) error { func (s *Server) handleRelease() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server release for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("release", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.ReleaseFunc == nil { return fmt.Errorf( "received local-state-query Release message but no callback function is defined", @@ -137,7 +152,12 @@ func (s *Server) handleRelease() error { func (s *Server) handleReAcquire(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server reacquire for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("reacquire", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.ReAcquireFunc == nil { return fmt.Errorf( "received local-state-query ReAcquire message but no callback function is defined", @@ -156,7 +176,12 @@ func (s *Server) handleReAcquire(msg protocol.Message) error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.DoneFunc == nil { return fmt.Errorf( "received local-state-query Done message but no callback function is defined", diff --git a/protocol/localtxmonitor/server.go b/protocol/localtxmonitor/server.go index 29e82463..ec426160 100644 --- a/protocol/localtxmonitor/server.go +++ b/protocol/localtxmonitor/server.go @@ -85,7 +85,12 @@ func (s *Server) messageHandler(msg protocol.Message) error { func (s *Server) handleAcquire() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server acquire for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("acquire", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.GetMempoolFunc == nil { return fmt.Errorf( "received local-tx-monitor Acquire message but no GetMempool callback function is defined", @@ -126,13 +131,23 @@ func (s *Server) handleAcquire() error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) return nil } func (s *Server) handleRelease() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server release for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("release", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) s.mempoolCapacity = 0 s.mempoolTxs = nil return nil @@ -140,7 +155,12 @@ func (s *Server) handleRelease() error { func (s *Server) handleHasTx(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server has tx for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("has tx", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msgHasTx := msg.(*MsgHasTx) txId := hex.EncodeToString(msgHasTx.TxId) hasTx := false @@ -159,7 +179,12 @@ func (s *Server) handleHasTx(msg protocol.Message) error { func (s *Server) handleNextTx() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server next tx for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("next tx", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.mempoolNextTxIdx > len(s.mempoolTxs) { newMsg := NewMsgReplyNextTx(0, nil) if err := s.SendMessage(newMsg); err != nil { @@ -178,7 +203,12 @@ func (s *Server) handleNextTx() error { func (s *Server) handleGetSizes() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server get sizes for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("get sizes", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) totalTxSize := 0 for _, tx := range s.mempoolTxs { totalTxSize += len(tx.Tx) diff --git a/protocol/localtxsubmission/server.go b/protocol/localtxsubmission/server.go index e79d3427..c2d75024 100644 --- a/protocol/localtxsubmission/server.go +++ b/protocol/localtxsubmission/server.go @@ -73,7 +73,12 @@ func (s *Server) messageHandler(msg protocol.Message) error { func (s *Server) handleSubmitTx(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server submit tx for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("submit tx", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config.SubmitTxFunc == nil { return fmt.Errorf( "received local-tx-submission SubmitTx message but no callback function is defined", @@ -102,6 +107,11 @@ func (s *Server) handleSubmitTx(msg protocol.Message) error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) return nil } diff --git a/protocol/peersharing/server.go b/protocol/peersharing/server.go index 109de046..9592709c 100644 --- a/protocol/peersharing/server.go +++ b/protocol/peersharing/server.go @@ -79,7 +79,12 @@ func (s *Server) handleMessage(msg protocol.Message) error { func (s *Server) handleShareRequest(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server share request for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("share request", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config == nil || s.config.ShareRequestFunc == nil { return fmt.Errorf( "received peer-sharing ShareRequest message but no callback function is defined", @@ -102,7 +107,12 @@ func (s *Server) handleShareRequest(msg protocol.Message) error { func (s *Server) handleDone(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) // Restart protocol s.Protocol.Stop() s.initProtocol() diff --git a/protocol/txsubmission/server.go b/protocol/txsubmission/server.go index be207182..67ca6240 100644 --- a/protocol/txsubmission/server.go +++ b/protocol/txsubmission/server.go @@ -70,7 +70,11 @@ func (s *Server) initProtocol() { func (s *Server) Start() { s.onceStart.Do(func() { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: starting server protocol for connection %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("starting server protocol", + "component", "network", + "protocol", ProtocolName, + "connection_id", s.callbackContext.ConnectionId.String(), + ) s.Protocol.Start() // Start goroutine to cleanup resources on protocol shutdown go func() { @@ -81,34 +85,19 @@ func (s *Server) Start() { }) } -func (s *Server) messageHandler(msg protocol.Message) error { - var err error - switch msg.Type() { - case MessageTypeReplyTxIds: - err = s.handleReplyTxIds(msg) - case MessageTypeReplyTxs: - err = s.handleReplyTxs(msg) - case MessageTypeDone: - err = s.handleDone() - case MessageTypeInit: - err = s.handleInit() - default: - err = fmt.Errorf( - "%s: received unexpected message type %d", - ProtocolName, - msg.Type(), - ) - } - return err -} - // RequestTxIds requests the next set of TX identifiers from the remote node's mempool func (s *Server) RequestTxIds( blocking bool, reqCount int, ) ([]TxIdAndSize, error) { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called RequestTxIds(blocking: %+v, reqCount: %d)", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr, blocking, reqCount)) + Debug( + fmt.Sprintf("calling RequestTxIds(blocking: %+v, reqCount: %d)", blocking, reqCount), + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgRequestTxIds(blocking, uint16(s.ackCount), uint16(reqCount)) if err := s.SendMessage(msg); err != nil { return nil, err @@ -126,7 +115,13 @@ func (s *Server) RequestTxIds( // RequestTxs requests the content of the requested TX identifiers from the remote node's mempool func (s *Server) RequestTxs(txIds []TxId) ([]TxBody, error) { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server %+v called RequestTxs(txIds: %+v)", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr, txIds)) + Debug( + fmt.Sprintf("calling RequestTxs(txIds: %+v)", txIds), + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msg := NewMsgRequestTxs(txIds) if err := s.SendMessage(msg); err != nil { return nil, err @@ -139,9 +134,35 @@ func (s *Server) RequestTxs(txIds []TxId) ([]TxBody, error) { return txs, nil } +func (s *Server) messageHandler(msg protocol.Message) error { + var err error + switch msg.Type() { + case MessageTypeReplyTxIds: + err = s.handleReplyTxIds(msg) + case MessageTypeReplyTxs: + err = s.handleReplyTxs(msg) + case MessageTypeDone: + err = s.handleDone() + case MessageTypeInit: + err = s.handleInit() + default: + err = fmt.Errorf( + "%s: received unexpected message type %d", + ProtocolName, + msg.Type(), + ) + } + return err +} + func (s *Server) handleReplyTxIds(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server reply tx ids for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("reply tx ids", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msgReplyTxIds := msg.(*MsgReplyTxIds) s.requestTxIdsResultChan <- msgReplyTxIds.TxIds return nil @@ -149,7 +170,12 @@ func (s *Server) handleReplyTxIds(msg protocol.Message) error { func (s *Server) handleReplyTxs(msg protocol.Message) error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server reply txs for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("reply txs", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) msgReplyTxs := msg.(*MsgReplyTxs) s.requestTxsResultChan <- msgReplyTxs.Txs return nil @@ -157,7 +183,12 @@ func (s *Server) handleReplyTxs(msg protocol.Message) error { func (s *Server) handleDone() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server done for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("done", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) // Restart protocol s.Protocol.Stop() s.initProtocol() @@ -169,7 +200,12 @@ func (s *Server) handleDone() error { func (s *Server) handleInit() error { s.Protocol.Logger(). - Debug(fmt.Sprintf("%s: server init for %+v", ProtocolName, s.callbackContext.ConnectionId.RemoteAddr)) + Debug("init", + "component", "network", + "protocol", ProtocolName, + "role", "server", + "connection_id", s.callbackContext.ConnectionId.String(), + ) if s.config == nil || s.config.InitFunc == nil { return fmt.Errorf( "received tx-submission Init message but no callback function is defined",