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

(tx_indexer) Improvement to restore transactions in process from database to memcache #129

Merged
merged 9 commits into from
Oct 31, 2023

Conversation

kobayurii
Copy link
Collaborator

@kobayurii kobayurii commented Oct 19, 2023

In this PR we improve restore transactions in process from database to memcache. The main idea is to restore not all transactions in the process but only transactions that the indexer could potentially collect. For this, we use the range of blocks from the beginning of the index to minus 1000 blocks. This range should include all transactions that the indexer can collect.
Another point, in this PR we solve the problem of missing receipts.
In 2021 on the nearcore side an unfortunate situation/bug occurred. For some transactions Receipts haven't been created and were considered as missing. It was fixed with the patch and the protocol upgrade. The protocol team decided to include those Receipts in the first block of the "next" epoch. However, the number of missing receipts was 383 and they didn't fit into a single block, so they were included in the two sequential blocks: 47317863 and 47317864 See the PR#4248

@kobayurii kobayurii self-assigned this Oct 19, 2023
@kobayurii kobayurii force-pushed the tx_ind_without_db_cache branch 3 times, most recently from 5c9121b to e5fecf4 Compare October 24, 2023 14:19
@kobayurii kobayurii changed the title switch tx indexer to cache without database (tx_indexer) Improvement to restore transactions in process from database to memcache Oct 25, 2023
@kobayurii kobayurii marked this pull request as ready for review October 30, 2023 13:10
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

Overall looks good to me. I've left a couple of comments on wording

tx-indexer/src/config.rs Outdated Show resolved Hide resolved
tx-indexer/src/config.rs Outdated Show resolved Hide resolved
tx-indexer/src/storage/base.rs Outdated Show resolved Hide resolved
@kobayurii kobayurii merged commit 171f48a into main Oct 31, 2023
3 checks passed
@kobayurii kobayurii deleted the tx_ind_without_db_cache branch December 20, 2023 13:58
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.

2 participants