Skip to content

milestones::refund_remaining_budget's dust distribution is only tested at n=3 contributors, never at the MAX_SPONSORS=20 boundary #148

Description

@chonilius

compute_split's largest-remainder dust distribution has a dedicated at-scale test in contracts/escrow/src/test.rs (test_large_split_distributes_dust_by_largest_remainder, exercising 60 recipients with a hand-computed O(n²) reference implementation cross-check). refund_remaining_budget's structurally identical dust-distribution logic (in contracts/milestones/src/lib.rs) is only exercised by test_multi_sponsor_refund_rounds_dust_by_largest_remainder in contracts/milestones/src/test.rs, which uses exactly 3 contributors — nowhere near the MAX_SPONSORS = 20 worst case, and nowhere near the scale that would meaningfully exercise the tie-breaking behavior (multiple contributors sharing an identical fractional remainder) the way the escrow-side test deliberately does. Add a milestones-side large-scale dust test mirroring escrow's, ideally at or near MAX_SPONSORS contributors with deliberately colliding remainders.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workinghelp wantedExtra attention is neededtestingTesting/QA infrastructurevery hardVery difficult task, expert-level effort required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions