Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF: Add new snapshot version to hold consensus hotstuff state #2297

Merged
merged 22 commits into from
Mar 11, 2024

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Mar 9, 2024

Resolves #1558.

Add new snapshot version (V7) to support storing the new chain_head, which can be either a block_state_legacy (pre IF transition) or a block_state (post IF transition).

@greg7mdp greg7mdp linked an issue Mar 9, 2024 that may be closed by this pull request
libraries/chain/include/eosio/chain/block_state.hpp Outdated Show resolved Hide resolved
libraries/chain/controller.cpp Outdated Show resolved Hide resolved
libraries/chain/include/eosio/chain/snapshot_detail.hpp Outdated Show resolved Hide resolved
libraries/chain/include/eosio/chain/snapshot_detail.hpp Outdated Show resolved Hide resolved
unittests/snapshot_tests.cpp Outdated Show resolved Hide resolved
tests/ship_streamer_test.py Outdated Show resolved Hide resolved
@greg7mdp greg7mdp requested a review from linh2931 March 9, 2024 23:17
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: Add new, v7, snapshot version to support changes from faster finality.
Note:end

Snapshot conversion to json was crashing because forkdb `head` was empty.
It is nicer to have them printed before `index` in `gdb`
.activated_protocol_features = std::move(sbs.activated_protocol_features),
.core = std::move(sbs.core),
.proposal_mtree = std::move(sbs.proposal_mtree),
.finality_mtree = std::move(sbs.finality_mtree),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will not have proposal_mtree and finality_mtree after #2080. You don't need to add them here or we can remove them after #2080 is resolved.

// 4. edit `unittests/snapshots/CMakeLists.txt` and add the `configure_file` commands for the 3 new files.
// now the test should pass.
// 5. add the 3 new snapshot files in git.
// -------------------------------------------------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have this instruction!

@@ -150,8 +150,9 @@ set_property(TEST ship_if_test PROPERTY LABELS nonparallelizable_tests)

add_test(NAME ship_streamer_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ship_streamer_test PROPERTY LABELS long_running_tests)
add_test(NAME ship_streamer_if_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 --activate-if ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ship_streamer_if_test PROPERTY LABELS long_running_tests)
# uncomment after https://github.com/AntelopeIO/leap/issues/2285 implemented
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note in 2285 to uncomment this so we won't forget.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already done :-)!

@greg7mdp greg7mdp merged commit 12f21e9 into hotstuff_integration Mar 11, 2024
30 checks passed
@greg7mdp greg7mdp deleted the gh_1558 branch March 11, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: Add new snapshot version to hold consensus Savanna state
4 participants