SDK: add HOP stress test tool#439
Open
x3c41a wants to merge 6 commits into
Open
Conversation
Stress test for the Hand-off Protocol (HOP) RPC endpoints on Bulletin Chain collators. Covers submit throughput, full cycle (submit/claim/ack), group recipients, pool fill, mixed read/write, and error handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated to match the real hop-base implementation in polkadot-sdk: - hop_submit takes (data, recipients, signature, signer) with SCALE-encoded MultiSigner/MultiSignature and domain-separated signing - hop_claim/hop_ack use domain-separated signatures (hop-claim-v1:/hop-ack-v1:) - Recipients are SCALE-encoded MultiSigner, not raw pubkeys - Updated error codes to match implementation (1001-1020) - Added --submitter-seed flag for authorized account Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrote stress test to match polkadot-sdk hop-stable branch API: - hop_submit(data, recipients, proof) — NoopVerifier, no auth needed - hop_claim(hash, signature) — direct hash signing, no domain separation - Removed hop_ack (not in hop-stable) - Updated error codes to match hop-stable Added results plot from local zombienet run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
03be857 to
a4a0aff
Compare
printPhaseStats now emits a full LatencySummary (count/min/max/mean + p50/p90/p95/p99) and appends each phase report to a global collector. A new --output-json flag dumps the collector + config to disk. Added plot-hop-results.py which reads one or more --output-json files and renders a 4-panel chart: throughput, percentile bars, per-op latency CDF (log-x), and a submit-only sweep. Re-ran against a local 2-collator zombienet on hop-stable, --items 200: submit 1 KB: 2,151 ops/s, 2.1 MB/s p50=1ms p90=1ms p95=2ms p99=8ms submit 10 KB: 1,905 ops/s, 18.6 MB/s p50=1ms p90=2ms p95=2ms p99=9ms submit 100 KB: 489 ops/s, 47.8 MB/s p50=7ms p90=8ms p95=8ms p99=15ms submit 1 MB: 53 ops/s, 52.8 MB/s p50=73ms p90=79ms p95=82ms p99=101ms group ×10 100 KB: 1,096 ops/s, 107 MB/s p50=5ms p90=8ms p95=8ms p99=9ms mixed 30s 10 KB submit: 1,025 ops/s, 10.0 MB/s p50=1ms p90=1ms p99=4ms mixed 30s 10 KB claim: 1,025 ops/s, 10.0 MB/s p50=1ms p90=3ms p99=8ms
Two-panel layout matching the Rust HOP plot: left = throughput (ops/s + MB/s), right = stacked latency where each colour band shows the additional time at the next percentile (p50 / p90-p50 / p95-p90 / p99-p95). The total p99 is annotated above each bar.
LatencySummary now reports p50 / p90 / p99 only. The plot uses the same stacked-bar style as the Rust HOP plot. Re-ran submit-only at 128/256/512 KB to fill in the curve between 100 KB and 1 MB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TypeScript HOP stress test tool exercising
hop_submit/hop_claim/hop_poolStatus. Reports p50 / p90 / p99 latency and writes a JSON results file via--output-json. See also #445 for the Rust counterpart.Results (local 2-collator zombienet, --items 200)
Usage