Author Topic: witness_node crash on currupt blockchain  (Read 1894 times)

0 Members and 1 Guest are viewing this topic.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
According to your logs I think it's easier to download the chain again.

Alternatively you can ask someone to send you a "blocks" file and an "index" file which are in "witness_node_data_dir/blockchain/database/block_num_to_block/" directory, then replay. Total size of those files is about 15GB.

Next time after a clean shutdown, you can make a backup of the data directory.
BitShares committee member: abit
BitShares witness: in.abit

Offline runestone

I somehow managed to fuck up my blockchain, most likely because of an unclean termination of the witness_node process. Is there anyway I can recover from the state below? It takes almost 3 days to download the blockchain again, which I'd like to avoid.

Using the parameters --replay-blockchain --force-validate did not help.

Code: [Select]
# ./witness_node --data-dir="/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/" --replay-blockchain --force-validate

3309402ms th_a       witness.cpp:87                plugin_initialize    ] witness plugin:  plugin_initialize() begin
3309402ms th_a       witness.cpp:97                plugin_initialize    ] Public Key: BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
3309402ms th_a       witness.cpp:115               plugin_initialize    ] witness plugin:  plugin_initialize() end
3309402ms th_a       object_database.cpp:106       open                 ] Opening object database from /bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain ...
3325700ms th_a       object_database.cpp:111       open                 ] Done opening object database.
3325701ms th_a       db_management.cpp:59          reindex              ] reindexing blockchain
3325701ms th_a       db_management.cpp:65          reindex              ] Replaying blocks, starting at 1...
3325701ms th_a       db_management.cpp:178         open                 ] 10 assert_exception: Assert Exception
(skip & skip_merkle_check) || next_block.transaction_merkle_root == next_block.calculate_merkle_root():
    {"next_block.transaction_merkle_root":"0000000021cff114000000004e02000000000000","calc":"0000000000000000000000000000000000000000","next_block":{"previous":"000000007dbcb61797750100b338ddb3f26fa023","timestamp":"1970-01-01T00:00:00"$
    th_a  db_block.cpp:493 _apply_block

    {"next_block.block_num()":1}
    th_a  db_block.cpp:545 _apply_block

    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:123 reindex
3325702ms th_a       db_management.cpp:178         open                 ] data_dir: /bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain
3325702ms th_a       application.cpp:403           startup              ] Caught exception 10 assert_exception: Assert Exception
(skip & skip_merkle_check) || next_block.transaction_merkle_root == next_block.calculate_merkle_root():
    {"next_block.transaction_merkle_root":"0000000021cff114000000004e02000000000000","calc":"0000000000000000000000000000000000000000","next_block":{"previous":"000000007dbcb61797750100b338ddb3f26fa023","timestamp":"1970-01-01T00:00:00"$
    th_a  db_block.cpp:493 _apply_block

    {"next_block.block_num()":1}
    th_a  db_block.cpp:545 _apply_block

    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:123 reindex
rethrow
    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:178 open in open(), you might want to force a replay
3325703ms th_a       application.cpp:454           startup              ] 10 assert_exception: Assert Exception
(skip & skip_merkle_check) || next_block.transaction_merkle_root == next_block.calculate_merkle_root():
    {"next_block.transaction_merkle_root":"0000000021cff114000000004e02000000000000","calc":"0000000000000000000000000000000000000000","next_block":{"previous":"000000007dbcb61797750100b338ddb3f26fa023","timestamp":"1970-01-01T00:00:00"$
    th_a  db_block.cpp:493 _apply_block

    {"next_block.block_num()":1}
    th_a  db_block.cpp:545 _apply_block

    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:123 reindex
rethrow
    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:178 open
3325703ms th_a       application.cpp:1042          startup              ] 10 assert_exception: Assert Exception
(skip & skip_merkle_check) || next_block.transaction_merkle_root == next_block.calculate_merkle_root():
    {"next_block.transaction_merkle_root":"0000000021cff114000000004e02000000000000","calc":"0000000000000000000000000000000000000000","next_block":{"previous":"000000007dbcb61797750100b338ddb3f26fa023","timestamp":"1970-01-01T00:00:00"$
    th_a  db_block.cpp:493 _apply_block

    {"next_block.block_num()":1}
    th_a  db_block.cpp:545 _apply_block

    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:123 reindex
rethrow
    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:178 open
rethrow
    {}
    th_a  application.cpp:454 startup
3325704ms th_a       main.cpp:282                  main                 ] Exiting with error:
10 assert_exception: Assert Exception
(skip & skip_merkle_check) || next_block.transaction_merkle_root == next_block.calculate_merkle_root():
    {"next_block.transaction_merkle_root":"0000000021cff114000000004e02000000000000","calc":"0000000000000000000000000000000000000000","next_block":{"previous":"000000007dbcb61797750100b338ddb3f26fa023","timestamp":"1970-01-01T00:00:00"$
    th_a  db_block.cpp:493 _apply_block

    {"next_block.block_num()":1}
    th_a  db_block.cpp:545 _apply_block

    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:123 reindex
rethrow
    {"data_dir":"/bitshares-core/bitshares-core/programs/witness_node/witness_node_data_dir/blockchain"}
    th_a  db_management.cpp:178 open
rethrow
    {}
    th_a  application.cpp:454 startup
3325705ms th_a       db_management.cpp:194         close                ] Rewinding from 0 to 0
Br, Rune
~ Please vote on blockbasis-witness
~ https://www.blockbasis.com