From bf4b8e51034e007a7f84b725d48bf721c4fbbbec Mon Sep 17 00:00:00 2001 From: Elad Gildnur Date: Tue, 10 Dec 2024 16:05:17 +0200 Subject: [PATCH] Add logs for debugging --- protocol/parser/parser.go | 2 ++ protocol/rpcconsumer/rpcconsumer_server.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/protocol/parser/parser.go b/protocol/parser/parser.go index 196fdc5f6c..884bccaadb 100644 --- a/protocol/parser/parser.go +++ b/protocol/parser/parser.go @@ -180,12 +180,14 @@ func parseBlock(rpcInput RPCInput, blockParser spectypes.BlockParser, genericPar func ParseBlockFromParams(rpcInput RPCInput, blockParser spectypes.BlockParser, genericParsers []spectypes.GenericParser) *ParsedInput { parsedInput := parseBlock(rpcInput, blockParser, genericParsers, PARSE_PARAMS) ParseRawBlock(rpcInput, parsedInput, blockParser.DefaultValue) + utils.LavaFormatTrace("ParseBlockFromParams result", utils.LogAttr("parsedInput", parsedInput)) return parsedInput } func ParseBlockFromReply(rpcInput RPCInput, blockParser spectypes.BlockParser, genericParsers []spectypes.GenericParser) *ParsedInput { parsedInput := parseBlock(rpcInput, blockParser, genericParsers, PARSE_RESULT) ParseRawBlock(rpcInput, parsedInput, blockParser.DefaultValue) + utils.LavaFormatTrace("ParseBlockFromReply result", utils.LogAttr("parsedInput", parsedInput)) return parsedInput } diff --git a/protocol/rpcconsumer/rpcconsumer_server.go b/protocol/rpcconsumer/rpcconsumer_server.go index a774f0e1da..5204d4adce 100644 --- a/protocol/rpcconsumer/rpcconsumer_server.go +++ b/protocol/rpcconsumer/rpcconsumer_server.go @@ -973,6 +973,10 @@ func (rpccs *RPCConsumerServer) relayInner(ctx context.Context, singleConsumerSe utils.LavaFormatTrace("Sending relay to provider", utils.LogAttr("GUID", ctx), utils.LogAttr("lbUniqueId", singleConsumerSession.EndpointConnection.GetLbUniqueId()), + utils.LogAttr("providerAddress", providerPublicAddress), + utils.LogAttr("requestBlock", relayResult.Request.RelayData.RequestBlock), + utils.LogAttr("seenBlock", relayResult.Request.RelayData.SeenBlock), + utils.LogAttr("extensions", relayResult.Request.RelayData.Extensions), ) connectCtx = metadata.NewOutgoingContext(connectCtx, metadataAdd) defer connectCtxCancel()