Skip to content

Conversation

@scharissis
Copy link
Contributor

Summary

  • fund_accounts() spawned all funding tasks concurrently with no limit, overwhelming the RPC with connections (e.g. 201 simultaneous requests with -a 125)
  • "already known" RPC errors (from txs still in the mempool from a previous run) were treated as fatal, aborting the entire setup
  • A panic occurred when the channel receiver was dropped after an early error return

Fixes:

  • Add a semaphore (FUNDING_CONCURRENCY_LIMIT = 25) to cap concurrent funding tasks
  • Handle "already known" as a warning (the tx is already pending and will be mined)
  • Replace expect() with graceful handling on channel send

Test plan

  • cargo check -p contender_cli compiles cleanly
  • cargo test -p contender_cli — 38 passed (1 pre-existing failure unrelated to this change)
  • Manual test on real devnet with -a 125 (201 accounts)

…ully

fund_accounts() spawned all funding tasks concurrently with no limit,
overwhelming the RPC with connections (201 simultaneous requests).

Additionally, "already known" errors (from txs still in the mempool
from a previous run) were treated as fatal. Now they log a warning
and continue, since the tx is already pending and will be mined.

Changes:
- add semaphore (25 concurrent tasks) to fund_accounts
- handle "already known" RPC error as a warning, not a fatal error
- replace expect() with graceful handling on channel send
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.

2 participants