SDK: multi-account pipeline submission#435
Closed
x3c41a wants to merge 6 commits into
Closed
Conversation
Add pipelineStoreMulti() that splits items across N accounts and runs one pipelineStore per account concurrently. Each account maintains its own nonce chain, eliminating single-account pool contention. - MultiAccountSigner and MultiPipelineResult types - Round-robin item distribution across accounts - Aggregated throughput and per-account result reporting - Stress test --accounts flag for N derived submitters Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite pipelineStoreMulti to use a single chainHead subscription shared across all accounts instead of N independent pipelineStore instances. The previous approach opened N chainHead subscriptions which caused WS connection overload on Versi RPC nodes. Fix authorization nonce collision in stress test: fetch authorizer nonce once and increment manually for each auth tx, instead of relying on pool-based system_accountNextIndex between 500ms delays. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pipeline now records the first-broadcast timestamp for each item and the time it appears at best/finalized blocks, exposing inclusion and finalization latency distributions (count/min/max/mean/p50/p90/p95/p99 plus the raw per-item arrays) in PipelineResult. pipeline-stress prints the percentile summary, accepts --output-json to dump the full result, and a small matplotlib script plots throughput + latency percentiles + per-item CDF from one or more JSON files.
pipelineStoreMulti now records the same first-broadcast / inclusion / finalization timestamps that pipelineStore does, on a per-account basis. Each per-account PipelineResult exposes its own inclusionLatency and finalizationLatency, and the aggregated MultiPipelineResult exposes distributions computed over the concatenated samples from every account (plus the raw arrays for plotting). Re-ran the original PR scenarios on Versi (4 RPCs, single-broadcast). 500 items × 128 KB: accts=1: 1m42s, 4.90 tx/s, 627 KB/s accts=2: 1m30s, 5.55 tx/s, 710 KB/s <- best, 13% over 1-acct accts=3: 2m02s, 4.09 tx/s, 523 KB/s accts=4: 1m37s, 5.14 tx/s, 658 KB/s 100 items × 128 KB: accts=1: 47s, 2.13 tx/s, 273 KB/s accts=2: 55s, 1.82 tx/s, 233 KB/s accts=3: 39s, 2.58 tx/s, 330 KB/s <- best accts=4: 50s, 2.01 tx/s, 257 KB/s Inclusion p50 grows roughly linearly with account count (10s → 18s → 30s → 39s at 500x128KB) because all accounts share the same block budget — multi-account is a way to split nonces, not capacity.
Two-panel layout matching #420: left = finalized throughput (tx/s + KB/s), right = stacked latency where each colour band shows the additional time at the next percentile (p50 / p90-p50 / p95-p90 / p99-p95). Defaults to finalization latency; --latency inclusion switches to broadcast-to-best-block.
Adds a smaller-payload sweep (1000 × 10 KB across 1/2/3/4 accounts) where the block has plenty of slack vs the 73 tx/block ceiling at 128 KB. Single-account already reaches ~27 tx/s and multi-account plateaus or regresses, suggesting the chain itself (block production or pool throughput) is the cap in our test environment, not nonce contention. Drops the 100 x 128 KB plot since it told the same saturation story as the 500 x 128 KB one.
Contributor
Author
|
Closing. Multi-account does not beat single-account on Versi |
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.
Multi-account does not beat single-account on Versi
Benchmark (Versi, 4 RPCs)
1000 × 10 KB (10 MB total, headroom under the 512 tx/block cap)
Single-account already reaches ~27 tx/s here, well below the 512 tx/block hard cap, which suggests pool / RPC / block-production throughput is the limit rather than nonce contention. Multi-account does not push past it.
500 × 128 KB (62.5 MB, block fully saturated at ~73 tx/block)