Skip to content

Add stress lock contention mode to stress testing#896

Open
markolazic01 wants to merge 4 commits into
blockblaz:mainfrom
markolazic01:test/stress-lock-contention-mode
Open

Add stress lock contention mode to stress testing#896
markolazic01 wants to merge 4 commits into
blockblaz:mainfrom
markolazic01:test/stress-lock-contention-mode

Conversation

@markolazic01
Copy link
Copy Markdown
Contributor

stress: add lock-contention mode with XMSS verify skip (#825)

Closes #825

Adds a ZEAM_STRESS_SKIP_VERIFY env variable that skips XMSS signature verification (when set to 1 or true) in the gossip-flood worker's onBlock path.

Solution details

Went with option (a) (described inside #825) due to it having less maintenance surface further on.

Changes

  • chain.zig: add skipVerify: bool to CachedProcessedBlockInfo, gate the verifySignatures / verifySignaturesParallel call on it. Defaults to false — no production caller sets it.
  • stress.zig: add readEnvBool helper, read ZEAM_STRESS_SKIP_VERIFY in StressConfig, thread it through StressCtx into the gossip-flood worker's onBlock call.
  • build.zig: add stress-locks-quick build step (30s, skip verify), wired into zig build test.

Results

Run with 60s and 6 gossip threads

Metric Default Skip verify
gossip-flood ops 962 853
borrow-readers ops 22,550 55,059
total ops/sec 756 1,370

Gossip-flood throughput drops despite less per-iteration work, confirming lock contention is now the bottleneck rather than XMSS verify. Total system lock traffic nearly doubles.

Safety

skipVerify defaults to false in CachedProcessedBlockInfo and is only set by the stress harness. Pre-import still verifies signatures to build trusted chain state.

@markolazic01
Copy link
Copy Markdown
Contributor Author

Resolved a conflict

@markolazic01
Copy link
Copy Markdown
Contributor Author

it seems workflow fail is unrelated to the changes in this PR

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.

stress: add lock-contention mode (XMSS-skipped) to surface lock-hierarchy regressions

1 participant