Compare commits
8 Commits
fix_bank_u
...
v0.22.0
Author | SHA1 | Date | |
---|---|---|---|
b878002cf5 | |||
f111250e3b | |||
3d91f650db | |||
91a88cda6a | |||
2128c17ed0 | |||
7b819c9b74 | |||
eec5c661af | |||
0398f6b87a |
@ -42,10 +42,6 @@ solana-gossip --entrypoint testnet.solana.com:8001 spy
|
|||||||
If your machine has a GPU with CUDA installed \(Linux-only currently\), include
|
If your machine has a GPU with CUDA installed \(Linux-only currently\), include
|
||||||
the `--cuda` argument to `solana-validator`.
|
the `--cuda` argument to `solana-validator`.
|
||||||
|
|
||||||
```bash
|
|
||||||
export SOLANA_CUDA=1
|
|
||||||
```
|
|
||||||
|
|
||||||
When your validator is started look for the following log message to indicate
|
When your validator is started look for the following log message to indicate
|
||||||
that CUDA is enabled: `"[<timestamp> solana::validator] CUDA is enabled"`
|
that CUDA is enabled: `"[<timestamp> solana::validator] CUDA is enabled"`
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ steps:
|
|||||||
timeout_in_minutes: 30
|
timeout_in_minutes: 30
|
||||||
- command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/test-stable.sh"
|
- command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/test-stable.sh"
|
||||||
name: "stable"
|
name: "stable"
|
||||||
timeout_in_minutes: 40
|
timeout_in_minutes: 60
|
||||||
artifact_paths: "log-*.txt"
|
artifact_paths: "log-*.txt"
|
||||||
- command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/test-move.sh"
|
- command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/test-move.sh"
|
||||||
name: "move"
|
name: "move"
|
||||||
|
@ -446,7 +446,7 @@ pub fn process_show_block_production(
|
|||||||
first_slot_in_epoch
|
first_slot_in_epoch
|
||||||
};
|
};
|
||||||
let start_slot_index = (start_slot - first_slot_in_epoch) as usize;
|
let start_slot_index = (start_slot - first_slot_in_epoch) as usize;
|
||||||
let end_slot_index = (end_slot - start_slot) as usize;
|
let end_slot_index = (end_slot - first_slot_in_epoch) as usize;
|
||||||
|
|
||||||
let progress_bar = new_spinner_progress_bar();
|
let progress_bar = new_spinner_progress_bar();
|
||||||
progress_bar.set_message(&format!(
|
progress_bar.set_message(&format!(
|
||||||
@ -458,9 +458,9 @@ pub fn process_show_block_production(
|
|||||||
let total_slots = end_slot_index - start_slot_index + 1;
|
let total_slots = end_slot_index - start_slot_index + 1;
|
||||||
let total_blocks = confirmed_blocks.len();
|
let total_blocks = confirmed_blocks.len();
|
||||||
assert!(total_blocks <= total_slots);
|
assert!(total_blocks <= total_slots);
|
||||||
let total_slots_missed = total_slots - total_blocks;
|
let total_slots_skipped = total_slots - total_blocks;
|
||||||
let mut leader_slot_count = HashMap::new();
|
let mut leader_slot_count = HashMap::new();
|
||||||
let mut leader_missed_slots = HashMap::new();
|
let mut leader_skipped_slots = HashMap::new();
|
||||||
|
|
||||||
progress_bar.set_message(&format!("Fetching leader schedule for epoch {}...", epoch));
|
progress_bar.set_message(&format!("Fetching leader schedule for epoch {}...", epoch));
|
||||||
let leader_schedule = rpc_client
|
let leader_schedule = rpc_client
|
||||||
@ -482,7 +482,7 @@ pub fn process_show_block_production(
|
|||||||
|
|
||||||
progress_bar.set_message(&format!(
|
progress_bar.set_message(&format!(
|
||||||
"Processing {} slots containing {} blocks and {} empty slots...",
|
"Processing {} slots containing {} blocks and {} empty slots...",
|
||||||
total_slots, total_blocks, total_slots_missed
|
total_slots, total_blocks, total_slots_skipped
|
||||||
));
|
));
|
||||||
|
|
||||||
let mut confirmed_blocks_index = 0;
|
let mut confirmed_blocks_index = 0;
|
||||||
@ -491,7 +491,7 @@ pub fn process_show_block_production(
|
|||||||
let slot = start_slot + slot_index as u64;
|
let slot = start_slot + slot_index as u64;
|
||||||
let slot_count = leader_slot_count.entry(leader).or_insert(0);
|
let slot_count = leader_slot_count.entry(leader).or_insert(0);
|
||||||
*slot_count += 1;
|
*slot_count += 1;
|
||||||
let missed_slots = leader_missed_slots.entry(leader).or_insert(0);
|
let skipped_slots = leader_skipped_slots.entry(leader).or_insert(0);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
if !confirmed_blocks.is_empty() {
|
if !confirmed_blocks.is_empty() {
|
||||||
@ -506,9 +506,9 @@ pub fn process_show_block_production(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*missed_slots += 1;
|
*skipped_slots += 1;
|
||||||
individual_slot_status.push(
|
individual_slot_status.push(
|
||||||
style(format!(" {:<15} {:<44} MISSED", slot, leader))
|
style(format!(" {:<15} {:<44} SKIPPED", slot, leader))
|
||||||
.red()
|
.red()
|
||||||
.to_string(),
|
.to_string(),
|
||||||
);
|
);
|
||||||
@ -524,23 +524,23 @@ pub fn process_show_block_production(
|
|||||||
"Identity Pubkey",
|
"Identity Pubkey",
|
||||||
"Leader Slots",
|
"Leader Slots",
|
||||||
"Blocks Produced",
|
"Blocks Produced",
|
||||||
"Missed Slots",
|
"Skipped Slots",
|
||||||
"Missed Block Percentage",
|
"Skipped Slot Percentage",
|
||||||
))
|
))
|
||||||
.bold()
|
.bold()
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut table = vec![];
|
let mut table = vec![];
|
||||||
for (leader, leader_slots) in leader_slot_count.iter() {
|
for (leader, leader_slots) in leader_slot_count.iter() {
|
||||||
let missed_slots = leader_missed_slots.get(leader).unwrap();
|
let skipped_slots = leader_skipped_slots.get(leader).unwrap();
|
||||||
let blocks_produced = leader_slots - missed_slots;
|
let blocks_produced = leader_slots - skipped_slots;
|
||||||
table.push(format!(
|
table.push(format!(
|
||||||
" {:<44} {:>15} {:>15} {:>15} {:>22.2}%",
|
" {:<44} {:>15} {:>15} {:>15} {:>22.2}%",
|
||||||
leader,
|
leader,
|
||||||
leader_slots,
|
leader_slots,
|
||||||
blocks_produced,
|
blocks_produced,
|
||||||
missed_slots,
|
skipped_slots,
|
||||||
*missed_slots as f64 / *leader_slots as f64 * 100.
|
*skipped_slots as f64 / *leader_slots as f64 * 100.
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
table.sort();
|
table.sort();
|
||||||
@ -551,8 +551,8 @@ pub fn process_show_block_production(
|
|||||||
format!("Epoch {} total:", epoch),
|
format!("Epoch {} total:", epoch),
|
||||||
total_slots,
|
total_slots,
|
||||||
total_blocks,
|
total_blocks,
|
||||||
total_slots_missed,
|
total_slots_skipped,
|
||||||
total_slots_missed as f64 / total_slots as f64 * 100.
|
total_slots_skipped as f64 / total_slots as f64 * 100.
|
||||||
);
|
);
|
||||||
println!(
|
println!(
|
||||||
" (using data from {} slots: {} to {})",
|
" (using data from {} slots: {} to {})",
|
||||||
|
@ -58,8 +58,7 @@ pub const BATCH_FOUR_STAKER_INFOS: &[StakerInfo] = &[
|
|||||||
},
|
},
|
||||||
StakerInfo {
|
StakerInfo {
|
||||||
name: "unbecoming silver",
|
name: "unbecoming silver",
|
||||||
// TODO: staker: "42yapY7Vrs5jqht9TCKsPoyb4vDFYcPfRkqAP85NSAQ", WrongSize
|
staker: "42yapY7Vrs5jqht9TCKZsPoyb4vDFYcPfRkqAP85NSAQ",
|
||||||
staker: "GS7RFm4nrxzYGcPTmu1otzHzZbURWDKuxo2L4AQDvTg2",
|
|
||||||
sol: 28_800.0,
|
sol: 28_800.0,
|
||||||
},
|
},
|
||||||
StakerInfo {
|
StakerInfo {
|
||||||
|
@ -560,7 +560,14 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("bounds")
|
SubCommand::with_name("bounds")
|
||||||
.about("Print lowest and highest non-empty slots. Note: This ignores gaps in slots")
|
.about("Print lowest and highest non-empty slots. Note that there may be empty slots within the bounds")
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("all")
|
||||||
|
.long("all")
|
||||||
|
.takes_value(false)
|
||||||
|
.required(false)
|
||||||
|
.help("Additionally print all the non-empty slots within the bounds"),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("json")
|
SubCommand::with_name("json")
|
||||||
@ -845,30 +852,34 @@ fn main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
("bounds", _) => match open_blocktree(&ledger_path).slot_meta_iterator(0) {
|
("bounds", Some(args_matches)) => {
|
||||||
Ok(metas) => {
|
match open_blocktree(&ledger_path).slot_meta_iterator(0) {
|
||||||
println!("Collecting Ledger information...");
|
Ok(metas) => {
|
||||||
let slots: Vec<_> = metas.map(|(slot, _)| slot).collect();
|
let all = args_matches.is_present("all");
|
||||||
if slots.is_empty() {
|
|
||||||
println!("Ledger is empty. No slots found.");
|
println!("Collecting Ledger information...");
|
||||||
} else {
|
let slots: Vec<_> = metas.map(|(slot, _)| slot).collect();
|
||||||
let first = slots.first().unwrap();
|
if slots.is_empty() {
|
||||||
let last = slots.last().unwrap_or_else(|| first);
|
println!("Ledger is empty. No slots found.");
|
||||||
if first != last {
|
|
||||||
println!(
|
|
||||||
"Ledger contains some data for slots {:?} to {:?}",
|
|
||||||
first, last
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
println!("Ledger only contains some data for slot {:?}", first);
|
let first = slots.first().unwrap();
|
||||||
|
let last = slots.last().unwrap_or_else(|| first);
|
||||||
|
if first != last {
|
||||||
|
println!("Ledger contains data from slots {:?} to {:?}", first, last);
|
||||||
|
if all {
|
||||||
|
println!("Non-empty slots: {:?}", slots);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
println!("Ledger only contains some data for slot {:?}", first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Err(err) => {
|
||||||
|
eprintln!("Unable to read the Ledger: {:?}", err);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Err(err) => {
|
}
|
||||||
eprintln!("Unable to read the Ledger: {:?}", err);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
("analyze-storage", _) => match analyze_storage(&open_database(&ledger_path)) {
|
("analyze-storage", _) => match analyze_storage(&open_database(&ledger_path)) {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
println!("Ok.");
|
println!("Ok.");
|
||||||
|
@ -279,7 +279,7 @@ pub fn process_blocktree(
|
|||||||
|
|
||||||
// Setup bank for slot 0
|
// Setup bank for slot 0
|
||||||
let bank0 = Arc::new(Bank::new_with_paths(&genesis_config, account_paths));
|
let bank0 = Arc::new(Bank::new_with_paths(&genesis_config, account_paths));
|
||||||
info!("processing ledger for bank 0...");
|
info!("processing ledger for slot 0...");
|
||||||
process_bank_0(&bank0, blocktree, &opts)?;
|
process_bank_0(&bank0, blocktree, &opts)?;
|
||||||
process_blocktree_from_root(genesis_config, blocktree, bank0, &opts)
|
process_blocktree_from_root(genesis_config, blocktree, bank0, &opts)
|
||||||
}
|
}
|
||||||
@ -291,7 +291,7 @@ pub fn process_blocktree_from_root(
|
|||||||
bank: Arc<Bank>,
|
bank: Arc<Bank>,
|
||||||
opts: &ProcessOptions,
|
opts: &ProcessOptions,
|
||||||
) -> result::Result<(BankForks, Vec<BankForksInfo>, LeaderScheduleCache), BlocktreeProcessorError> {
|
) -> result::Result<(BankForks, Vec<BankForksInfo>, LeaderScheduleCache), BlocktreeProcessorError> {
|
||||||
info!("processing ledger from root: {}...", bank.slot());
|
info!("processing ledger from root slot {}...", bank.slot());
|
||||||
// Starting slot must be a root, and thus has no parents
|
// Starting slot must be a root, and thus has no parents
|
||||||
assert!(bank.parent().is_none());
|
assert!(bank.parent().is_none());
|
||||||
let start_slot = bank.slot();
|
let start_slot = bank.slot();
|
||||||
@ -304,7 +304,7 @@ pub fn process_blocktree_from_root(
|
|||||||
|
|
||||||
blocktree
|
blocktree
|
||||||
.set_roots(&[start_slot])
|
.set_roots(&[start_slot])
|
||||||
.expect("Couldn't set root on startup");
|
.expect("Couldn't set root slot on startup");
|
||||||
|
|
||||||
let meta = blocktree.meta(start_slot).unwrap();
|
let meta = blocktree.meta(start_slot).unwrap();
|
||||||
|
|
||||||
@ -510,7 +510,7 @@ fn process_pending_slots(
|
|||||||
let (slot, meta, bank, last_entry_hash) = pending_slots.pop().unwrap();
|
let (slot, meta, bank, last_entry_hash) = pending_slots.pop().unwrap();
|
||||||
|
|
||||||
if last_status_report.elapsed() > Duration::from_secs(2) {
|
if last_status_report.elapsed() > Duration::from_secs(2) {
|
||||||
info!("processing ledger...block {}", slot);
|
info!("processing ledger...slot {}", slot);
|
||||||
last_status_report = Instant::now();
|
last_status_report = Instant::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ thiserror = "1.0"
|
|||||||
ed25519-dalek = { version = "=1.0.0-pre.1", optional = true }
|
ed25519-dalek = { version = "=1.0.0-pre.1", optional = true }
|
||||||
solana-crate-features = { path = "../crate-features", version = "0.22.0", optional = true }
|
solana-crate-features = { path = "../crate-features", version = "0.22.0", optional = true }
|
||||||
solana-logger = { path = "../logger", version = "0.22.0", optional = true }
|
solana-logger = { path = "../logger", version = "0.22.0", optional = true }
|
||||||
solana-sdk-macro = { path = "macro" }
|
solana-sdk-macro = { path = "macro", version = "0.22.0" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tiny-bip39 = "0.6.2"
|
tiny-bip39 = "0.6.2"
|
||||||
|
Reference in New Issue
Block a user