You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Taking a read lock on consensus_rewards can contend with the write lock in bls_sigverifier.
368
+
// We are ready to produce the block footer now, while we gather other bits of data, we can block on the consensus_rewards lock in a separate thread to minimise contention.
// consensus pool does not need votes for slots other than root slot however the rewards container may still need them.
176
182
if vote_message.vote.slot() <= root_bank.slot(){
183
+
// the only module that takes a write lock on consensus_rewards is this one and it does not take the write lock while it is verifying votes so this should never block.
184
+
ifself
185
+
.consensus_rewards
186
+
.read()
187
+
.wants_vote(root_bank.slot(),&vote_message)
188
+
{
189
+
// XXX: actually verify and send the votes. The verification and sending should happen off the critical path.
let verified_votes = self.verify_votes(votes_to_verify);
299
+
300
+
let rewards_votes = {
301
+
// the only module that takes a write lock on consensus_rewards is this one and it does not take the write lock while it is verifying votes so this should never block.
302
+
let guard = self.consensus_rewards.read();
303
+
let root_slot = self.sharable_banks.root().slot();
0 commit comments