-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We need to recover the state DB when (i) the peer fails during commit (partial written state). (ii) the database gets corrupted. We introduce a new state in DB called savepoint, and update it with the block height once all valid tx in the last/recent block is committed. Whenever peer starts (first boot up or after a failure), we compare the savepoint in DB and block height to see whether the state DB is in consistent state. If not, we execute the following steps: (i) retrieve all required blocks (#blocks = block height - savepoint) from block storage, (ii) compute write set for valid tx, commits these values, & update the savepoint. Change-Id: I769d1391de511d3cdb55c40692beb829e2cc5c2f Signed-off-by: senthil <cendhu@gmail.com>
- Loading branch information
Showing
5 changed files
with
186 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters