AntelopeIO / spring

C++ implementation of the Antelope protocol with Savanna consensus
Other
7 stars 3 forks source link

test_state_history/test_splitted_log and test_state_history/test_fork_no_stride fail in Savanna #179

Closed linh2931 closed 2 months ago

linh2931 commented 4 months ago
unittests/state_history_tests.cpp(715): error: in "test_state_history/test_splitted_log": check std::filesystem::exists( retained_dir / "trace_history-41-60.log" ) has failed
unittests/state_history_tests.cpp(716): error: in "test_state_history/test_splitted_log": check std::filesystem::exists( retained_dir / "trace_history-41-60.index" ) has failed
unittests/state_history_tests.cpp(726): error: in "test_state_history/test_splitted_log": check chain.traces_log.block_range().first == 41u has failed [61 != 41]
unittests/state_history_tests.cpp(728): error: in "test_state_history/test_splitted_log": check std::filesystem::exists( retained_dir / "chain_state_history-41-60.log" ) has failed
unittests/state_history_tests.cpp(729): error: in "test_state_history/test_splitted_log": check std::filesystem::exists( retained_dir / "chain_state_history-41-60.index" ) has failed
unittests/state_history_tests.cpp(739): error: in "test_state_history/test_splitted_log": check chain.chain_state_log.block_range().first == 41u has failed [61 != 41]
unittests/state_history_tests.cpp(745): error: in "test_state_history/test_splitted_log": check get_traces(chain.traces_log, 160).empty() has failed
unittests/state_history_tests.cpp(751): error: in "test_state_history/test_splitted_log": check get_decompressed_entry(chain.chain_state_log, 160).empty() has failed
3030001 unlinkable_block_exception: Unlinkable block
unlinkable block 0000002e483309054b55905050dbfefd83d55bf953841c8c75f53db0543c648f previous 0000002d9554fcad49dbbc5ee8d102e487bb6ce8f1c726a18446ac792b463115
    {"id":"0000002e483309054b55905050dbfefd83d55bf953841c8c75f53db0543c648f","p":"0000002d9554fcad49dbbc5ee8d102e487bb6ce8f1c726a18446ac792b463115"}
    chain-1  controller.cpp:3905 operator()

unknown location(0): fatal error: in "test_state_history/test_fork_no_stride": std::runtime_error: Caught Unexpected Exception
libraries/testing/include/eosio/testing/tester.hpp(886): last checkpoint
3030001 unlinkable_block_exception: Unlinkable block
unlinkable block 0000002e483309054b55905050dbfefd83d55bf953841c8c75f53db0543c648f previous 0000002d9554fcad49dbbc5ee8d102e487bb6ce8f1c726a18446ac792b463115
    {"id":"0000002e483309054b55905050dbfefd83d55bf953841c8c75f53db0543c648f","p":"0000002d9554fcad49dbbc5ee8d102e487bb6ce8f1c726a18446ac792b463115"}
    chain-1  controller.cpp:3905 operator()

unknown location(0): fatal error: in "test_state_history/test_fork_with_stride1": std::runtime_error: Caught Unexpected Exception
libraries/testing/include/eosio/testing/tester.hpp(886): last checkpoint
unittests/state_history_tests.cpp(821): error: in "test_state_history/test_fork_with_stride2": unexpected exception thrown by test_fork(5, 1)
spoonincode commented 4 months ago

ship log partitioning is completely refactored on my branch; I'd suggest no one chase this problem on main

spoonincode commented 4 months ago

left my work so far in ship_unittest_v2

heifner commented 4 months ago

This is failing because under Savanna the fork it is attempting to make is not the best fork on chain1, so chain1 does not switch to the blocks pushed from chain2.

Need to update the test to create a fork that chain1 will consider better than its own fork.