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 QN sync after transactions #4566

Closed
2 tasks
thesan opened this issue Oct 6, 2023 · 1 comment
Closed
2 tasks

Fix QN sync after transactions #4566

thesan opened this issue Oct 6, 2023 · 1 comment
Labels
bug Something isn't working community-dev issue suitable for community-dev pipeline high-prio release:2.0.0

Comments

@thesan
Copy link
Collaborator

thesan commented Oct 6, 2023

Bug identified by @kdembler:

Context

After most transactions Pioneer waits for the block that includes the transaction to be processed by the QN to complete the flow and re-fetch data. It does so by checking the queryNodeState QN subscription. However it checks queryNodeState.indexerHead instead of queryNodeState.lastCompleteBlock to query the hash that it compares to the transaction hash.

As a result:

  • When the transaction hash is actually found: the block hasn't yet been processed by the QN, so the new data will be missing after re-fetching the queries.
  • When queryNodeState.indexerHead is already ahead of the transaction block, the hash won't be found and the user will be asked to wait until a timeout happens.

Scope

  1. Checking for queryNodeState.lastCompleteBlock instead of queryNodeState.indexerHead.
  2. Account for potential subscription misses by checking for the block height associated with the transaction hash and then waiting for queryNodeState.lastCompleteBlock to be equal or greater than this block height.
@thesan thesan added bug Something isn't working high-prio community-dev issue suitable for community-dev pipeline labels Oct 6, 2023
@thesan
Copy link
Collaborator Author

thesan commented Oct 18, 2023

Solved on the backend branch in #4579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community-dev issue suitable for community-dev pipeline high-prio release:2.0.0
Projects
None yet
Development

No branches or pull requests

2 participants