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

wen_restart: correctly handle HeaviestFork received from the coordinator. #2923

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bcc98af
wen_restart: Change HeaviestFork stage to a leader based approach.
wen-coding Sep 13, 2024
0f929b3
Fix logic to calculate slots to repair, add more logs.
wen-coding Sep 13, 2024
63f2bb1
Let the leader generate snapshot and print error log before continuin…
wen-coding Sep 13, 2024
0590c8e
Filter ancestors older than root.
wen-coding Sep 14, 2024
ac5c6b1
Reduce lock scope.
wen-coding Sep 14, 2024
0a5efe8
Rename variables and functions.
wen-coding Sep 14, 2024
0545333
Make leader aggregate the heaviest fork of everyone.
wen-coding Sep 16, 2024
f719c5b
Move heaviest fork aggregation to DONE stage.
wen-coding Sep 17, 2024
6f82a36
No warning when receiving HeaviestFork from non-leader.
wen-coding Sep 17, 2024
4fdc228
Add test for receive_restart_heaviest_fork.
wen-coding Sep 17, 2024
f915803
Add test for repair_heaviest_fork.
wen-coding Sep 17, 2024
31395a7
Add test for verify_leader_heaviest_fork.
wen-coding Sep 17, 2024
9147dc9
Rename wen_restart_leader to wen_restart_coordinator.
wen-coding Sep 20, 2024
05928aa
Merge branch 'master' into wen_restart_leader_for_heaviest_fork
wen-coding Oct 8, 2024
3142433
Fix a bad merge
wen-coding Oct 8, 2024
8dfa0a3
Non-coordinator should use coodinator's (slot, hash) after verification.
wen-coding Oct 9, 2024
85ed8d1
Remove trailing whitespace.
wen-coding Oct 9, 2024
208b2c7
Merge branch 'master' into wen_restart_leader_for_heaviest_fork
wen-coding Oct 9, 2024
8ea01f7
Merge branch 'master' into wen_restart_leader_for_heaviest_fork
wen-coding Oct 17, 2024
ba540c0
Fix a bad merge
wen-coding Oct 17, 2024
2132509
Merge branch 'master' into wen_restart_leader_for_heaviest_fork
wen-coding Oct 17, 2024
21f77b6
Fix a bad merge.
wen-coding Oct 18, 2024
cda571e
Remove unnecessary changes.
wen-coding Oct 18, 2024
0ec3fc6
Make coordinator select different slot in test, wait before exiting w…
wen-coding Oct 18, 2024
e18e8f7
Add send_and_receive_heaviest_fork and test.
wen-coding Oct 18, 2024
6772287
Make the coordinator print stats every 10 seconds.
wen-coding Oct 18, 2024
a34c297
Rename variables and add comments.
wen-coding Oct 19, 2024
be7c1ed
Rename final_restart_slot/hash with my_heaviest_fork_slot/hash
wen-coding Oct 29, 2024
e7efe5c
flush_push_queue before waiting to speed things up.
wen-coding Oct 29, 2024
3fc5a4b
Merge branch 'master' into wen_restart_leader_for_heaviest_fork
wen-coding Oct 30, 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
2 changes: 1 addition & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ impl Validator {
.map_err(ValidatorError::Other)?;

if in_wen_restart {
info!("Waiting for wen_restart phase one to finish");
info!("Waiting for wen_restart to finish");
wait_for_wen_restart(WenRestartConfig {
wen_restart_path: config.wen_restart_proto_path.clone().unwrap(),
wen_restart_coordinator: config.wen_restart_coordinator.unwrap(),
Expand Down
6 changes: 4 additions & 2 deletions wen-restart/src/heaviest_fork_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ impl HeaviestForkAggregate {
})
}

pub(crate) fn block_stake_map(self) -> HashMap<(Slot, Hash), u64> {
self.block_stake_map
pub(crate) fn print_block_stake_map(&self) {
for ((slot, hash), stake) in self.block_stake_map.iter() {
info!("Slot: {}, Hash: {}, Stake: {}", slot, hash, stake,);
}
}
}

Expand Down
Loading
Loading