feat(loadtest): add --send-rpc-url and --rate-limit-ramp-duration - #993
Merged
Conversation
Add a secondary RPC endpoint used exclusively to broadcast transactions (eth_sendRawTransaction, or eth_sendRawTransactionPrivate when combined with --private-txs). All other calls (gas estimation, chain ID, nonces, receipts, block polling, account funding) stay on --rpc-url. This supports private mempool endpoints that only accept eth_sendRawTransactionPrivate, and gossip-only broadcasters (e.g. light clients on the p2p network) that have no chain state. The send endpoint gets its own HTTP connection pool sized like the primary's, and falls back to the primary client when the flag is unset. Like --private-txs, the flag is limited to the modes that broadcast explicitly: transaction, blob, contract-call, and recall. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Linearly ramp the rate limit from max(1% of --rate-limit, 1 TPS) to its full value over the given duration (e.g. 3m), then hold steady. Useful for warming up a network gradually instead of starting at full load. Mutually exclusive with --adaptive-rate-limit, which controls the same limiter based on txpool feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
minhd-vu
approved these changes
Aug 20, 2026
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.
Description
Two additions to
polycli loadtest:--send-rpc-url— a secondary RPC endpoint used only to broadcast transactions (eth_sendRawTransaction, oreth_sendRawTransactionPrivatewhen combined with--private-txs). All other calls — gas estimation, chain ID, nonces, receipts, block polling, and account funding — stay on--rpc-url. This supports:eth_sendRawTransactionPrivate.The send endpoint gets its own HTTP connection pool (sized
2×concurrency, same as the primary) so broadcasts don't contend with read traffic, and falls back to the primary client when the flag is unset. Like--private-txs, it is limited to the modes that broadcast explicitly (transaction,blob,contract-call,recall) and rejected at config validation for the binding-based modes.--rate-limit-ramp-duration— linearly ramps the rate limit frommax(1% of --rate-limit, 1 TPS)up to the full--rate-limitover the given duration (e.g.3m), then holds steady. Useful for warming up a network gradually instead of starting at full load. Mutually exclusive with--adaptive-rate-limit, which controls the same limiter based on txpool feedback.No breaking changes; both flags are opt-in and default to current behavior.
Jira / Linear Tickets
Testing
make build,go vet,shadow,golangci-lint(0 issues),go test -race ./loadtest/...--send-rpc-url/--private-txsmode allowlist, URL validation, ramp duration bounds and mutual exclusion with adaptive rate limitingeth_sendRawTransactioncalls on the send endpoint and nothing else; with--private-txs, onlyeth_sendRawTransactionPrivate. Reads (gas, chain ID, nonces) all went to the primary RPC.--rate-limit 300 --rate-limit-ramp-duration 6sstarts at 3 TPS and climbs linearly (52 → 102 → 151 → 201 → 250) to 300, then the ramp goroutine exits.🤖 Generated with Claude Code