Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Blocks need to be restored from temporary table upon failure or application restart #3775

Closed
4 tasks
michielmulders opened this issue Jun 3, 2019 · 3 comments
Closed
4 tasks
Assignees
Milestone

Comments

@michielmulders
Copy link
Contributor

michielmulders commented Jun 3, 2019

Expected behavior

Whenever the node crashes or upon failure during one of the sync processes we roll back to the original state by applying the blocks in the temp table and continue the operating of the node.

Functions to be implemented:

  • restoreBlocks()
  1. Read blocks from temp table
  2. Apply blocks (blocks verify process - do not care about how it is implemented - just call this)
  3. Remove temp blocks after the apply process is successful

Design For Issue

Place the restoreBlocks in blocks/blocks.
The synchronizer class should injects blocks module as a dependency so we can access restoreBlocks inside.

Which version(s) does this affect? (Environment, OS, etc...)

feature/improve-bft

Tasks list

  • Add functionality for applying block from blocks temporary table.
  • Restore blocks from the temporary table when the node restarts.
  • Restore blocks from the temporary table when the synchronization fails.
  • Write integration tests.
@michielmulders michielmulders changed the title Blocks need to be applied and remove temp table upon success FCS Blocks need to be restored from temporary table upon failure or application restart Jun 3, 2019
@sridharmeganathan
Copy link
Contributor

@michielmulders will do the analysis before the next sprint grooming meeting.

@michielmulders
Copy link
Contributor Author

michielmulders commented Jun 24, 2019

@michielmulders
Copy link
Contributor Author

First, happy path -> block in temp table and restore to chain (via test)

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

No branches or pull requests

4 participants