@@ -84,7 +84,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
8484 spec_name : alloc:: borrow:: Cow :: Borrowed ( "robonomics" ) ,
8585 impl_name : alloc:: borrow:: Cow :: Borrowed ( "robonomics-airalab" ) ,
8686 authoring_version : 1 ,
87- spec_version : 42 ,
87+ spec_version : 43 ,
8888 impl_version : 1 ,
8989 apis : RUNTIME_API_VERSIONS ,
9090 transaction_version : 2 ,
@@ -204,7 +204,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {}
204204
205205impl pallet_timestamp:: Config for Runtime {
206206 type Moment = u64 ;
207- type OnTimestampSet = Aura ;
207+ type OnTimestampSet = ( ) ;
208208 type MinimumPeriod = ConstU64 < 0 > ;
209209 type WeightInfo = ( ) ;
210210}
@@ -751,25 +751,6 @@ impl_runtime_apis! {
751751 }
752752 }
753753
754- impl cumulus_primitives_aura:: AuraUnincludedSegmentApi <Block > for Runtime {
755- fn can_build_upon(
756- included_hash: <Block as BlockT >:: Hash ,
757- slot: cumulus_primitives_aura:: Slot ,
758- ) -> bool {
759- ConsensusHook :: can_build_upon( included_hash, slot)
760- }
761- }
762-
763- impl sp_consensus_aura:: AuraApi <Block , AuraId > for Runtime {
764- fn slot_duration( ) -> sp_consensus_aura:: SlotDuration {
765- sp_consensus_aura:: SlotDuration :: from_millis( MILLISECS_PER_BLOCK )
766- }
767-
768- fn authorities( ) -> Vec <AuraId > {
769- pallet_aura:: Authorities :: <Runtime >:: get( ) . into_inner( )
770- }
771- }
772-
773754 impl sp_api:: Metadata <Block > for Runtime {
774755 fn metadata( ) -> OpaqueMetadata {
775756 OpaqueMetadata :: new( Runtime :: metadata( ) . into( ) )
@@ -944,9 +925,30 @@ impl_runtime_apis! {
944925 }
945926}
946927
928+ struct CheckInherents ;
929+ impl cumulus_pallet_parachain_system:: CheckInherents < Block > for CheckInherents {
930+ fn check_inherents (
931+ block : & Block ,
932+ relay_state_proof : & cumulus_pallet_parachain_system:: RelayChainStateProof ,
933+ ) -> sp_inherents:: CheckInherentsResult {
934+ let relay_chain_slot = relay_state_proof
935+ . read_slot ( )
936+ . expect ( "Could not read the relay chain slot from the proof" ) ;
937+ let inherent_data =
938+ cumulus_primitives_timestamp:: InherentDataProvider :: from_relay_chain_slot_and_duration (
939+ relay_chain_slot,
940+ sp_std:: time:: Duration :: from_secs ( 6 ) ,
941+ )
942+ . create_inherent_data ( )
943+ . expect ( "Could not create the timestamp inherent data" ) ;
944+ inherent_data. check_extrinsics ( block)
945+ }
946+ }
947+
947948cumulus_pallet_parachain_system:: register_validate_block! {
948949 Runtime = Runtime ,
949- BlockExecutor = cumulus_pallet_aura_ext:: BlockExecutor <Runtime , Executive >,
950+ BlockExecutor = Executive ,
951+ CheckInherents = CheckInherents
950952}
951953
952954parameter_types ! {
0 commit comments