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: Fixes for IF to advance LIB #2105

Merged
merged 17 commits into from
Jan 19, 2024
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Jan 18, 2024

New integration test that verifies that LIB advances on all nodes under instant-finality.

Fixes for instant-finality:

  • Fix vote message processing in net_plugin
  • Add missing strong serialization in vote message.
  • Update fork_database block_state implementation to use core.last_final_block_num for irreversible_blocknum()
  • Update LIB according to vote processing.
  • Vote when we produce a block.

Reviewers: Pay close attention to validation logic for qc_info. Not sure this is the best way to handle block validation with qc_info.

Works: ./tests/nodeos_lib_test.py -n 4 -p 3 -s mesh --activate-if --keep-logs -v
Works: ./tests/nodeos_lib_test.py -n 4 -p 3 -s ring --activate-if --keep-logs -v

Resolves #2100

@heifner heifner marked this pull request as ready for review January 18, 2024 15:53
libraries/chain/block_header_state.cpp Show resolved Hide resolved
libraries/chain/block_header_state.cpp Show resolved Hide resolved
libraries/chain/controller.cpp Show resolved Hide resolved
libraries/chain/controller.cpp Outdated Show resolved Hide resolved
return my->block_data.aggregate_vote(vote);
auto [valid, new_lib] = my->block_data.aggregate_vote(vote);
if (new_lib) {
my->if_irreversible_block_num = *new_lib;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to call log_irreversible here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We db.commit() in log_irreversible, so don't want that called from net thread.

libraries/chain/block_state.cpp Show resolved Hide resolved
libraries/chain/block_state.cpp Show resolved Hide resolved
libraries/chain/block_state.cpp Show resolved Hide resolved
libraries/chain/controller.cpp Show resolved Hide resolved
libraries/chain/controller.cpp Show resolved Hide resolved
@heifner heifner merged commit cf7a3c6 into hotstuff_integration Jan 19, 2024
26 checks passed
@heifner heifner deleted the GH-2100-if-lib-advance branch January 19, 2024 13:09
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: TEST
summary: Test to ensure LIB advances.
Note: end

@heifner heifner added the OCI Work exclusive to OCI team label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IF: Update integration test that checks LIB advances after IF transition
4 participants