@@ -44,19 +44,15 @@ use polkadot_node_subsystem::{
44
44
SubsystemContext , SubsystemError , SubsystemResult , SubsystemSender ,
45
45
} ;
46
46
use polkadot_node_subsystem_util:: {
47
- request_claim_queue, request_node_features, request_persisted_validation_data,
48
- request_session_index_for_child, request_validation_code_hash, request_validators,
49
- runtime:: ClaimQueueSnapshot ,
47
+ request_claim_queue, request_persisted_validation_data, request_session_index_for_child,
48
+ request_validation_code_hash, request_validators, runtime:: ClaimQueueSnapshot ,
50
49
} ;
51
50
use polkadot_primitives:: {
52
- collator_signature_payload, node_features:: FeatureIndex , transpose_claim_queue,
53
- CandidateCommitments , CandidateDescriptor , CandidateDescriptorV2 ,
54
- CandidateReceiptV2 as CandidateReceipt , CollatorPair , CommittedCandidateReceiptV2 , CoreIndex ,
55
- Hash , Id as ParaId , OccupiedCoreAssumption , PersistedValidationData , SessionIndex ,
56
- TransposedClaimQueue , ValidationCodeHash ,
51
+ transpose_claim_queue, CandidateCommitments , CandidateDescriptorV2 ,
52
+ CommittedCandidateReceiptV2 , CoreIndex , Hash , Id as ParaId , OccupiedCoreAssumption ,
53
+ PersistedValidationData , SessionIndex , TransposedClaimQueue , ValidationCodeHash ,
57
54
} ;
58
55
use schnellru:: { ByLength , LruMap } ;
59
- use sp_core:: crypto:: Pair ;
60
56
use std:: { collections:: HashSet , sync:: Arc } ;
61
57
62
58
mod error;
@@ -229,11 +225,9 @@ impl CollationGenerationSubsystem {
229
225
230
226
construct_and_distribute_receipt (
231
227
collation,
232
- config. key . clone ( ) ,
233
228
ctx. sender ( ) ,
234
229
result_sender,
235
230
& mut self . metrics ,
236
- session_info. v2_receipts ,
237
231
& transpose_claim_queue ( claim_queue) ,
238
232
)
239
233
. await ?;
@@ -441,11 +435,9 @@ impl CollationGenerationSubsystem {
441
435
core_index : descriptor_core_index,
442
436
session_index,
443
437
} ,
444
- task_config. key . clone ( ) ,
445
438
& mut task_sender,
446
439
result_sender,
447
440
& metrics,
448
- session_info. v2_receipts ,
449
441
& transposed_claim_queue,
450
442
)
451
443
. await
@@ -484,7 +476,6 @@ impl<Context> CollationGenerationSubsystem {
484
476
485
477
#[ derive( Clone ) ]
486
478
struct PerSessionInfo {
487
- v2_receipts : bool ,
488
479
n_validators : usize ,
489
480
}
490
481
@@ -508,16 +499,7 @@ impl SessionInfoCache {
508
499
let n_validators =
509
500
request_validators ( relay_parent, & mut sender. clone ( ) ) . await . await ??. len ( ) ;
510
501
511
- let node_features =
512
- request_node_features ( relay_parent, session_index, sender) . await . await ??;
513
-
514
- let info = PerSessionInfo {
515
- v2_receipts : node_features
516
- . get ( FeatureIndex :: CandidateReceiptV2 as usize )
517
- . map ( |b| * b)
518
- . unwrap_or ( false ) ,
519
- n_validators,
520
- } ;
502
+ let info = PerSessionInfo { n_validators } ;
521
503
self . 0 . insert ( session_index, info) ;
522
504
Ok ( self . 0 . get ( & session_index) . expect ( "Just inserted" ) . clone ( ) )
523
505
}
@@ -538,11 +520,9 @@ struct PreparedCollation {
538
520
/// which is distributed to validators.
539
521
async fn construct_and_distribute_receipt (
540
522
collation : PreparedCollation ,
541
- key : CollatorPair ,
542
523
sender : & mut impl overseer:: CollationGenerationSenderTrait ,
543
524
result_sender : Option < oneshot:: Sender < CollationSecondedSignal > > ,
544
525
metrics : & Metrics ,
545
- v2_receipts : bool ,
546
526
transposed_claim_queue : & TransposedClaimQueue ,
547
527
) -> Result < ( ) > {
548
528
let PreparedCollation {
@@ -579,14 +559,6 @@ async fn construct_and_distribute_receipt(
579
559
580
560
let pov_hash = pov. hash ( ) ;
581
561
582
- let signature_payload = collator_signature_payload (
583
- & relay_parent,
584
- & para_id,
585
- & persisted_validation_data_hash,
586
- & pov_hash,
587
- & validation_code_hash,
588
- ) ;
589
-
590
562
let erasure_root = erasure_root ( n_validators, validation_data, pov. clone ( ) ) ?;
591
563
592
564
let commitments = CandidateCommitments {
@@ -598,7 +570,7 @@ async fn construct_and_distribute_receipt(
598
570
hrmp_watermark : collation. hrmp_watermark ,
599
571
} ;
600
572
601
- let receipt = if v2_receipts {
573
+ let receipt = {
602
574
let ccr = CommittedCandidateReceiptV2 {
603
575
descriptor : CandidateDescriptorV2 :: new (
604
576
para_id,
@@ -618,31 +590,6 @@ async fn construct_and_distribute_receipt(
618
590
. map_err ( Error :: CandidateReceiptCheck ) ?;
619
591
620
592
ccr. to_plain ( )
621
- } else {
622
- if !commitments. ump_signals ( ) . map_err ( Error :: CandidateReceiptCheck ) ?. is_empty ( ) {
623
- gum:: warn!(
624
- target: LOG_TARGET ,
625
- ?pov_hash,
626
- ?relay_parent,
627
- para_id = %para_id,
628
- "Candidate commitments contain UMP signal without v2 receipts being enabled." ,
629
- ) ;
630
- }
631
- CandidateReceipt {
632
- commitments_hash : commitments. hash ( ) ,
633
- descriptor : CandidateDescriptor {
634
- signature : key. sign ( & signature_payload) ,
635
- para_id,
636
- relay_parent,
637
- collator : key. public ( ) ,
638
- persisted_validation_data_hash,
639
- pov_hash,
640
- erasure_root,
641
- para_head : commitments. head_data . hash ( ) ,
642
- validation_code_hash,
643
- }
644
- . into ( ) ,
645
- }
646
593
} ;
647
594
648
595
gum:: debug!(
0 commit comments