Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated nominator and stress-tested the graph generation