-
Notifications
You must be signed in to change notification settings - Fork 391
feat(testing): Task Sender / Stress Tester. #1162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| func GenerateIneqProof(x int) { | ||
| outputDir := "scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/" | ||
| outputDir := "../../scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be a parameter.
|
|
||
| let chain_id = get_chain_id(&args.eth_rpc_url).await.map_err(|e| { | ||
| SubmitError::GenericError(format!( | ||
| "Failed to retrieve chain id, verify `eth_rpc_url` is cor/rect or local testnet is running on \"http://localhost:8545\": {}", e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "Failed to retrieve chain id, verify `eth_rpc_url` is cor/rect or local testnet is running on \"http://localhost:8545\": {}", e | |
| "Failed to retrieve chain id, verify `eth_rpc_url` is correct or local testnet is running on \"http://localhost:8545\": {}", e |
| for t in threads { | ||
| if let Err(e) = t.join() { | ||
| error!("Thread panicked: {:?}", e); | ||
| return Ok(()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: don't return, just report the panic and wait for the other tasks.
| ); | ||
| let nonce = nonce.fetch_add(burst_size as u64, Ordering::Relaxed); | ||
| let batcher_url = batcher_url.clone(); | ||
| let wallet = wallet.clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if each thread could use a unique wallet. Using the same one might force serialization in the batcher if it represents the same operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this we would need to programmatically create and fund accounts on anvil for each wallet. This is possible using via two methods:
- The task sender initiates anvil with
num_sendersaccounts pre-funded and extract the private keys and addresses. - Each thread generates an address and private key pair then calls
anvil_setBalancehttps://book.getfoundry.sh/reference/anvil/ .
Co-authored-by: Mauro Toscano <[email protected]>
Co-authored-by: Urix <[email protected]>
Co-authored-by: Urix <[email protected]>
Co-authored-by: Urix <[email protected]>
Co-authored-by: Avila Gastón <[email protected]> Co-authored-by: Julian Ventura <[email protected]> Co-authored-by: Julian Ventura <[email protected]> Co-authored-by: avilagaston9 <[email protected]> Co-authored-by: Urix <[email protected]>
…sages. (#1121) Co-authored-by: Julian Ventura <[email protected]>
|
Closing this one in favour of #1189 |
Closes #1113 and Closes #1015 .
Adds a task sender based on the previous make script for stress testing the network. It spawns infinite tokio tasks submitting groth16 proofs to aligned across n threads.
To Test