3

I am just reading source code of EOS but I am not clear with fork databases.

I do not know exactly where it is (on RAM or on disk). I also would like to have a look at the exact code. Which files are relevant? Thanks!

3

The still reversible blocks are stored in blocks/reversible.

The reversible state is kept in RAM, and keeps track of inserts, deletes, and updates in their undo / redo forms, so they can be applied and unapplied when a change of longest chain occurs. If you're looking at the source, check references to chainbase instead of fork. Check the squash, commit methods, and around here: https://github.com/EOSIO/chainbase/blob/master/src/chainbase.cpp#L217

| improve this answer | |
  • Thank @abourget, I read it. You said: The reversible state is kept in RAM so when it becomes to irreversible state so where is it? It will be stored on disk, if it true why use must pay fee for RAM? – user2644 Nov 26 '18 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy