steem icon indicating copy to clipboard operation
steem copied to clipboard

MIRA flavor of steemd fails to resync/replay while re-using old datadir

Open Gandalf-the-Grey opened this issue 6 years ago • 1 comments

Expected behavior: clean state in datadir (or other specified location) and proceed with sync from scratch with non-mira, there's only shared_memory.bin file to be removed, but for MIRA, there's also RocksDB related tree.

Current behavior:

3327252ms database.cpp:184              open                 ] 10 assert_exception: Assert Exception
head_block.valid() && head_block->id() == head_block_id(): Chain state does not match block log. Please reindex blockchain.
    {}
    database.cpp:151 open
3327252ms database.cpp:184              open                 ] args.data_dir: /home/steem/datadir-api/blockchain args.shared_mem_dir: /home/steem/datadir-api/blockchain args.shared_file_size: 8589934592
3327252ms chain_plugin.cpp:603          plugin_startup       ] Error opening database. If the binary or configuration has changed, replay the blockchain explicitly. Error: {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"database.cpp","line":151,"method":"open","hostname":"","timestamp":"2019-07-19T05:55:27"},"format":"head_block.valid() && head_block->id() == head_block_id(): Chain state does not match block log. Please reindex blockchain.","data":{}},{"context":{"level":"warn","file":"database.cpp","line":184,"method":"open","hostname":"","timestamp":"2019-07-19T05:55:27"},"format":"rethrow","data":{"args.data_dir":"/home/steem/datadir-api/blockchain","args.shared_mem_dir":"/home/steem/datadir-api/blockchain","args.shared_file_size":"8589934592"}}]}

Workaround for resync using only steemd (i.e. no rm): steemd --resync (failed) steemd --replay (failed: No blocks in block log. Cannot reindex an empty chain.) steemd --resync (works)

Workaround for replay: Obviously, removing all but block_log from datadir

Gandalf-the-Grey avatar Jul 19 '19 06:07 Gandalf-the-Grey

this crap made my project go down, two times :p and I quit already

baaluo avatar Aug 11 '20 05:08 baaluo