Skip to content

updated nominator#74

Merged
johanos1 merged 4 commits intomainfrom
nominator_update
Jan 27, 2026
Merged

updated nominator#74
johanos1 merged 4 commits intomainfrom
nominator_update

Conversation

@johanos1
Copy link
Collaborator

Updated nominator and stress-tested the graph generation

- Reduce large_test accounts from 100k to 10k to speed up test suite
- Create varied degree distribution (10k total) with high-degree nodes for fan patterns
- Remove test_post_update_wraps_index which tested old sequential selection behavior
  (nominator now uses weighted random selection after recent update)
Update degree generation: P(K=k) ∝ k^(-γ) * exp(-2k/kmax)

- Add soft exponential cutoff for smoother tail truncation
- Change default kmax from n-1 to floor(√n)
- Update gamma_bounds to (0.01, 20.0) for new distribution
- Add example tables to README: gamma values, survival function P(K>k),
  and expected node counts for n=10,000
Outgoing transaction amounts were pre-computed during schedule generation
based on scheduled incoming amounts. When incoming transactions failed
(due to shared accounts being drained by other patterns), hubs would
still send the full scheduled amount, breaking the margin_ratio invariant.

Solution: Made outgoing transactions "dependent" with amount=None during
scheduling. At execution time, compute actual amount as proportion of
ACTUAL successful incoming transactions.

Key changes:
- _generate_gather_scatter stores incoming tx refs via '_incoming_refs'
- _generate_scatter_gather uses same dependent transaction pattern
- execute_alert_transactions computes amounts from successful incoming
  marked with '_success' and '_actual_amount'
- inject_illicit_funds skips dependent transactions when calculating needs

This ensures outgoing = received * (1 - margin_ratio) regardless of
which incoming transactions succeed.
@johanos1 johanos1 merged commit 6da12bf into main Jan 27, 2026
1 check passed
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.

1 participant