yangl1996 / prism-rust

Rust implementation of the Prism consensus protocol
MIT License
100 stars 19 forks source link

Add recovery for utxo db #86

Open yangl1996 opened 5 years ago

yangl1996 commented 5 years ago

We now disable WAL for UTXODB, so should the process crash UTXODB will be in an inconsistent state. The solution is to manually flush the DB, and mark the state when we flush.

wgr523 commented 5 years ago

I have two questions:

  1. when do we want to flush?
  2. can we ensure there is no flush other than the manual flush? since we can record the state when manual flush, but automatic flush will not record the state