crypto-org-chain / crypto-org-chain/cronos

Problem: versiondb version mismatch with iavl on startup

Open
#1,053 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.