rewrite of sei-load generator and sender.#56
Conversation
PR SummaryHigh Risk Overview Sender path: Transactions stay unsigned until send; scenarios return unsigned txs and signing moves to the sender. Generator path: The Config & wiring: Reviewed by Cursor Bugbot for commit 59dd2f4. Bugbot is set up for automated code reviews on this repo. Configure here. |
| }, nil | ||
| cfg: cfg, | ||
| queue: NewTxsQueue(cfg.Settings.MaxInFlight), | ||
| limiter: limiter, |
There was a problem hiding this comment.
Buffer size no longer bounds queue
Medium Severity
NewShardedSender sizes TxsQueue only from Settings.MaxInFlight. Settings.BufferSize and LoadConfig.TotalQueueSize() are no longer used, so existing configs that tune bufferSize/--buffer-size do not limit queue depth or memory as before.
Reviewed by Cursor Bugbot for commit 34ba3fe. Configure here.
| attribute.String("chain_id", stats.ChainID), | ||
| )) | ||
| } | ||
| }*/ |
There was a problem hiding this comment.
Worker queue metric disabled
Low Severity
The worker_queue_length observable gauge callback no longer records observations: the ShardStats loop is commented out and only assigns _ = ss. Scrapers always see an empty series after the sender rewrite removed per-shard queues.
Reviewed by Cursor Bugbot for commit 34ba3fe. Configure here.
| // Start the sender (starts all workers) | ||
| s.SpawnBgNamed("sender", func() error { return sharedSender.Run(ctx) }) | ||
| log.Printf("✅ Connected to %d endpoints", len(cfg.Endpoints)) | ||
| snd = sharedSender |
There was a problem hiding this comment.
Workers setting no longer applied
Medium Severity
The send path now runs a single ShardedSender background task and no longer uses Settings.TasksPerEndpoint (workers) or LoadConfig.GetNumShards, even though those settings remain in config, CLI, and tests. Raising --workers does not increase RPC parallelism as documented.
Reviewed by Cursor Bugbot for commit a28e7c0. Configure here.
| instance.Deployed = true | ||
|
|
||
| if address.Cmp(common.Address{}) != 0 { | ||
| address := instance.Scenario.Deploy(g.config, deployer, uint64(i)) |
There was a problem hiding this comment.
Deploy nonces skip unused slots
High Severity
Sequential scenario deployment passes the scenario list index as the deployer nonce. Instances that do not broadcast a deployment transaction still advance that index, so the next contract deployment can be signed with a nonce above the account’s on-chain nonce and be rejected.
Reviewed by Cursor Bugbot for commit cce23ae. Configure here.
| if err != nil { | ||
| return fmt.Errorf("tx.EthTx.MarshalBinary(): %w", err) | ||
| } | ||
| txData.TxPayloads = append(txData.TxPayloads, payload) |
There was a problem hiding this comment.
TxsWriter emits unsigned payloads
High Severity
Transaction signing moved into ShardedSender, so generators now hand off unsigned txs. The TxsDir path uses TxsWriter, which marshals EthTx directly without signing. Written tx_payloads are therefore not valid raw transactions for later submission.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 10fe1d9. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 6 total unresolved issues (including 5 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 59dd2f4. Configure here.
| if err := funder.FundAccounts(ctx, cfg, addrs); err != nil { | ||
| return fmt.Errorf("failed to fund accounts: %w", err) | ||
| } | ||
| } |
There was a problem hiding this comment.
Funding skipped for txs-dir path
Medium Severity
Account funding now runs only in the ShardedSender branch. When TxsDir is set, FundAccounts is never called even if cfg.Funding is configured, so written txs can target unfunded accounts when replayed.
Reviewed by Cursor Bugbot for commit 59dd2f4. Configure here.


Primary reason for the rewrite is support for non-happy paths for autobahn loadtesting - rejected transactions/not successfully executed/etc. The idea is that if sending a tx fails, we need to check the account nonce before sending the next transaction. Note that this affects only accounts from the long-lived pools - accounts generated for the sake of sending just 1 transaction (aka "new accounts") do not benefit from this extra logic.
The nonces, as well as the txs waiting to be sent are managed by TxsQueue, which ensures that:
TxsQueue is managed by ShardedSender.
Additionally