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

Implement a loop for getting confirmation and discard or persist the block to the blockchain. #64

Open
atif-konasl opened this issue May 26, 2021 · 0 comments
Assignees
Labels

Comments

@atif-konasl
Copy link

atif-konasl commented May 26, 2021

Overview

Need to implement a loop for calling confirmation api every certain interval and process the pending blocks and synchronise with blockchain flow.

Responsibilities

  1. It will call a method of client package and get the response of confirmation for certain block hashes and slots.
  2. After getting response, If it gets unknown response for certain slot then it will discard the block from pending queue and send request to its peer for these discarded blocks again.
  3. If it gets verified response for certain slot, then it will pass this block to blockchain's existing flow for persisting the block into its blockchain
  4. This feature must make sure that it will pass the verified blocks sequentially like if slot n is verified but slot n-1 is not verified yet then it will must re-download the block of slot n-1 and then it will process slot n.
  5. These step-1, 2, 3 and 4 happens repeatedly every certain period of interval

Implementation Notes

Please provide implementation notes here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants