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

Implement tx error handling when ibcService.saveIbcChannelData fails #535

Closed
4 tasks
nullpointer0x00 opened this issue Aug 23, 2024 · 0 comments · Fixed by #537
Closed
4 tasks

Implement tx error handling when ibcService.saveIbcChannelData fails #535

nullpointer0x00 opened this issue Aug 23, 2024 · 0 comments · Fixed by #537

Comments

@nullpointer0x00
Copy link
Contributor

nullpointer0x00 commented Aug 23, 2024

Summary

Implement error handling in the addTxToCache method to ensure that when ibcService.saveIbcChannelData fails, the remaining transaction data for the block is still saved, and the failure is logged in a database table.

Problem Definition

Currently, if any part of the addTxToCache method fails, such as the ibcService.saveIbcChannelData(res, txInfo, txUpdate) call, none of the transaction data for that block is saved. This issue is particularly problematic as it leads to missing transaction data in the database. Related issues, like #500 and #502, indicate that this problem may be more widespread than initially reported.

Addressing this issue will significantly improve the reliability of the explorer-service by ensuring data integrity even if parts of the transaction processing fail. It also lays the groundwork for future enhancements with similar error handling for all save operations.

Proposal

  1. Modify the addTxToCache method in the AsyncCachingV2 class to include a try-catch block around the ibcService.saveIbcChannelData(res, txInfo, txUpdate) call.
  2. If the ibcService.saveIbcChannelData call fails, log the error in a new or existing database table dedicated to tracking such failures.
  3. Ensure that the method continues processing and saving the remaining transaction data even if the IBC save operation fails.
  4. For future consideration, extend this error-handling pattern to other save operations within the addTxToCache method.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant