-
Notifications
You must be signed in to change notification settings - Fork 73
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
fix: panic app when cannot send prove #15
Conversation
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.
Looks great! Just a few minor comments, let me know if you agree and then I'll merge it
clients/cli/src/prover.rs
Outdated
@@ -32,7 +32,7 @@ use nexus_core::{ | |||
init_circuit_trace, key::CanonicalSerialize, pp::gen_vm_pp, prove_seq_step, types::*, | |||
}, | |||
}; | |||
use std::env; | |||
// use std::env; |
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.
// use std::env; |
clients/cli/src/prover.rs
Outdated
} | ||
|
||
// Optionally, add a delay before retrying | ||
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await; |
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.
Can we do exponential backoff here? (Multiply sleep delay by 2 each time.)
clients/cli/src/prover.rs
Outdated
} | ||
|
||
// Optionally, add a delay before retrying | ||
tokio::time::sleep(tokio::time::Duration::from_secs(2)).await; |
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.
Can we do exponential backoff here? (Multiply sleep delay by 2 each time.)
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.
okay, let me update
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.
Something like this, and remove the comment
- // Optionally, add a delay before retrying
- tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
+ tokio::time::sleep(tokio::time::Duration::from_secs(u64::pow(2, retries))).await;
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 updated, please help me check and merge.
Thank you
Fixes #10