@@ -186,8 +186,16 @@ impl TryFrom<&'_ CollationSecondedSignal> for BlockAnnounceData {
186186 }
187187}
188188
189+ /// A type alias for the [`RequireSecondedInBlockAnnounce`] validator.
190+ #[ deprecated = "This has been renamed to RequireSecondedInBlockAnnounce" ]
191+ pub type BlockAnnounceValidator < Block , RCInterface > = RequireSecondedInBlockAnnounce < Block , RCInterface > ;
192+
189193/// Parachain specific block announce validator.
190194///
195+ /// This is not required when the collation mechanism itself is sybil-resistant, as it is a spam protection
196+ /// mechanism used to prevent nodes from dealing with unbounded numbers of blocks. For sybil-resistant
197+ /// collation mechanisms, this will only slow things down.
198+ ///
191199/// This block announce validator is required if the parachain is running
192200/// with the relay chain provided consensus to make sure each node only
193201/// imports a reasonable number of blocks per round. The relay chain provided
@@ -214,23 +222,23 @@ impl TryFrom<&'_ CollationSecondedSignal> for BlockAnnounceData {
214222/// it. However, if the announcement is for a block below the tip the announcement is accepted
215223/// as it probably comes from a node that is currently syncing the chain.
216224#[ derive( Clone ) ]
217- pub struct BlockAnnounceValidator < Block , RCInterface > {
225+ pub struct RequireSecondedInBlockAnnounce < Block , RCInterface > {
218226 phantom : PhantomData < Block > ,
219227 relay_chain_interface : RCInterface ,
220228 para_id : ParaId ,
221229}
222230
223- impl < Block , RCInterface > BlockAnnounceValidator < Block , RCInterface >
231+ impl < Block , RCInterface > RequireSecondedInBlockAnnounce < Block , RCInterface >
224232where
225233 RCInterface : Clone ,
226234{
227- /// Create a new [`BlockAnnounceValidator `].
235+ /// Create a new [`RequireSecondedInBlockAnnounce `].
228236 pub fn new ( relay_chain_interface : RCInterface , para_id : ParaId ) -> Self {
229237 Self { phantom : Default :: default ( ) , relay_chain_interface, para_id }
230238 }
231239}
232240
233- impl < Block : BlockT , RCInterface > BlockAnnounceValidator < Block , RCInterface >
241+ impl < Block : BlockT , RCInterface > RequireSecondedInBlockAnnounce < Block , RCInterface >
234242where
235243 RCInterface : RelayChainInterface + Clone ,
236244{
@@ -315,7 +323,7 @@ where
315323}
316324
317325impl < Block : BlockT , RCInterface > BlockAnnounceValidatorT < Block >
318- for BlockAnnounceValidator < Block , RCInterface >
326+ for RequireSecondedInBlockAnnounce < Block , RCInterface >
319327where
320328 RCInterface : RelayChainInterface + Clone + ' static ,
321329{
0 commit comments