Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: PRT - Add logs for debugging #1830

Merged
merged 1 commit into from
Dec 12, 2024
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
2 changes: 2 additions & 0 deletions protocol/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 4 additions & 0 deletions protocol/rpcconsumer/rpcconsumer_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading