Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
47a20d6
Save/restore Tower
mvines Apr 27, 2020
ec256c9
Avoid unwrap()
mvines May 13, 2020
5c0a2a2
Rebase cleanups
ryoqun Jun 19, 2020
524b7c9
Forcibly pass test
ryoqun Jun 19, 2020
61621e8
Correct reconcilation of votes after validator resume
ryoqun Jun 22, 2020
d986f7f
d b g
ryoqun Jun 23, 2020
9452ee1
Add more tests
ryoqun Jun 23, 2020
e06de54
fsync and fix test
ryoqun Jun 24, 2020
f8e1e3f
Add test
ryoqun Jun 25, 2020
8ea0d0a
Fix fmt
ryoqun Jun 25, 2020
6b7e34e
Debug
ryoqun Jun 26, 2020
1bc913e
Fix tests...
ryoqun Jun 26, 2020
786ee89
save
ryoqun Jun 26, 2020
75de4d3
Clarify error message and code cleaning around it
ryoqun Jun 30, 2020
438f959
Move most of code out of tower save hot codepath
ryoqun Jun 30, 2020
0aab30e
Proper comment for the lack of fsync on tower
ryoqun Jul 1, 2020
bd8b18b
Clean up
ryoqun Jul 1, 2020
5ea42ab
Clean up
ryoqun Jul 1, 2020
90b8cf1
Simpler type alias
ryoqun Jul 1, 2020
c29fc96
Manage tower-restored ancestor slots without banks
ryoqun Jul 1, 2020
f49f55f
Add comment
ryoqun Jul 1, 2020
218a82e
Extract long code blocks...
ryoqun Jul 1, 2020
b1ff021
Add comment
ryoqun Jul 1, 2020
d3bb2a4
Simplify returned tuple...
ryoqun Jul 1, 2020
5ae6ccc
Tweak too aggresive log
ryoqun Jul 1, 2020
cbb7769
Fix typo...
ryoqun Jul 6, 2020
cbb1fc5
Add test
ryoqun Jul 6, 2020
016b1f7
Update comment
ryoqun Jul 6, 2020
036251d
Improve test to require non-empty stray restored slots
ryoqun Jul 6, 2020
9c65cef
Measure tower save and dump all tower contents
ryoqun Jul 7, 2020
d1047ad
Log adjust and add threshold related assertions
ryoqun Jul 7, 2020
b326bc5
cleanup adjust
ryoqun Jul 7, 2020
8823a5d
Properly lower stray restored slots priority...
ryoqun Jul 7, 2020
3c81d8a
Rust fmt
ryoqun Jul 7, 2020
fd426fd
Fix test....
ryoqun Jul 7, 2020
8607ff0
Clarify comments a bit and add TowerError::TooNew
ryoqun Jul 9, 2020
100c88a
Further clean-up arround TowerError
ryoqun Jul 9, 2020
c6812f0
Truly create ancestors by excluding last vote slot
ryoqun Jul 9, 2020
8cbd583
Add comment for stray_restored_slots
ryoqun Jul 9, 2020
dec032b
Add comment for stray_restored_slots
ryoqun Jul 9, 2020
090c6d8
Use BTreeSet
ryoqun Jul 9, 2020
e937647
Consider root_slot into post-replay adjustment
ryoqun Jul 9, 2020
70e54d6
Tweak logging
ryoqun Jul 9, 2020
0f73733
Add test for stray_restored_ancestors
ryoqun Jul 9, 2020
f30272f
Reorder some code
ryoqun Jul 9, 2020
83e2548
Better names for unit tests
ryoqun Jul 9, 2020
fb5d4b7
Add frozen_abi to SavedTower
ryoqun Jul 9, 2020
ceca73b
Fold long lines
ryoqun Jul 9, 2020
61ec3b4
Tweak stray ancestors and too old slot history
ryoqun Jul 10, 2020
2c2f901
Re-adjust error conditon of too old slot history
ryoqun Jul 10, 2020
55295f7
Test normal ancestors is checked before stray ones
ryoqun Jul 10, 2020
3d3be65
Fix conflict, update tests, adjust behavior a bit
ryoqun Aug 3, 2020
ea46eea
Fix test
ryoqun Aug 5, 2020
5244172
Address review comments
ryoqun Aug 5, 2020
9dc9631
Last touch!
ryoqun Aug 6, 2020
1ce9b97
Immediately after creating cleaning pr
ryoqun Aug 27, 2020
696942b
Revert stray slots
ryoqun Aug 27, 2020
4cedea4
Revert comment...
ryoqun Aug 27, 2020
d320594
Report error as metrics
ryoqun Aug 27, 2020
4ce9f78
Revert not to panic! and ignore unfixable test...
ryoqun Aug 28, 2020
f182647
Normalize lockouts.root_slot more strictly
ryoqun Aug 28, 2020
148f8ff
Add comments for panic! and more assertions
ryoqun Aug 28, 2020
430ee7c
Proper initialize root without vote account
ryoqun Aug 30, 2020
0bfb822
Clarify code and comments based on review feedback
ryoqun Sep 16, 2020
49c9e77
Fix rebase
ryoqun Sep 16, 2020
dd25003
Further simplify based on assured tower root
ryoqun Sep 17, 2020
df55bfb
Reorder code for more readability
ryoqun Sep 17, 2020
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
36 changes: 36 additions & 0 deletions core/benches/consensus.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#![feature(test)]

extern crate solana_core;
extern crate test;

use solana_core::consensus::Tower;
use solana_runtime::bank::Bank;
use solana_runtime::bank_forks::BankForks;
use solana_sdk::{
pubkey::Pubkey,
signature::{Keypair, Signer},
};
use std::sync::Arc;
use tempfile::TempDir;
use test::Bencher;

#[bench]
fn bench_save_tower(bench: &mut Bencher) {
let dir = TempDir::new().unwrap();
let path = dir.path();

let vote_account_pubkey = &Pubkey::default();
let node_keypair = Arc::new(Keypair::new());
let heaviest_bank = BankForks::new(Bank::default()).working_bank();
let tower = Tower::new(
&node_keypair.pubkey(),
&vote_account_pubkey,
0,
&heaviest_bank,
&path,
);

bench.iter(move || {
tower.save(&node_keypair).unwrap();
});
}
Loading