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

Pending transactions sanitizer process #3715

Merged
merged 2 commits into from
Mar 19, 2021
Merged

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Mar 17, 2021

Resolves #3665

Motivation

During the restart of the application, ongoing block import could result in the appearing of block with 0 transactions when actually it contains transactions.

Changelog

In order to eliminate the consequences of broken import, Indexer.PendingTransactionsSanitizer process is added which starts every 3 hours. It gets the list of pending transactions from the DB. It requests the archive node for each transaction hash from the list and if a transaction already included in the block, the process invalidates that block in Blokcsocut DB in order to re-fetch it. The process also removes pending transactions from the DB if they are dropped from the node.

Checklist for your Pull Request (PR)

@coveralls
Copy link

coveralls commented Mar 17, 2021

Pull Request Test Coverage Report for Build c00dfbc4d936859c880d7cc3864bd3fa40758aa0-PR-3715

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 9 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-1.2%) to 64.393%

Files with Coverage Reduction New Missed Lines %
test/block_scout_web/features/pages/chain_page.ex 1 90.0%
lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 2 71.43%
lib/block_scout_web/checksum_address.ex 6 55.56%
Totals Coverage Status
Change from base Build ae03f9436b8044db7054f5766fcbfc12db0531c7: -1.2%
Covered Lines: 2096
Relevant Lines: 3255

💛 - Coveralls

@vbaranov vbaranov changed the title Pending transactions sanitizer Pending transactions sanitizer process Mar 17, 2021
@vbaranov vbaranov force-pushed the vb-pending-txs-sanitizer branch 2 times, most recently from 9616b14 to 2f498f8 Compare March 17, 2021 14:28
@vbaranov vbaranov marked this pull request as ready for review March 17, 2021 14:28
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.

xDai: Transactions missing for xDai block 14493176
2 participants