-
Notifications
You must be signed in to change notification settings - Fork 45
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Sometimes we just want to spam an RPC method, not necessarily transactions.
Describe the solution you'd like
add a new command to the CLI: contender rpc
- take three args:
requests_per_second(optional; default1),duration(optional; default1), and a subcommand (the RPC method)- send these requests using the same core technique as
Spammerbut don't use the actual spammer -- it's purpose-built for transactions. - All we need is a scheduled loop.
- send these requests using the same core technique as
- enumerate all of these RPC methods in subcommands, so that we can use strongly-typed, serde'd inputs for the params of each method
- a macro might be appropriate here
Each param in the JSON-RPC method call becomes a flag if optional, or a positional arg if not.
For example, the call to eth_sendTransaction only requires from, to, and input.
This call:
params: [
{
from: "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
to: "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
gas: "0x76c0", // 30400
input:
"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
},
]would be represented as follows:
# contender rpc <CONTENDER_ARGS...> eth_sendTransaction <FROM> <TO> <INPUT> [--gas | --gas-price | --value | --nonce]...
contender rpc --rps 100 -d 10 eth_sendTransaction \
0xb60e8dd61c5d32be8058bb8eb970870f07233155 # FROM \
0xd46e8dd67c5d32be8058bb8eb970870f07244567 # TO \
0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675 #INPUT \
--gas 30400Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request