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

Rename block_header_state and block_state to block_header_state_legacy and block_state_legacy in preparation for Instant Fininality #1951

Merged
merged 5 commits into from
Dec 6, 2023

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Dec 5, 2023

In preparation of Instant Finality work,

  • Renamed structs block_header_state to block_header_state_legacy, block_header_state_ptr to block_header_state_legacy_ptr, block_state to block_state_legacy, and block_state_ptr to block_state_legacy_ptr;
  • Moved block_header_state.{hpp,cpp} to block_header_state_legacy.{hpp,cpp}, and block_state.{hpp,cpp} to block_state_legacy.{hpp,cpp};
  • Updated snapshot handling

Resolved #1940

Copy link
Contributor

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

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

Hey, Lin, sorry you had to redo the work in a new branch. I really feel it is for the best and will make our life easier in the future. Thanks!

libraries/chain/block_state_legacy.cpp Outdated Show resolved Hide resolved
libraries/chain/include/eosio/chain/block_state_legacy.hpp Outdated Show resolved Hide resolved
libraries/chain/include/eosio/chain/block_state_legacy.hpp Outdated Show resolved Hide resolved
@linh2931
Copy link
Member Author

linh2931 commented Dec 6, 2023

Hey, Lin, sorry you had to redo the work in a new branch. I really feel it is for the best and will make our life easier in the future. Thanks!

No problem. Happy it is the best for our work!

signal<void(const block_state_ptr&)> irreversible_block;
signal<void(const block_state_legacy_ptr&)> accepted_block_header;
signal<void(const block_state_legacy_ptr&)> accepted_block;
signal<void(const block_state_legacy_ptr&)> irreversible_block;
Copy link
Member

Choose a reason for hiding this comment

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

This is unfortunate. In hotstuff_integration branch this will need to be a std::variant of the two types.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, I think we should change these signals to signal signed_block_ptr, block_id instead of block_state_legacy_ptr. I think that should be done either in main and merged to hotstuff_integration or done in hotstuff_integration.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we do this in hotstuff_integration after merging main into it, as you have approved the PR?

Copy link
Member

Choose a reason for hiding this comment

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

Should not be part of this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Although, third-party plugins would need to be updated after this is merged. No third-party plugins will be impacted until 6.0 release. Before then, this will have to change one way or another anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I will go ahead merging this into main in 2 hours.

@linh2931 linh2931 merged commit 85c9c92 into main Dec 6, 2023
29 checks passed
@linh2931 linh2931 deleted the rename_block_state branch December 6, 2023 18:56
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.

Rename existing block_header_state and block_state to block_header_state_legacy and block_state_legacy
3 participants