Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Oct 31, 2025

Problem

  • stake-weighted sorting with some randomness was doing it backward
    • ignore randomness for now, assume rng always return 0.5
    • 2 nodes, stake=1, stake=2
    • weights = 0.5^(1/1) = 0.5
    • weights = 0.5^(1/2) = 0.707
    • node with stake 2 would come 2nd in list

Summary of Changes

  • reverse the sort comparison

Fixes #


This is an automatic backport of pull request #8787 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner October 31, 2025 13:08
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.4%. Comparing base (3454667) to head (2036d12).

Additional details and impacted files
@@           Coverage Diff           @@
##             v3.0    #8805   +/-   ##
=======================================
  Coverage    83.4%    83.4%           
=======================================
  Files         810      810           
  Lines      366213   366213           
=======================================
+ Hits       305677   305701   +24     
+ Misses      60536    60512   -24     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@t-nelson
Copy link

t-nelson commented Nov 5, 2025

out of an abundance of caution, we want to see this on testnet for a bit before accepting this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants