11# Task Sender
2+
23This CLI is made to stress-test the network.
34
45It has the following commands:
@@ -8,21 +9,25 @@ It has the following commands:
89This command is to generate N Groth16 proofs.
910
1011To run it, you can:
12+
1113``` bash
1214cargo run --release -- generate-proofs \
1315 --number-of-proofs < NUMBER_OF_PROOFS> --proof-type groth16 \
1416 --dir-to-save-proofs $( PWD) /scripts/test_files/task_sender/proofs
1517```
1618
1719We also have a make target:
20+
1821``` bash
1922NUMBER_OF_PROOFS=15 make task_sender_generate_groth16_proofs
2023```
24+
2125## GenerateAndFundWallets
2226
2327This command is to generate N wallets, and fund them in the BatcherPaymentService.
2428
2529To run it, you can:
30+
2631``` bash
2732cargo run --release -- generate-and-fund-wallets \
2833 --eth-rpc-url < RPC_URL> \
@@ -35,17 +40,20 @@ cargo run --release -- generate-and-fund-wallets \
3540```
3641
3742### In Testnet
43+
3844``` bash
3945NUM_WALLETS=< N> make task_sender_generate_and_fund_wallets_holesky_stage
4046```
4147
4248### In Devnet:
4349Run anvil with more prefunded accounts, using the following make target:
50+
4451``` bash
4552make anvil_start_with_more_prefunded_accounts
4653```
4754
4855Then run the following make target, with ` NUM_WALLETS ` being the amount of wallets you want to deposit funds to aligned payment service, up to 1000.
56+
4957``` bash
5058NUM_WALLETS=< N> make task_sender_generate_and_fund_wallets_devnet
5159```
@@ -56,20 +64,55 @@ This command sends `BURST_SIZE` proofs from each private key in `PATH_TO_PRIVATE
5664
5765To vary the amount of senders, it is recommended to have a backup with all private keys, and add/remove keys from the file being used.
5866
59- To run it, you can:
67+ Note: The ` --random-address ` flag is optional and will use the address a salt to avoid the repetitions of batches.
68+
69+ ### RISC Zero Proofs
70+
6071``` bash
6172cargo run --release -- send-infinite-proofs \
62- --burst-size < BURST_SIZE> --burst-time-secs < BURST_TIME_SECS> \
63- --eth-rpc-url < RPC_URL> \
64- --network < network> \
65- --proofs-dirpath $( PWD) /scripts/test_files/task_sender/proofs \
66- --private-keys-filepath < PATH_TO_PRIVATE_KEYS_FILE>
73+ --private-keys-filepath < PATH_TO_PRIVATE_KEYS_FILE> \
74+ --random-address \
75+ --burst-size < BURST_SIZE> \
76+ --burst-time-secs < BURST_TIME_SECS> \
77+ --network < NETWORK> \
78+ risc0 \
79+ --proof-path ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_2_0.proof \
80+ --bin-path ./scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_2_2_0.bin \
81+ --pub-path ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_2_0.pub
82+ ```
83+
84+ ### Gnark Groth16 Proofs
85+
86+ ``` bash
87+ cargo run --release -- send-infinite-proofs \
88+ --private-keys-filepath < PATH_TO_PRIVATE_KEYS_FILE> \
89+ --random-address \
90+ --burst-size < BURST_SIZE> \
91+ --burst-time-secs < BURST_TIME_SECS> \
92+ --network < NETWORK> \
93+ gnark-groth16 --proofs-dir ./scripts/test_files/gnark_groth16_bn254_script
94+ ```
95+
96+ ### SP1 Proofs
97+
98+ ``` bash
99+ cargo run --release --manifest-path ./crates/task-sender/Cargo.toml -- send-infinite-proofs \
100+ --private-keys-filepath < PATH_TO_PRIVATE_KEYS_FILE> \
101+ --burst-size < BURST_SIZE> \
102+ --burst-time-secs < BURST_TIME_SECS> \
103+ --random-address \
104+ sp1 \
105+ --proof-path ./scripts/test_files/sp1/sp1_fibonacci_5_0_0.proof \
106+ --elf-path ./scripts/test_files/sp1/sp1_fibonacci_5_0_0.elf \
107+ --pub-path ./scripts/test_files/sp1/sp1_fibonacci_5_0_0.pub
67108```
68109
69- We also have the following related make targets
110+ We also have the following related make targets:
111+
70112``` bash
71113BURST_SIZE=< N> BURST_TIME_SECS=< N> make task_sender_send_infinite_proofs_devnet
72114```
115+
73116``` bash
74117BURST_SIZE=< N> BURST_TIME_SECS=< N> make task_sender_send_infinite_proofs_holesky_stage
75118```
@@ -79,15 +122,18 @@ BURST_SIZE=<N> BURST_TIME_SECS=<N> make task_sender_send_infinite_proofs_holesky
79122This command enables and hangs N connections with the Batcher.
80123
81124To run it, you can:
82- ```
83- cargo run --release -- test-connections \
125+
126+ ``` bash
127+ cargo run --release --manifest-path ./crates/task-sender/Cargo.toml -- test-connections \
84128 --num-senders < NUM_SENDERS>
85129```
86130
87131We also have the following related make targets:
132+
88133``` bash
89134NUM_SENDERS=< N> make task_sender_test_connections_devnet
90135```
136+
91137``` bash
92138NUM_SENDERS=< N> make task_sender_test_connections_holesky_stage
93139```
0 commit comments