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

Investigate and improve balance indexing #39

Open
bdmason opened this issue Feb 11, 2022 · 0 comments
Open

Investigate and improve balance indexing #39

bdmason opened this issue Feb 11, 2022 · 0 comments
Assignees

Comments

@bdmason
Copy link
Contributor

bdmason commented Feb 11, 2022

The processors now take about 18 hours to complete, this is partially due to the fact we are indexing balance transfers on all networks, it was only Khala before. But I believe it is also down to how we index the balance, see #38

Indexing balance before that PR was a little inaccurate (only by tiny fractions of a token). There are 2 approaches here:

  1. figure out every event on substrate that effects balance and make sure we capture them all -> it's possible it's just fee related (evm is accurate but that has the fees in the data, we only get the tip)
  2. use polkadot API to query balance at block (what the linked PR did), this is slow but accurate. Tests need to confirm if some other events are effecting balance or if it is just fees. If it's the former then this approach is more accurate, but not 100% accurate

Currently we take approach 2 for the sake of more accurate data in the short term, but the effect on performance is significant, although this does need to be confirmed with a redeploy that skips the block querying.

@bdmason bdmason self-assigned this Feb 11, 2022
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

No branches or pull requests

1 participant