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

[master] Fix timing issue with GetVCFinalBlock #2475

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Conversation

sandipbhoir
Copy link
Contributor

@sandipbhoir sandipbhoir commented Mar 18, 2021

Description

This fixes the timing issue with syncing of extseed which uses pubkey whitelisting.

  • Basically flag m_vcFinalBlockProcessed can remains unset in some corner case with timing issue in GetVCFinalBlockFromL2lDataProvider.
  • Same also applies for GetDSBlockFromL2lDataProvider

Backward Compatibility

  • This is not a breaking change
  • This is a breaking change

Review Suggestion

Status

Implementation

  • ready for review

Integration Test (Core Team)

  • local machine test
  • small-scale cloud test

@sandipbhoir sandipbhoir added the Ready Ready for review label Mar 18, 2021
@sandipbhoir sandipbhoir self-assigned this Mar 18, 2021
@github-actions github-actions bot changed the title Fix timing issue with GetVCFinalBlock [master] Fix timing issue with GetVCFinalBlock Mar 18, 2021
@github-actions github-actions bot added this to PRs in development in Core Mar 18, 2021
@chetan-zilliqa
Copy link
Contributor

chetan-zilliqa commented Mar 18, 2021

Hi @sandipbhoir , One question about the fix, Maybe I'm missing somewhere.
Imagine the flow when the block is received and timeout happens.

  1. Initially received flag is set to false and we go into a while loop.
  2. Both timeouts happened and the final block is received. so m_vcFinalBlockProcessed= true now.
  3. next time it will not go into a loop and we set m_vcFinalBlockProcessed=false and return received which is set to false.
  4. But since we returned false from GetVCFinalBlockFromL2lDataProvider function, it will not go to fetch FetchMbTxPendingTxMessageFromL2l ?

@sandipbhoir
Copy link
Contributor Author

Hi @sandipbhoir , One question about the fix, Maybe I'm missing somewhere.
Imagine the flow when the block is received and timeout happens.

1. Initially received flag is set to `false` and we go into a while loop.

2. Both timeouts happened and the final block is received. so `m_vcFinalBlockProcessed= true` now.

3. next time it will not go into a loop and we set `m_vcFinalBlockProcessed=false` and return received which is set to `false`.

4. But since we returned `false` from `GetVCFinalBlockFromL2lDataProvider` function, it will not go to fetch `FetchMbTxPendingTxMessageFromL2l` ?

Good valid point.

Core automation moved this from PRs in development to PRs approved - ready to merge! Mar 18, 2021
@ansnunez ansnunez merged commit e33fb4a into master Mar 19, 2021
@ansnunez ansnunez deleted the fix/getvcfinal branch March 19, 2021 10:51
Core automation moved this from PRs approved - ready to merge! to PRs done (merged) Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready Ready for review
Projects
Core
  
PRs done (merged)
Development

Successfully merging this pull request may close these issues.

None yet

3 participants