Skip to content
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 oz audit issue m-01 #192

Merged
merged 1 commit into from
Feb 8, 2025
Merged

fix oz audit issue m-01 #192

merged 1 commit into from
Feb 8, 2025

Conversation

adam-xu-mantle
Copy link
Contributor

@adam-xu-mantle adam-xu-mantle commented Jan 22, 2025

M-01 Inefficient Error Handling and Timeout in loopEigenDaLoop

The loopEigenDa function of the BatchSubmitter attempts to call disperseEigenDaData within a retry loop that continues for either a fixed number of retries (EigenRPCRetryNum) or until a timeout (DisperseBlobTimeout) is reached. However, the implementation neglects to properly handle errors returned by disperseEigenDaData. Instead of classifying or acting on the errors, the loop merely logs them and retries, effectively waiting for the entire DisperseBlobTimeout duration, even in cases where the operation cannot succeed due to permanent or critical errors.
This oversight can lead to inefficient resource utilization and unnecessary delays. In scenarios where a critical error occurs (e.g., invalid input data or persistent configuration issues), the loop will still continue retrying until the timeout expires. This results in wasted computation time, potential bottlenecks in the rollup process, and delayed submission of transaction data. Furthermore, this behavior can obscure the root cause of errors in the logs, as the same error is repeatedly logged without actionable resolution.
To address this issue, the error handling logic should be enhanced to distinguish between transient errors (e.g., network issues) and permanent ones (e.g., invalid data). For transient errors, the loop can continue with retries, potentially implementing exponential backoff to reduce retry frequency over time. For permanent errors, the loop should exit immediately to avoid unnecessary delays. Additionally, the timeout check should be performed at the beginning of each retry iteration to ensure that retries do not continue beyond the configured timeout.

op-service/eigenda/da_proxy.go Show resolved Hide resolved
Copy link

github-actions bot commented Feb 7, 2025

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Feb 7, 2025
@adam-xu-mantle adam-xu-mantle merged commit 863d85c into develop Feb 8, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants