feat: add simulator load-test payload + fix proxy batch RPC + wire flashblocks WS#185
Draft
meyer9 wants to merge 4 commits into
Draft
feat: add simulator load-test payload + fix proxy batch RPC + wire flashblocks WS#185meyer9 wants to merge 4 commits into
meyer9 wants to merge 4 commits into
Conversation
The benchmark proxy previously rejected any request body starting with '[' (a JSON array) with HTTP 400. The base-load-tester sends transactions in batches using the standard JSON-RPC batch format, so all load-test transactions were silently dropped. Adds handleBatchRequest() which: - Detects batch requests by checking body[0] == '[' - Parses each sub-request and routes through OverrideRequest() - Returns a matching JSON array of responses This enables the load-tester's BatchRpcClient to submit transactions through the proxy at full throughput (tested at 1280 txs/block). Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Adds FlashblocksWsURL() string to the ExecutionClient interface so the load-test worker can discover the builder's flashblocks WebSocket URL without needing a direct reference to the builder client type. - builder: returns ws://localhost:<websocketPort> - geth, reth, baserethnode: return "" (no flashblocks server) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
… config The load-test worker now populates two additional fields in the YAML config it writes for the Rust binary: - flashblocks_ws: the builder's local WebSocket URL (from FlashblocksWsURL()) so the load-tester can connect to the flashblock stream - setup_rpc: the direct node RPC URL (bypassing the proxy) used during Simulator contract deployment and storage initialization Previously flashblocks_ws was missing entirely, causing the Rust binary to fail to connect; and setup transactions sent to the proxy were never mined. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Demonstrates the new simulator payload type driven through the base-load-tester binary. The Simulator contract is deployed automatically via CREATE before the benchmark starts if not already present at the expected address. Tested locally: achieves 1280 simulator run() calls per block at ~30.5M GPS with create_storage=10, create_accounts=5 per call. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Collaborator
🟡 Heimdall Review Status
|
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.
Summary
Three improvements to make the
load-testpayload type work correctly with the base-load-tester binary:eth_sendRawTransactioncalls from the load-tester with HTTP 400, silently dropping all load-test transactionsflashblocks_wsURL into load-test config — the load-tester requires aflashblocks_wsfield but the benchmark never populated it, causing connection failuressetup_rpcfor Simulator contract deployment — direct node URL so setup transactions bypass the proxy and land immediatelytype: simulatorpayload against the benchmark'sSimulator.solcontractChanges
runner/clients/common/proxy/proxy.go— batch RPC supportThe load-tester's
BatchRpcClientsends JSON arrays[{...}, {...}]per the JSON-RPC batch spec. The proxy was unmarshalling into a single struct and returningHTTP 400for all batch requests. AddedhandleBatchRequest()to parse the array and route each sub-request throughOverrideRequest(), returning a matching array of responses.Impact: without this fix, zero load-test transactions reach the sequencer despite the Rust binary appearing to submit them.
runner/clients/types/types.go+ all client implementationsAdded
FlashblocksWsURL() stringtoExecutionClientinterface:BuilderClient: returnsws://localhost:<websocketPort>(the builder's flashblocks server)GethClient,RethClient,BaseRethNodeClient: return""(no server)runner/payload/loadtest/load_test_worker.go+factory.goflashblocks_wsin the generated load-tester YAML config usingsequencerClient.FlashblocksWsURL()setup_rpcfield pointing to the direct sequencer RPC (not the proxy) so the load-tester can deploy the Simulator contract and initialize storage slots before the test runconfigs/examples/load-test-simulator.ymlExample benchmark config using
type: simulatordriven through the load-tester. Tested locally at 1280 simulatorrun()calls per block (~30.5M GPS).Local test results
Related
base/basePR: addstype: simulatorto the load-tester and auto-deploys the Simulator contract