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

Improve TXM performance by optimize Confirmer and Finalizer queries to stop pulling EVM receipt #14039

Conversation

huangzhen1997
Copy link
Contributor

@huangzhen1997 huangzhen1997 commented Aug 5, 2024

Title: Improve TXM performance by optimize Confirmer and Finalizer queries to stop pulling EVM receipt

Jira link: BCI-3905

Requires Dependencies:
Depend on finalizer PR, will update after it gets merged.

Description

The CCIP investigation into the TXM’s CPU and memory usage identified that the FindTransactionsConfirmedInBlockRange was the biggest offender. More specifically, pulling the EVM receipt from the DB is the most costly operation. Investigate if the EVM receipt is needed and, if not, update the query to only pull the required fields. At first glance, it seems that only BlockNumber, BlockHash, and TransactionIndex are required which are all stored directly in the receipt table.

The Finalizer introduces a new query that also pulls receipts from the DB. The same optimization could be applied to its FindConfirmedTxesReceipts query as well.

Acceptance Criteria

Determine if the Confirmer re-org detection logic requires fields from the EVM receipt json that are not already present in the receipts table. If it does not, update the query to stop pulling this field

Determine if the Finalizer requires fields from the EVM receipt json that are not already present in the receipts table. If it does not, update the query to stop pulling this field

@huangzhen1997 huangzhen1997 requested a review from dimriou August 20, 2024 15:19
@huangzhen1997 huangzhen1997 requested a review from dimriou August 21, 2024 16:08
@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Aug 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 23, 2024
@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Aug 23, 2024
Merged via the queue into develop with commit b0e31e0 Aug 23, 2024
134 of 135 checks passed
@prashantkumar1982 prashantkumar1982 deleted the BCI-3905/update-txm-confirmer-and-finalizer-query-to-skip-evm-receipt branch August 23, 2024 02:41
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 this pull request may close these issues.

4 participants