You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
If a node is interrupted during block processing i.e. due to reload, there is a high probability of partial writes to the database, leading to corruption of memory tables and a break in consensus with the rest of network.
Solution: Rewrite database logic so that block save, block application, and round tick are all encompassed within an atomic database transaction that can be easily rolled back upon interruption or error.
This should better ensure data integrity across nodes on the network.
The text was updated successfully, but these errors were encountered:
When shutting down node during block processing.
- Tracking cleanup status through __private.cleanup.
- Skipping blocks on cleanup for Blocks.prototype.loadBlocksOffset.
- Skipping blocks on cleanup for Blocks.prototype.loadBlocksFromPeer.
- Exiting Blocks.prototype.processBlock early on cleanup.
karmacoma
changed the title
Prevent data corruption on node shutdown during block processing
Rewrite all database logic to follow pg-promise best practices
Oct 29, 2016
Shifting this issue up a gear. Logic rewrite will provide better use of shared connections from pool and make block processing fully atomic as originally intended.
under modules/block.jsThis way we can throw an error an prevent from rewinding already applied transactions.Edited by @karmacoma.
If a node is interrupted during block processing i.e. due to reload, there is a high probability of partial writes to the database, leading to corruption of memory tables and a break in consensus with the rest of network.
Solution: Rewrite database logic so that block save, block application, and round tick are all encompassed within an atomic database transaction that can be easily rolled back upon interruption or error.
This should better ensure data integrity across nodes on the network.
The text was updated successfully, but these errors were encountered: