-
Notifications
You must be signed in to change notification settings - Fork 391
feat(aggregation-mode): retry bump and sending proofs on-chain after proof aggregation #2211
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
base: staging
Are you sure you want to change the base?
feat(aggregation-mode): retry bump and sending proofs on-chain after proof aggregation #2211
Conversation
|
|
||
| /// Supports retries only on async functions. See: https://docs.rs/backon/latest/backon/#retry-an-async-function | ||
| /// Runs with `jitter: false`. | ||
| pub async fn retry_function<FutureFn, Fut, T, 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.
I wouldn't move this functions here. This file should only contain the abstraction to interact with backon or any retryable library, not business logic.
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.
Moved back to the mod.rs file in 5a728d1
| #[cfg(test)] | ||
| mod tests { |
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.
If the should_send_proof_to_verify_on_chain is now in helpers it does not make much sense for them to be here. They should be moved to helpers.rs.
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.
Done in e873b90
|
|
||
| /// Supports retries only on async functions. See: https://docs.rs/backon/latest/backon/#retry-an-async-function | ||
| /// Runs with `jitter: false`. | ||
| pub async fn retry_function<FutureFn, Fut, T, 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.
I would remove bakon and write the backoff delay logic ourselves, it should be 10 lines of code. The usage of callbacks in bakon makes the code complex and hard to follow/read.
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.
Done in 352cce0
Description
This PR adds a retry logic with exponential backoff.
How to test
Normal workflow
Failure after retries
Do the same steps as before, but before step 4, go to the Docker container which maps the port 8545 (usually a
el-X-geth-lighthouse) and shut it down.Success after retries
The same as before, but when you see the first
Started waiting until we can submit the aggregated proof.log, then start the container.Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging