cronos
cronos copied to clipboard
Problem: versiondb version mismatch with iavl on startup
Currently node refuse to startup if versiondb's version don't match iavl version. It's actually possible to automatically fix the version mismatch:
- if versiondb's version is larger than iavl one, usually due to rollback, trim versiondb version using rocksdb
OpenDbAndTrimapi. - if versiondb's version is smaller than iavl one, usually due to un-graceful shutdown, since two DBs are committed asynchronously, we can automatically catch-up versiondb with the iavl tree.