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: Consider voting immediately if final on strong qc is validated #2290

Merged
merged 24 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ac27a5e
GH-2125 Consider voting on block if its final_on_strong_qc_block_ref …
heifner Mar 6, 2024
2329a5f
GH-2125 Add and use fetch_bsp
heifner Mar 7, 2024
389edb7
GH-2125 Add additional logging
heifner Mar 7, 2024
33fb779
GH-2125 Add additional logging
heifner Mar 7, 2024
e2b7c3c
Merge remote-tracking branch 'origin/hotstuff_integration' into GH-21…
heifner Mar 8, 2024
febdebb
GH-2125 Add additional logging
heifner Mar 8, 2024
51713a2
GH-2125 Add additional logging
heifner Mar 8, 2024
ca3bc66
GH-2125 Add additional logging
heifner Mar 8, 2024
88451b4
GH-2125 Add additional logging
heifner Mar 8, 2024
27f2557
GH-2125 Fixed qc_claim comparison in block_header_state is_needed(qc_…
heifner Mar 8, 2024
ae5d26d
GH-2125 Rename proposal to block. Add additional logging.
heifner Mar 9, 2024
c845044
GH-2125 Don't log monotony check failure when we are just seeing if w…
heifner Mar 9, 2024
2d18225
GH-2125 Fix maybe_switch_forks to eval best fork branch
heifner Mar 9, 2024
9ce8229
GH-2125 Compensate for emit of irreversible before fork db is udpated
heifner Mar 9, 2024
5d9faff
GH-2125 Make test more robust and allow for multiple fork switches
heifner Mar 9, 2024
00d8ccf
GH-2125 Improve test robustness
heifner Mar 9, 2024
fdeb7fc
GH-2125 If we have the block in our dispatcher list then it is applied
heifner Mar 9, 2024
68f9ee1
GH-2125 Access block number regardless of transaction status type
heifner Mar 9, 2024
6970482
GH-2125 Call getTransactionStatus after getInfo as LIB can move betwe…
heifner Mar 9, 2024
9fbfb3f
GH-2125 Remove redundant getInfo
heifner Mar 9, 2024
bb53cc1
GH-2125 Cleanup logging
heifner Mar 9, 2024
9839b8e
GH-2125 Optimize update_chain_info()
heifner Mar 10, 2024
cac3bf7
GH-2125 Remove unused
heifner Mar 11, 2024
b267c37
Merge remote-tracking branch 'origin/hotstuff_integration' into GH-21…
heifner Mar 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3473,14 +3473,13 @@ struct controller_impl {
void consider_voting(const block_state_ptr& bsp) {
// 1. Get the `core.final_on_strong_qc_block_num` for the block you are considering to vote on and use that to find the actual block ID
// of the ancestor block that has that block number.
// 2. If that block ID is not an ancestor of the current head block, then do not vote for that block.
// 2. If that block ID is for a non validated block, then do not vote for that block.
// 3. Otherwise, consider voting for that block according to the decide_vote rules.

if (bsp->core.final_on_strong_qc_block_num > 0) {
greg7mdp marked this conversation as resolved.
Show resolved Hide resolved
const auto& final_on_strong_qc_block_ref = bsp->core.get_block_reference(bsp->core.final_on_strong_qc_block_num);
auto final = fetch_bsp_on_head_branch_by_num(final_on_strong_qc_block_ref.block_num());
if (final) {
assert(final->is_valid()); // if found on head branch then it must be validated
auto final = fetch_bsp_on_branch_by_num(final_on_strong_qc_block_ref.block_id, bsp->core.final_on_strong_qc_block_num);
greg7mdp marked this conversation as resolved.
Show resolved Hide resolved
if (final && final->is_valid()) {
create_and_send_vote_msg(bsp);
}
}
Expand Down
Loading