bench/rpc/cmd/corpus-gen covers the read and trace APIs but not the execution methods (see bench/rpc/README.md). Add estimateFee, simulateTransactions and call subcommands so the k6 harness can benchmark them.
Idea
Sample a block N, then use real transactions from block N+1 as the request payload against block_id = N:
estimateFee / simulateTransactions: request / transactions = a prefix of block N+1's transactions (a contiguous prefix keeps nonces valid and signatures verifiable, so SKIP_VALIDATE is not required). Both take the same broadcasted-transaction list, so they should share one sampler.
call: derive a FUNCTION_CALL from an invoke transaction in block N+1.
Notes for the implementer
- v0_10
BroadcastedTransaction only accepts version 0x3. L1_HANDLER cannot be broadcast. DECLARE needs the full contract_class instead of class_hash. transaction_hash should be stripped.
--block-end must be capped at latest−1 so N+1 exists.
run.js counts JSON-RPC errors as failures, so requests that revert or fail estimation degrade the benchmark. Consider how to keep the corpus clean.
Follow the existing sampler pattern (newSampledCmd, blockRangeFlags, --batch) and update README.md and corpus/all.json.
bench/rpc/cmd/corpus-gencovers the read and trace APIs but not the execution methods (seebench/rpc/README.md). AddestimateFee,simulateTransactionsandcallsubcommands so the k6 harness can benchmark them.Idea
Sample a block N, then use real transactions from block N+1 as the request payload against
block_id= N:estimateFee/simulateTransactions:request/transactions= a prefix of block N+1's transactions (a contiguous prefix keeps nonces valid and signatures verifiable, soSKIP_VALIDATEis not required). Both take the same broadcasted-transaction list, so they should share one sampler.call: derive aFUNCTION_CALLfrom an invoke transaction in block N+1.Notes for the implementer
BroadcastedTransactiononly acceptsversion0x3.L1_HANDLERcannot be broadcast.DECLAREneeds the fullcontract_classinstead ofclass_hash.transaction_hashshould be stripped.--block-endmust be capped at latest−1 so N+1 exists.run.jscounts JSON-RPC errors as failures, so requests that revert or fail estimation degrade the benchmark. Consider how to keep the corpus clean.Follow the existing sampler pattern (
newSampledCmd,blockRangeFlags,--batch) and updateREADME.mdandcorpus/all.json.