Skip to content

rewrite of sei-load generator and sender. - #56

Merged
pompon0 merged 50 commits into
mainfrom
gprusak-nonce-reset
Aug 13, 2026
Merged

rewrite of sei-load generator and sender.#56
pompon0 merged 50 commits into
mainfrom
gprusak-nonce-reset

Conversation

@pompon0

@pompon0 pompon0 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

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:

  • inserted (generated) transactions have expected nonces
  • transactions per account are sent sequentially (otherwise they will be rejected by autobahn)

TxsQueue is managed by ShardedSender.

Additionally

  • removed unnecessary abstractions in both sender and generator logic
  • made Generator.Run accept the sender which exposes Nonce(), Flush() and Send() calls
  • added Generator <-> Sender integration tests
  • removed open/closed loop logic (might need to be reintroduced later if needed)
  • removed utils/rng in favor of just using a single Rand synchronously (we don't have other use cases). If concurrent Rand usage is needed, a SplitRng method was introduced (slower but robust alternative to SplitMix).

@pompon0
pompon0 requested a review from bdchatham June 26, 2026 16:14
Comment thread main.go
Comment thread main.go
Comment thread generator/generator.go
Comment thread sender/sharded_sender.go
Comment thread sender/writer.go
if err != nil {
return fmt.Errorf("tx.EthTx.MarshalBinary(): %w", err)
}
txData.TxPayloads = append(txData.TxPayloads, payload)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 10fe1d9. Configure here.

Comment thread main.go
if err := funder.FundAccounts(ctx, cfg, addrs); err != nil {
return fmt.Errorf("failed to fund accounts: %w", err)
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 59dd2f4. Configure here.

Comment thread generator/generator.go
@pompon0
pompon0 enabled auto-merge (squash) August 13, 2026 14:34
@pompon0
pompon0 merged commit 890ce1e into main Aug 13, 2026
4 checks passed
@pompon0
pompon0 deleted the gprusak-nonce-reset branch August 13, 2026 14:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

Comment thread sender/eth_client.go
err, recvErr := utils.Recv(ctx, done)
if recvErr != nil {
return recvErr
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry-run nonce lookup panics

Medium Severity

Dry-run with no endpoints is allowed, but a failed send on a tracked account still calls getNonceclients[clientID]. With an empty client list that indexes clients[0] and panics instead of shutting down cleanly.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

Comment thread sender/eth_client.go
err, recvErr := utils.Recv(ctx, done)
if recvErr != nil {
return recvErr
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry-run nonce lookup panics

Medium Severity

Dry-run with no endpoints is allowed, but a failed send on a tracked account still calls getNonceclients[clientID]. With an empty client list that indexes clients[0] and panics instead of shutting down cleanly.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

Comment thread sender/eth_client.go
err, recvErr := utils.Recv(ctx, done)
if recvErr != nil {
return recvErr
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry-run nonce lookup panics

Medium Severity

Dry-run with no endpoints is allowed, but a failed send on a tracked account still calls getNonceclients[clientID]. With an empty client list that indexes clients[0] and panics instead of shutting down cleanly.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

Comment thread sender/eth_client.go
err, recvErr := utils.Recv(ctx, done)
if recvErr != nil {
return recvErr
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dry-run nonce lookup panics

Medium Severity

Dry-run with no endpoints is allowed, but a failed send on a tracked account still calls getNonceclients[clientID]. With an empty client list that indexes clients[0] and panics instead of shutting down cleanly.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2eb974a. Configure here.

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