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

Make indexer support single shard tracking. #12607

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Make indexer support single shard tracking. #12607

merged 2 commits into from
Dec 12, 2024

Conversation

robin-near
Copy link
Contributor

Allow using tracked_accounts. In that case, use a ShardTracker to filter down the chunks we should query.

Is there any tests for the indexer? 🤔

@robin-near robin-near requested a review from a team as a code owner December 11, 2024 19:30
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 6.66667% with 28 lines in your changes missing coverage. Please review.

Project coverage is 70.48%. Comparing base (beb00f4) to head (266088a).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
chain/indexer/src/streamer/mod.rs 0.00% 16 Missing ⚠️
chain/indexer/src/lib.rs 0.00% 7 Missing ⚠️
chain/indexer/src/streamer/fetchers.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12607      +/-   ##
==========================================
+ Coverage   70.17%   70.48%   +0.31%     
==========================================
  Files         840      845       +5     
  Lines      169987   172001    +2014     
  Branches   169987   172001    +2014     
==========================================
+ Hits       119282   121239    +1957     
- Misses      45632    45648      +16     
- Partials     5073     5114      +41     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (-0.01%) ⬇️
db-migration 0.16% <0.00%> (-0.01%) ⬇️
genesis-check 1.29% <0.00%> (-0.01%) ⬇️
linux 69.41% <6.66%> (+0.01%) ⬆️
linux-nightly 70.05% <6.66%> (+0.28%) ⬆️
pytests 1.60% <0.00%> (+0.01%) ⬆️
sanity-checks 1.41% <0.00%> (+0.01%) ⬆️
unittests 70.31% <6.66%> (+0.32%) ⬆️
upgradability 0.20% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bowenwang1996
Copy link
Collaborator

Is there any tests for the indexer? 🤔

@khorolets do we have any?

@khorolets
Copy link
Member

Is there any tests for the indexer? 🤔

@khorolets do we have any?

No, we don't. I have no ideas what and how to test it

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.

@robin-near I'll have a closer look at the changes and get back to you. At a glance this way of tracking shards does not make sense to the indexer and its real life use cases.

cc @frol maybe you have something in your mind.

@robin-near
Copy link
Contributor Author

@khorolets thanks for taking a look! We need single-account tracking for the MPC (chain signatures) use case. We only care about the state of one account, and tracking all shards is a big waste of resources.

@bowenwang1996 bowenwang1996 added this pull request to the merge queue Dec 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 12, 2024
@robin-near robin-near enabled auto-merge December 12, 2024 20:22
@robin-near robin-near added this pull request to the merge queue Dec 12, 2024
Merged via the queue into master with commit fb444c6 Dec 12, 2024
47 of 49 checks passed
@robin-near robin-near deleted the robin/indexer1 branch December 12, 2024 21:04
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.

3 participants