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: accumulate the weight in vote calculation #2131

Merged
merged 9 commits into from
Jan 30, 2024

Conversation

linh2931
Copy link
Member

Currently in the weak and strong vote calculations, it is assuming they are all of equal weight. It needs to refer to the weights in the finalizer policy to determine how to accumulate the weight.

Resolved #2084

@linh2931 linh2931 requested review from greg7mdp and heifner January 24, 2024 16:02
@linh2931 linh2931 linked an issue Jan 24, 2024 that may be closed by this pull request
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: When checking if quorum has been reached, use the finalizer policy to determine how to accumulate vote weights.
Note: end

@linh2931 linh2931 requested a review from greg7mdp January 30, 2024 01:59
@@ -96,7 +191,7 @@ BOOST_AUTO_TEST_CASE(verify_qc_test) try {
digest_type strong_digest(fc::sha256("0000000000000000000000000000002"));
std::vector<uint8_t> strong_digest_data(strong_digest.data(), strong_digest.data() + strong_digest.data_size());
digest_type weak_digest(fc::sha256("0000000000000000000000000000003"));
std::vector<uint8_t> weak_digest_data(weak_digest.data(), weak_digest.data() + weak_digest.data_size());
std::vector<uint8_t> weak_digest_data(weak_digest.data(), weak_digest.data() + weak_digest. data_size());
Copy link
Contributor

Choose a reason for hiding this comment

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

the spaces after weak_digest. seem to be a mistake.

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 for noticing this!

@heifner
Copy link
Member

heifner commented Jan 30, 2024

Not related to your changes, but looks like we have a real issue with this test: producer_schedule_if_unit_test_eos-vm (SEGFAULT). I have seen it fail a number of times on recent runs.

@linh2931 linh2931 requested review from greg7mdp and heifner January 30, 2024 14:57
@linh2931 linh2931 merged commit d8553e5 into hotstuff_integration Jan 30, 2024
26 checks passed
@linh2931 linh2931 deleted the accumulate_vote_weight branch January 30, 2024 17:43
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: accumulated weight calculation
4 participants