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 processing of Internal Txs #2220

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Refactor processing of Internal Txs #2220

merged 2 commits into from
Sep 25, 2024

Conversation

Uxio0
Copy link
Member

@Uxio0 Uxio0 commented Sep 23, 2024

  • Task was refactored into a function in IndexService
  • Automatic reindexing of Safes was disabled. Reindexing issues should be fixed by the scheduled task reindex_mastercopies_last_hours_task. Also some Safes were corrupted due to users trying to trick the indexer or Safes converted from L1 -> L2, and reindexing was triggered forever
  • Closes Multiple indexing issues detected on Optimism #2214

@Uxio0 Uxio0 requested a review from a team as a code owner September 23, 2024 14:33
@Uxio0 Uxio0 self-assigned this Sep 23, 2024
with only_one_running_task(self, lock_name_suffix=safe_address):
logger.info("[%s] Start processing decoded internal txs", safe_address)
index_service: IndexService = IndexServiceProvider()
number_processed = index_service.process_address(safe_address)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
number_processed = index_service.process_address(safe_address)
number_processed = index_service.process_decoded_txs(safe_address)

process_address sound for me too generic and confusing.

self.tx_processor.clear_cache(safe_address)

# Use chunks for memory issues
number_processed = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
number_processed = 0
total_processed_txs = 0

For me number processed could indicate an ID for example, not the total amount of processed transactions.

- Task was refactored into a function in `IndexService`
- Automatic reindexing of Safes was disabled. Reindexing issues
  should be fixed by the scheduled task `reindex_mastercopies_last_hours_task`.
  Also some Safes were corrupted due to users trying to trick the
  indexer or Safes converted from L1 -> L2, and reindexing was triggered forever
@Uxio0
Copy link
Member Author

Uxio0 commented Sep 25, 2024

I've just applied your suggestions!

@Uxio0 Uxio0 merged commit 88849af into main Sep 25, 2024
6 checks passed
@Uxio0 Uxio0 deleted the refactor-process-address branch September 25, 2024 17:59
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple indexing issues detected on Optimism
2 participants