Skip to content

fix: treat nodeErrors as valid response#2110

Merged
nimrod-teich merged 24 commits into
mainfrom
nodeErrors-in-quorum
Dec 10, 2025
Merged

fix: treat nodeErrors as valid response#2110
nimrod-teich merged 24 commits into
mainfrom
nodeErrors-in-quorum

Conversation

@Tomelia1999

Copy link
Copy Markdown
Contributor

Description

Closes: #XXXX


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • read the contribution guide
  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the main branch
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@Tomelia1999 Tomelia1999 changed the title taking nodeErrors into accouts - still prioritizing successResultsCount fix: include nodeErrors as valid response Nov 23, 2025
@Tomelia1999 Tomelia1999 changed the title fix: include nodeErrors as valid response fix: treat nodeErrors as valid response Nov 23, 2025
@github-actions

github-actions Bot commented Nov 23, 2025

Copy link
Copy Markdown

Test Results

    6 files   -  1    130 suites   - 1   24m 10s ⏱️ - 9m 47s
3 171 tests +23  3 170 ✅ +23  1 💤 ±0  0 ❌ ±0 
3 251 runs  +23  3 250 ✅ +23  1 💤 ±0  0 ❌ ±0 

Results for commit ff129aa. ± Comparison against base commit 4ee4fa7.

This pull request removes 1 and adds 24 tests. Note that renamed tests count towards both.
github.com/lavanet/lava/v5/testutil/e2e ‑ TestLavaProtocol
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize/Quorum_Disabled_-_Returns_Min
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize/Quorum_Disabled_-_Zero_Responses
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize/Quorum_Enabled_-_High_Response_Count
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize/Quorum_Enabled_-_Multiple_Responses
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestGetRequiredQuorumSize/Quorum_Enabled_-_Single_Response
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestNodeErrorPrioritizedOverProtocolErrors
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestNodeErrorPrioritizedOverProtocolErrors/node_error_prioritized_over_protocol_errors
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestNodeErrorPrioritizedOverProtocolErrors/node_error_prioritized_over_protocol_errors_with_quorum_selection
github.com/lavanet/lava/v5/protocol/relaycore ‑ TestNodeErrorQuorumMet
…

♻️ This comment has been updated with latest results.

Comment thread protocol/relaycore/relay_processor.go Outdated
// When quorum is enabled, we need to ensure we have enough successful responses
// to actually meet quorum requirements, not just enough total attempts
if rp.quorumParams.Enabled() && successResultsCount < rp.quorumParams.Min {
if rp.quorumParams.Enabled() && successResultsCount < rp.quorumParams.Min && nodeErrorCount < rp.quorumParams.Min {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be reverted if we decide to not add support for nodeErrors in the quorum feature

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Line 639 we should add logging i.e.

if nodeErrorErr == nil {
utils.LavaFormatInfo("Using node error quorum as fallback (success responses didn't match)",
utils.LogAttr("successCount", successResultsCount),
utils.LogAttr("nodeErrorCount", nodeErrorCount))
return nodeErrorResult, nil
}

@nimrod-teich nimrod-teich merged commit 71df0e1 into main Dec 10, 2025
46 of 48 checks passed
@nimrod-teich nimrod-teich deleted the nodeErrors-in-quorum branch December 10, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants