@@ -18,7 +18,7 @@ use crate::inherents::is_runtime_upgraded;
18
18
use codec:: Encode ;
19
19
use domain_runtime_primitives:: opaque:: AccountId ;
20
20
use sc_client_api:: BlockBackend ;
21
- use sp_api:: { ApiError , Core , ProvideRuntimeApi } ;
21
+ use sp_api:: { ApiError , ProvideRuntimeApi } ;
22
22
use sp_blockchain:: HeaderBackend ;
23
23
use sp_core:: H256 ;
24
24
use sp_domains:: core_api:: DomainCoreApi ;
@@ -29,8 +29,7 @@ use sp_domains::{
29
29
} ;
30
30
use sp_messenger:: MessengerApi ;
31
31
use sp_mmr_primitives:: MmrApi ;
32
- use sp_runtime:: traits:: { Block as BlockT , Hash as HashT , Header , NumberFor } ;
33
- use sp_runtime:: DigestItem ;
32
+ use sp_runtime:: traits:: { Block as BlockT , Hash as HashT , NumberFor } ;
34
33
use sp_state_machine:: LayoutV1 ;
35
34
use sp_subspace_mmr:: ConsensusChainMmrLeafProof ;
36
35
use sp_weights:: Weight ;
@@ -208,13 +207,6 @@ where
208
207
Vec < InboxedBundle < Block :: Hash > > ,
209
208
Vec < ( Option < AccountId > , Block :: Extrinsic ) > ,
210
209
) > {
211
- let consensus_spec_version = self
212
- . consensus_client
213
- . runtime_api ( )
214
- . version ( at_consensus_hash)
215
- . map_err ( sp_blockchain:: Error :: RuntimeApiError ) ?
216
- . spec_version ;
217
-
218
210
let mut inboxed_bundles = Vec :: with_capacity ( bundles. len ( ) ) ;
219
211
let mut valid_extrinsics = Vec :: new ( ) ;
220
212
@@ -230,42 +222,16 @@ where
230
222
// NOTE: The receipt's `domain_block_number` is verified by the consensus runtime while
231
223
// the `domain_block_hash` is not (which is take care of by the fraud proof) so we can't
232
224
// check the parent domain block hash here.
233
- // TODO: remove consensus runtime version check before next network
234
- if consensus_spec_version >= 6
235
- && bundle. receipt ( ) . domain_block_number != parent_domain_number
236
- {
237
- // If there consensus runtime just upgraded to spec version 6, which bring the receipt
238
- // gap check, the bundle that included in the same block is doesn't perform the check
239
- // because the new runtime take effect in the next block so skip the check here too.
240
- let is_consensus_runtime_upgraded_to_6 = {
241
- let consensus_header = self
242
- . consensus_client
243
- . header ( at_consensus_hash) ?
244
- . ok_or_else ( || {
245
- sp_blockchain:: Error :: Backend ( format ! (
246
- "Consensus block header of {at_consensus_hash:?} unavailable"
247
- ) )
248
- } ) ?;
249
-
250
- let runtime_upgraded = consensus_header
251
- . digest ( )
252
- . logs ( )
253
- . iter ( )
254
- . any ( |di| di == & DigestItem :: RuntimeEnvironmentUpdated ) ;
255
-
256
- runtime_upgraded && consensus_spec_version == 6
257
- } ;
258
- if !is_consensus_runtime_upgraded_to_6 {
259
- return Err ( sp_blockchain:: Error :: RuntimeApiError (
260
- ApiError :: Application (
261
- format ! (
262
- "Unexpected bundle in consensus block: {:?}, something must be wrong" ,
263
- at_consensus_hash
264
- )
265
- . into ( ) ,
266
- ) ,
267
- ) ) ;
268
- }
225
+ if bundle. receipt ( ) . domain_block_number != parent_domain_number {
226
+ return Err ( sp_blockchain:: Error :: RuntimeApiError (
227
+ ApiError :: Application (
228
+ format ! (
229
+ "Unexpected bundle in consensus block: {:?}, something must be wrong" ,
230
+ at_consensus_hash
231
+ )
232
+ . into ( ) ,
233
+ ) ,
234
+ ) ) ;
269
235
}
270
236
271
237
let extrinsic_root = bundle. extrinsics_root ( ) ;
0 commit comments