3

Currently in EOS, it uses the memory database with the mmap and customized session, and sometimes when the node is down, it will cause inconsistent state and the data can't be recovered, we need to replay.

So, my question is, why doesn't use other databases like leveldb, so that it can keep the consistence?

1 Answer 1

2

The reason is performance. Reading and writing from RAM is orders of magnitude faster than from disk. If a clock producer node is down, it will be replaced by another block producer according to the votes.

If you're referring to a witness node for a specific dApp, then you wouldn't want a single point of failure. A serious dApp which relies on a witness node will probably have several copies in separate data centers, using bare metal or a cloud data center such as AWS or Azure or others.

In that witness node, you can certainly use a plugin to save the state in a conventional DB and resync faster in case it is needed.

Block.one is adding support for faster resync and external DB in version 1.1.0 of the EOS node software. See details here

1
  • But there're many times when I restart the nodeos, it tell me that there're dirty flags, and I must replay that, it will cause several days, how to avoid this situation?
    – Jimmy Guo
    Commented Aug 7, 2018 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.