crypto-org-chain / crypto-org-chain/cronos
Problem: versiondb version mismatch with iavl on startup
- Dominant language
- Go
- Stars
- 336
- Forks
- 299
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 4
Description
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 `OpenDbAndTrim` api.
- 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.
Contributor guide
Research direction
Start at the startup version check and the versiondb/IAVL recovery and commit paths described in the issue, then inspect RocksDB's OpenDbAndTrim API. Done means startup handles both version-order cases without refusing to start and versiondb is consistent with the IAVL tree after recovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100