File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
11
11
12
12
## Changed
13
13
14
+ # [ 3.1.0.0.2.1]
15
+
16
+ ## Added
17
+
18
+ ## Changed
19
+
20
+ - Prevent old reward cycle signers from processing block validation response messages that do not apply to blocks from their cycle.
21
+
14
22
## [ 3.1.0.0.2.0]
15
23
16
24
## Added
Original file line number Diff line number Diff line change @@ -564,6 +564,14 @@ impl Signer {
564
564
// For mutability reasons, we need to take the block_info out of the map and add it back after processing
565
565
let mut block_info = match self . signer_db . block_lookup ( & signer_signature_hash) {
566
566
Ok ( Some ( block_info) ) => {
567
+ if block_info. reward_cycle != self . reward_cycle {
568
+ // We are not signing for this reward cycle. Ignore the block.
569
+ debug ! (
570
+ "{self}: Received a block validation response for a different reward cycle. Ignore it." ;
571
+ "requested_reward_cycle" => block_info. reward_cycle,
572
+ ) ;
573
+ return None ;
574
+ }
567
575
if block_info. is_locally_finalized ( ) {
568
576
debug ! ( "{self}: Received block validation for a block that is already marked as {}. Ignoring..." , block_info. state) ;
569
577
return None ;
@@ -635,6 +643,14 @@ impl Signer {
635
643
}
636
644
let mut block_info = match self . signer_db . block_lookup ( & signer_signature_hash) {
637
645
Ok ( Some ( block_info) ) => {
646
+ if block_info. reward_cycle != self . reward_cycle {
647
+ // We are not signing for this reward cycle. Ignore the block.
648
+ debug ! (
649
+ "{self}: Received a block validation response for a different reward cycle. Ignore it." ;
650
+ "requested_reward_cycle" => block_info. reward_cycle,
651
+ ) ;
652
+ return None ;
653
+ }
638
654
if block_info. is_locally_finalized ( ) {
639
655
debug ! ( "{self}: Received block validation for a block that is already marked as {}. Ignoring..." , block_info. state) ;
640
656
return None ;
You can’t perform that action at this time.
0 commit comments