diff --git a/protocol/lavaprotocol/finalizationconsensus/finalization_consensus_test.go b/protocol/lavaprotocol/finalizationconsensus/finalization_consensus_test.go index 194265384c..9f2b1dbf48 100644 --- a/protocol/lavaprotocol/finalizationconsensus/finalization_consensus_test.go +++ b/protocol/lavaprotocol/finalizationconsensus/finalization_consensus_test.go @@ -282,7 +282,7 @@ func TestQoS(t *testing.T) { currentLatency := time.Millisecond expectedLatency := time.Millisecond latestServicedBlock := expectedBH - singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1) + singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1, false) require.Equal(t, uint64(1), singleConsumerSession.QoSInfo.AnsweredRelays) require.Equal(t, uint64(1), singleConsumerSession.QoSInfo.TotalRelays) require.Equal(t, int64(1), singleConsumerSession.QoSInfo.SyncScoreSum) @@ -292,7 +292,7 @@ func TestQoS(t *testing.T) { require.Equal(t, sdk.OneDec(), singleConsumerSession.QoSInfo.LastQoSReport.Latency) latestServicedBlock = expectedBH + 1 - singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1) + singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1, false) require.Equal(t, uint64(2), singleConsumerSession.QoSInfo.AnsweredRelays) require.Equal(t, uint64(2), singleConsumerSession.QoSInfo.TotalRelays) require.Equal(t, int64(2), singleConsumerSession.QoSInfo.SyncScoreSum) @@ -302,7 +302,7 @@ func TestQoS(t *testing.T) { require.Equal(t, sdk.OneDec(), singleConsumerSession.QoSInfo.LastQoSReport.Latency) singleConsumerSession.QoSInfo.TotalRelays++ // this is how we add a failure - singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1) + singleConsumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, 1, false) require.Equal(t, uint64(3), singleConsumerSession.QoSInfo.AnsweredRelays) require.Equal(t, uint64(4), singleConsumerSession.QoSInfo.TotalRelays) require.Equal(t, int64(3), singleConsumerSession.QoSInfo.SyncScoreSum) @@ -313,7 +313,7 @@ func TestQoS(t *testing.T) { require.Equal(t, sdk.OneDec(), singleConsumerSession.QoSInfo.LastQoSReport.Latency) latestServicedBlock = expectedBH - 1 // is one block below threshold - singleConsumerSession.CalculateQoS(currentLatency, expectedLatency*2, expectedBH-latestServicedBlock, numOfProviders, 1) + singleConsumerSession.CalculateQoS(currentLatency, expectedLatency*2, expectedBH-latestServicedBlock, numOfProviders, 1, false) require.Equal(t, uint64(4), singleConsumerSession.QoSInfo.AnsweredRelays) require.Equal(t, uint64(5), singleConsumerSession.QoSInfo.TotalRelays) require.Equal(t, int64(3), singleConsumerSession.QoSInfo.SyncScoreSum) @@ -325,7 +325,7 @@ func TestQoS(t *testing.T) { latestServicedBlock = expectedBH + 1 // add in a loop so availability goes above 95% for i := 5; i < 100; i++ { - singleConsumerSession.CalculateQoS(currentLatency, expectedLatency*2, expectedBH-latestServicedBlock, numOfProviders, 1) + singleConsumerSession.CalculateQoS(currentLatency, expectedLatency*2, expectedBH-latestServicedBlock, numOfProviders, 1, false) } require.Equal(t, sdk.MustNewDecFromStr("0.8"), singleConsumerSession.QoSInfo.LastQoSReport.Availability) // because availability below 95% is 0 require.Equal(t, sdk.MustNewDecFromStr("0.989898989898989898"), singleConsumerSession.QoSInfo.LastQoSReport.Sync) diff --git a/protocol/lavasession/consumer_session_manager.go b/protocol/lavasession/consumer_session_manager.go index 53f6531900..c54341a8c8 100644 --- a/protocol/lavasession/consumer_session_manager.go +++ b/protocol/lavasession/consumer_session_manager.go @@ -1024,6 +1024,7 @@ func (csm *ConsumerSessionManager) OnSessionDone( providersCount uint64, isHangingApi bool, extensions []*spectypes.Extension, + reduceAvailability bool, ) error { // release locks, update CU, relaynum etc.. if err := consumerSession.VerifyLock(); err != nil { @@ -1046,7 +1047,7 @@ func (csm *ConsumerSessionManager) OnSessionDone( consumerSession.ConsecutiveErrors = []error{} consumerSession.LatestBlock = latestServicedBlock // update latest serviced block // calculate QoS - consumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, int64(providersCount)) + consumerSession.CalculateQoS(currentLatency, expectedLatency, expectedBH-latestServicedBlock, numOfProviders, int64(providersCount), reduceAvailability) go csm.providerOptimizer.AppendRelayData(consumerSession.Parent.PublicLavaAddress, currentLatency, isHangingApi, specComputeUnits, uint64(latestServicedBlock)) csm.updateMetricsManager(consumerSession, currentLatency, !isHangingApi) // apply latency only for non hanging apis return nil diff --git a/protocol/lavasession/consumer_session_manager_test.go b/protocol/lavasession/consumer_session_manager_test.go index c92ead202d..2c8cdcad01 100644 --- a/protocol/lavasession/consumer_session_manager_test.go +++ b/protocol/lavasession/consumer_session_manager_test.go @@ -83,7 +83,7 @@ func TestHappyFlow(t *testing.T) { require.NotNil(t, cs) require.Equal(t, cs.Epoch, csm.currentEpoch) require.Equal(t, cs.Session.LatestRelayCu, cuForFirstRequest) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, cuForFirstRequest) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) @@ -416,7 +416,7 @@ func runOnSessionDoneForConsumerSessionMap(t *testing.T, css ConsumerSessionsMap require.NotNil(t, cs) require.Equal(t, cs.Epoch, csm.currentEpoch) require.Equal(t, cs.Session.LatestRelayCu, cuForFirstRequest) - err := csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err := csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, cuForFirstRequest) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) @@ -448,7 +448,7 @@ func TestHappyFlowVirtualEpoch(t *testing.T) { require.NotNil(t, cs) require.Equal(t, cs.Epoch, csm.currentEpoch) require.Equal(t, cs.Session.LatestRelayCu, maxCuForVirtualEpoch*(virtualEpoch+1)) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, maxCuForVirtualEpoch*(virtualEpoch+1), time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, maxCuForVirtualEpoch*(virtualEpoch+1), time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, maxCuForVirtualEpoch*(virtualEpoch+1)) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) @@ -484,7 +484,7 @@ func TestPairingReset(t *testing.T) { require.NotNil(t, cs) require.Equal(t, cs.Epoch, csm.currentEpoch) require.Equal(t, cs.Session.LatestRelayCu, cuForFirstRequest) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, cuForFirstRequest) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) @@ -573,7 +573,7 @@ func TestPairingResetWithMultipleFailures(t *testing.T) { require.NotNil(t, cs) require.Equal(t, cs.Epoch, csm.currentEpoch) require.Equal(t, cs.Session.LatestRelayCu, cuForFirstRequest) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, cuForFirstRequest) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) @@ -619,7 +619,7 @@ func TestSuccessAndFailureOfSessionWithUpdatePairingsInTheMiddle(t *testing.T) { require.Equal(t, epoch, csm.currentEpoch) if rand.Intn(2) > 0 { - err = csm.OnSessionDone(cs, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, cs.CuSum, cuForFirstRequest) require.Equal(t, cs.LatestRelayCu, latestRelayCuAfterDone) @@ -653,7 +653,7 @@ func TestSuccessAndFailureOfSessionWithUpdatePairingsInTheMiddle(t *testing.T) { for j := numberOfAllowedSessionsPerConsumer / 2; j < numberOfAllowedSessionsPerConsumer; j++ { cs := sessionList[j].cs if rand.Intn(2) > 0 { - err = csm.OnSessionDone(cs, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) require.Equal(t, sessionListData[j].cuSum+cuForFirstRequest, cs.CuSum) require.Equal(t, cs.LatestRelayCu, latestRelayCuAfterDone) @@ -676,7 +676,7 @@ func successfulSession(ctx context.Context, csm *ConsumerSessionManager, t *test for _, cs := range css { require.NotNil(t, cs) time.Sleep(time.Duration((rand.Intn(500) + 1)) * time.Millisecond) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) ch <- p } @@ -957,7 +957,7 @@ func TestPairingWithAddons(t *testing.T) { css, err := csm.GetSessions(ctx, cuForFirstRequest, NewUsedProviders(nil), servicedBlockNumber, addon, nil, common.NO_STATE, 0) // get a session require.NoError(t, err) for _, cs := range css { - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) } }) @@ -1032,7 +1032,7 @@ func TestPairingWithExtensions(t *testing.T) { css, err := csm.GetSessions(ctx, cuForFirstRequest, NewUsedProviders(nil), servicedBlockNumber, extensionOpt.addon, extensionsList, common.NO_STATE, 0) // get a session require.NoError(t, err) for _, cs := range css { - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) } }) @@ -1068,7 +1068,7 @@ func TestPairingWithStateful(t *testing.T) { require.NoError(t, err) require.Equal(t, allProviders, len(css)) for _, cs := range css { - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), numberOfProviders, numberOfProviders, false, nil, false) require.NoError(t, err) } usedProviders := NewUsedProviders(nil) diff --git a/protocol/lavasession/end_to_end_lavasession_test.go b/protocol/lavasession/end_to_end_lavasession_test.go index 6fc7cfc82e..d889e111c8 100644 --- a/protocol/lavasession/end_to_end_lavasession_test.go +++ b/protocol/lavasession/end_to_end_lavasession_test.go @@ -72,7 +72,7 @@ func TestHappyFlowE2EEmergency(t *testing.T) { err = psm.OnSessionDone(sps, cs.Session.RelayNum-skippedRelays) require.NoError(t, err) - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, maxCuForVirtualEpoch, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), 1, 1, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, maxCuForVirtualEpoch, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), 1, 1, false, nil, false) require.NoError(t, err) } @@ -195,7 +195,7 @@ func prepareSessionsWithFirstRelay(t *testing.T, cuForFirstRequest uint64) (*Con require.NoError(t, err) // Consumer Side: - err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), 1, 1, false, nil) + err = csm.OnSessionDone(cs.Session, servicedBlockNumber, cuForFirstRequest, time.Millisecond, cs.Session.CalculateExpectedLatency(2*time.Millisecond), (servicedBlockNumber - 1), 1, 1, false, nil, false) require.NoError(t, err) require.Equal(t, cs.Session.CuSum, cuForFirstRequest) require.Equal(t, cs.Session.LatestRelayCu, latestRelayCuAfterDone) diff --git a/protocol/lavasession/single_consumer_session.go b/protocol/lavasession/single_consumer_session.go index dfea92c4ce..b81e18fd0e 100644 --- a/protocol/lavasession/single_consumer_session.go +++ b/protocol/lavasession/single_consumer_session.go @@ -49,10 +49,12 @@ func (cs *SingleConsumerSession) getQosComputedResultOrZero() sdk.Dec { return sdk.ZeroDec() } -func (cs *SingleConsumerSession) CalculateQoS(latency, expectedLatency time.Duration, blockHeightDiff int64, numOfProviders int, servicersToCount int64) { +func (cs *SingleConsumerSession) CalculateQoS(latency, expectedLatency time.Duration, blockHeightDiff int64, numOfProviders int, servicersToCount int64, reduceAvailability bool) { // Add current Session QoS - cs.QoSInfo.TotalRelays++ // increase total relays - cs.QoSInfo.AnsweredRelays++ // increase answered relays + cs.QoSInfo.TotalRelays++ // increase total relays + if !reduceAvailability { // incase we want to reduce availability to this provider due to some reason we skip answered. + cs.QoSInfo.AnsweredRelays++ // increase answered relays + } if cs.QoSInfo.LastQoSReport == nil { cs.QoSInfo.LastQoSReport = &pairingtypes.QualityOfServiceReport{} diff --git a/protocol/rpcconsumer/consumer_relay_state_machine.go b/protocol/rpcconsumer/consumer_relay_state_machine.go index b45e82a502..9aa3583c0f 100644 --- a/protocol/rpcconsumer/consumer_relay_state_machine.go +++ b/protocol/rpcconsumer/consumer_relay_state_machine.go @@ -6,6 +6,7 @@ import ( "sync/atomic" "time" + "github.com/lavanet/lava/v4/protocol/chainlib/extensionslib" pairingtypes "github.com/lavanet/lava/v4/x/pairing/types" "github.com/lavanet/lava/v4/protocol/chainlib" @@ -44,6 +45,7 @@ type ConsumerRelaySender interface { consumerIp string, metadata []pairingtypes.Metadata, ) (protocolMessage chainlib.ProtocolMessage, err error) + GetExtensionParser() *extensionslib.ExtensionParser } type tickerMetricSetterInf interface { @@ -192,7 +194,8 @@ func (crsm *ConsumerRelayStateMachine) GetRelayTaskChannel() (chan RelayStateSen go func() { // A channel to be notified processing was done, true means we have results and can return gotResults := make(chan bool, 1) - processingTimeout, relayTimeout := crsm.relaySender.getProcessingTimeout(crsm.GetProtocolMessage()) + protocolMessage := crsm.GetProtocolMessage() + processingTimeout, relayTimeout := crsm.relaySender.getProcessingTimeout(protocolMessage) if crsm.debugRelays { utils.LavaFormatDebug("Relay initiated with the following timeout schedule", utils.LogAttr("processingTimeout", processingTimeout), utils.LogAttr("newRelayTimeout", relayTimeout)) } diff --git a/protocol/rpcconsumer/consumer_relay_state_machine_test.go b/protocol/rpcconsumer/consumer_relay_state_machine_test.go index a6804c56fc..936e422d57 100644 --- a/protocol/rpcconsumer/consumer_relay_state_machine_test.go +++ b/protocol/rpcconsumer/consumer_relay_state_machine_test.go @@ -15,6 +15,7 @@ import ( common "github.com/lavanet/lava/v4/protocol/common" "github.com/lavanet/lava/v4/protocol/lavaprotocol" lavasession "github.com/lavanet/lava/v4/protocol/lavasession" + "github.com/lavanet/lava/v4/protocol/metrics" "github.com/lavanet/lava/v4/utils" "github.com/lavanet/lava/v4/utils/lavaslices" epochstoragetypes "github.com/lavanet/lava/v4/x/epochstorage/types" @@ -46,6 +47,14 @@ type ConsumerRelaySenderMock struct { tickerValue time.Duration } +func (crsm *ConsumerRelaySenderMock) GetExtensionParser() *extensionslib.ExtensionParser { + return nil +} + +func (crsm *ConsumerRelaySenderMock) sendRelayToProvider(ctx context.Context, protocolMessage chainlib.ProtocolMessage, relayProcessor *RelayProcessor, analytics *metrics.RelayMetrics) (errRet error) { + return crsm.retValue +} + func (crsm *ConsumerRelaySenderMock) getProcessingTimeout(chainMessage chainlib.ChainMessage) (processingTimeout time.Duration, relayTimeout time.Duration) { if crsm.tickerValue != 0 { return time.Second * 50000, crsm.tickerValue diff --git a/protocol/rpcconsumer/rpcconsumer_server.go b/protocol/rpcconsumer/rpcconsumer_server.go index a774f0e1da..74bd57a473 100644 --- a/protocol/rpcconsumer/rpcconsumer_server.go +++ b/protocol/rpcconsumer/rpcconsumer_server.go @@ -579,6 +579,10 @@ func (rpccs *RPCConsumerServer) newBlocksHashesToHeightsSliceFromFinalizationCon return blocksHashesToHeights } +func (rpccs *RPCConsumerServer) GetExtensionParser() *extensionslib.ExtensionParser { + return rpccs.chainParser.ExtensionsParser() +} + func (rpccs *RPCConsumerServer) sendRelayToProvider( ctx context.Context, relayState *RelayState, @@ -874,8 +878,13 @@ func (rpccs *RPCConsumerServer) sendRelayToProvider( ) } - errResponse = rpccs.consumerSessionManager.OnSessionDone(singleConsumerSession, latestBlock, chainlib.GetComputeUnits(protocolMessage), relayLatency, singleConsumerSession.CalculateExpectedLatency(expectedRelayTimeoutForQOS), expectedBH, numOfProviders, pairingAddressesLen, protocolMessage.GetApi().Category.HangingApi, extensions) // session done successfully isNodeError, _ := protocolMessage.CheckResponseError(localRelayResult.Reply.Data, localRelayResult.StatusCode) + reduceAvailability := false + if isNodeError && (chainId == "NEAR" || chainId == "NEART") { + // validate nodeError is matching our expectations for reducing availability. + reduceAvailability = strings.Contains(string(localRelayResult.Reply.Data), "The node does not track the shard ID") + } + errResponse = rpccs.consumerSessionManager.OnSessionDone(singleConsumerSession, latestBlock, chainlib.GetComputeUnits(protocolMessage), relayLatency, singleConsumerSession.CalculateExpectedLatency(expectedRelayTimeoutForQOS), expectedBH, numOfProviders, pairingAddressesLen, protocolMessage.GetApi().Category.HangingApi, extensions, reduceAvailability) // session done successfully localRelayResult.IsNodeError = isNodeError if rpccs.debugRelays { utils.LavaFormatDebug("Result Code", utils.LogAttr("isNodeError", isNodeError), utils.LogAttr("StatusCode", localRelayResult.StatusCode))