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

Rosetta, fix pending blocks balance query #9904

Merged
merged 4 commits into from
Dec 10, 2021

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Dec 10, 2021

Fix Rosetta balance queries when the given height is for a pending block.

Strategy:

  • Use a RECURSIVE query from the block of max height back to a canonical block
  • UNION all canonical blocks
  • JOIN that entire chain on the balances table

For the network status endpoint, use the latest block in the archive db to the get the "current block" height and state hash.
(Continue to use the GraphQL best tip for the sync status height.)

With these changes, rosetta-cli check:data on mainnet succeeds through all block in the archive db.

Also: Change the missing_blocks_auditor to use individual bits for particular errors, rather than prime number factors, which was a crazy idea. Tested the app against the mainnet 3 db.

@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Dec 10, 2021
@psteckler psteckler added ci-build-me Add this label to trigger a circle+buildkite build for this branch and removed ci-build-me Add this label to trigger a circle+buildkite build for this branch labels Dec 10, 2021
@psteckler psteckler merged commit 7e98138 into rosetta-1.2.1-safe Dec 10, 2021
@psteckler psteckler deleted the fix/pending-blocks-balance branch December 10, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants