Skip to content

Commit fd66fef

Browse files
authored
feat: add logging for InstantLock quorum lookup (#412)
Just some more logging to better understand whats going on in case of failures. There are still some cases somtimes where IS verification fails.
1 parent ad3f0e9 commit fd66fef

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

dash/src/sml/masternode_list_engine/message_request_verification.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,28 @@ impl MasternodeListEngine {
1616
// Retrieve the cycle hash from the Instant Lock
1717
let cycle_hash = instant_lock.cyclehash;
1818

19+
log::debug!("IS lock verification - cyclehash from InstantLock: {}", cycle_hash);
20+
log::debug!(
21+
"Available cycle hashes in rotated_quorums_per_cycle: {:?}",
22+
self.rotated_quorums_per_cycle.keys().collect::<Vec<_>>()
23+
);
24+
1925
// Get the list of quorums associated with this cycle hash
2026
let quorums = self
2127
.rotated_quorums_per_cycle
2228
.get(&cycle_hash)
2329
.ok_or(MessageVerificationError::CycleHashNotPresent(cycle_hash))?;
2430

31+
log::debug!("Found {} quorums for cyclehash {}", quorums.len(), cycle_hash);
32+
for q in quorums.iter() {
33+
log::debug!(
34+
" Quorum: hash={}, index={:?}, height at block_container={:?}",
35+
q.quorum_entry.quorum_hash,
36+
q.quorum_entry.quorum_index,
37+
self.block_container.get_height(&q.quorum_entry.quorum_hash)
38+
);
39+
}
40+
2541
// Ensure that at least one quorum exists for this cycle
2642
if quorums.is_empty() {
2743
return Err(MessageVerificationError::CycleHashEmpty(cycle_hash));

dash/src/sml/masternode_list_engine/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,12 @@ impl MasternodeListEngine {
690690
});
691691

692692
for mut rotated_quorum in qualified_last_commitment_per_index {
693+
log::debug!(
694+
" Current cycle quorum: hash={}, index={:?}",
695+
rotated_quorum.quorum_entry.quorum_hash,
696+
rotated_quorum.quorum_entry.quorum_index
697+
);
698+
693699
rotated_quorum.verified = validation_statuses
694700
.get(&rotated_quorum.quorum_entry.quorum_hash)
695701
.cloned()

0 commit comments

Comments
 (0)