Skip to content

test: refactor n_tps to use WorkerWallet#22757

Merged
alexghr merged 1 commit intomerge-train/spartanfrom
benchmark/pr2-n-tps-worker-wallet
Apr 24, 2026
Merged

test: refactor n_tps to use WorkerWallet#22757
alexghr merged 1 commit intomerge-train/spartanfrom
benchmark/pr2-n-tps-worker-wallet

Conversation

@alexghr
Copy link
Copy Markdown
Contributor

@alexghr alexghr commented Apr 24, 2026

Related to A-943

  1. use worker wallet
  2. handle anchor blocks going away and recreate tx
  3. handle txs mining in "the past" (ie mined in block at index > 0 in a slot)
  4. bump fees

// chain reorgs past that block — or on very long runs the header ages out of
// WS_NUM_HISTORIC_BLOCKS — the node rejects clones with `Block header not found`.
// Detect this on send, invalidate the cached prototype, and retry once.
const STALE_ANCHOR_MESSAGE = 'Block header not found';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If the anchor block we used to simulate the prototype tx (in the case of REAL_VERIFIER=0) reorgs out then all txs get rejected. This function aims to detect that and re-create the prototype tx

Comment on lines +241 to +246
const delta = tx.minedAt - tx.sentAt;
if (delta <= 0) {
nonPositive++;
continue;
}
histogram.record(delta);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we hit this issue when txs mine in one of the extra blocks in a slot.

@alexghr alexghr marked this pull request as ready for review April 24, 2026 10:03
@alexghr alexghr merged commit c4802d9 into merge-train/spartan Apr 24, 2026
21 checks passed
@alexghr alexghr deleted the benchmark/pr2-n-tps-worker-wallet branch April 24, 2026 12:27
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