You are viewing a single comment's thread from:

RE: A better approach to Turing Complete Smart Contracts

in #blockchain8 years ago

If the computer shuts off in the middle of a write then it may result in undefined behavior; same if the program crashes while updating or if the file is modified by an outside program.

We plan to add a flag that we set when we start writing and we clear when we finish writing. Once this flag is in place then we can detect any crashes that leave the memory in undefined state.

The OS should take care of synchronizing the memory pages if the process crashes outside of a write operation.

The blockchain log is an append-only file now, which means it should never get corrupted and you should always be able to resync.