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

Refactor the tx data processing method #538

Open
4 tasks
nullpointer0x00 opened this issue Aug 23, 2024 · 0 comments
Open
4 tasks

Refactor the tx data processing method #538

nullpointer0x00 opened this issue Aug 23, 2024 · 0 comments

Comments

@nullpointer0x00
Copy link
Contributor

Summary

Refactor the transaction data processing method (processAndSaveTransactionData) to use a common interface for chaining processing steps and handling errors consistently.

Problem Definition

Currently, the processAndSaveTransactionData method sequentially calls various save methods, with error handling implemented only for the IBC channel data. This approach is not scalable or maintainable as it requires individual try-catch blocks for each processing step, leading to code duplication and potential oversight. By introducing a common interface for handling these steps, the Provenance Network Explorer can achieve more robust and consistent error management across all transaction processing steps. This change does not require support from the Provenance Blockchain or Cosmos SDK.

Proposal

  • Define a common interface that encapsulates the processing of transaction data and error handling.
  • Implement this interface for each of the save methods currently used in processAndSaveTransactionData (e.g., saveMessages, saveTxFees, saveIbcChannelData, etc.).
  • Refactor the processAndSaveTransactionData method to utilize this interface, allowing all processing steps to be chained together and handled consistently.
  • Ensure that the new approach provides clear logging and error tracking

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

No branches or pull requests

1 participant