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

fix: indexer event scanning is broken after epoch change #1121

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

mrnaveira
Copy link
Collaborator

@mrnaveira mrnaveira commented Aug 21, 2024

Description

  • In the indexer:
    • Refactored the event scanner to take into account epoch changes
    • New db methods get_oldest_scanned_epoch and delete_scanned_epochs_older_than to support the event scanning
  • In the validator node:
    • Refactored the block sync task to take into account epoch changes and to use the existing up_to_epoch parameter (it was ignored previously)
    • New db method blocks_get_first_in_epoch to support the new block sync logic

Motivation and Context

Recently the epoch change logic was reworked, which broke the event scanning functionality in the indexer. This PR fixes it.

Fixes #1111

How Has This Been Tested?

Manually by running tari_swarm, doing transactions, and stopping/resuming the network

What process can a PR reviewer use to test or verify this change?

See previous section

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

Copy link

github-actions bot commented Aug 21, 2024

Test Results (CI)

105 tests   - 444   104 ✅  - 445   34m 17s ⏱️ - 55m 43s
 15 suites  -  43     0 💤 ±  0 
  1 files    -   1     1 ❌ +  1 

For more details on these failures, see this check.

Results for commit 3751961. ± Comparison against base commit 7f0a322.

This pull request removes 444 tests.
Scenario: Claim and transfer confidential assets via wallet daemon: tests/features/wallet_daemon.feature:90:3
Scenario: Claim base layer burn funds with wallet daemon: tests/features/claim_burn.feature:7:3
Scenario: Confidential transfer to unexisting account: tests/features/transfer.feature:164:3
Scenario: Create account and transfer faucets via wallet daemon: tests/features/wallet_daemon.feature:8:3
Scenario: Create and mint account NFT: tests/features/wallet_daemon.feature:134:3
Scenario: Double Claim base layer burn funds with wallet daemon. should fail: tests/features/claim_burn.feature:45:3
Scenario: New validator node registers and syncs: tests/features/state_sync.feature:7:3
Scenario: Template registration and invocation in a 2-VN committee: tests/features/committee.feature:7:3
Scenario: Transfer tokens to existing account: tests/features/transfer.feature:87:3
Scenario: Transfer tokens to unexisting account: tests/features/transfer.feature:8:3
…

♻️ This comment has been updated with latest results.

sdbondi
sdbondi previously approved these changes Aug 22, 2024
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

LGTM small nits on the storage API

dan_layer/state_store_sqlite/src/reader.rs Outdated Show resolved Hide resolved
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

utACK

@sdbondi sdbondi added this pull request to the merge queue Aug 23, 2024
Merged via the queue into tari-project:development with commit 6dc89c8 Aug 23, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: indexer event scanning is broken after epoch change PR
3 participants