diff --git a/Cargo.lock b/Cargo.lock index 1be366623e8..8dcfcbf5792 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7284,7 +7284,6 @@ name = "moonbeam-core-primitives" version = "0.1.1" dependencies = [ "account", - "hex-literal", "sp-core", "sp-runtime", ] @@ -7729,6 +7728,7 @@ dependencies = [ "pallet-ethereum", "pallet-parachain-staking", "pallet-sudo", + "pallet-timestamp", "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", diff --git a/core-primitives/Cargo.toml b/core-primitives/Cargo.toml index cb81cfcb908..222c1196a65 100644 --- a/core-primitives/Cargo.toml +++ b/core-primitives/Cargo.toml @@ -9,7 +9,6 @@ version = "0.1.1" [dependencies] account = { workspace = true } -hex-literal = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } diff --git a/core-primitives/src/lib.rs b/core-primitives/src/lib.rs index 756717cee1d..fd17298ce9e 100644 --- a/core-primitives/src/lib.rs +++ b/core-primitives/src/lib.rs @@ -49,12 +49,3 @@ pub type Address = AccountId; pub type AccountIndex = u32; /// Digest item type. pub type DigestItem = generic::DigestItem; - -pub mod well_known_relay_keys { - use hex_literal::hex; - - #[deprecated] - /// Can be removed after runtime 4000 - pub const TIMESTAMP_NOW: &[u8] = - &hex!["f0c365c3cf59d671eb72da0e7a4113c49f1f0515f462cdcf84e0f1d6045dfcbb"]; -} diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 64d8a5a3334..015f8899264 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -48,6 +48,7 @@ moonbeam-runtime = { workspace = true, optional = true } moonriver-runtime = { workspace = true, optional = true } frame-system = { workspace = true, features = ["std"] } pallet-balances = { workspace = true, features = ["std"] } +pallet-timestamp = { workspace = true } pallet-transaction-payment-rpc = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = [ "std", diff --git a/node/service/src/lazy_loading/mod.rs b/node/service/src/lazy_loading/mod.rs index c17f11ae999..39ccd05d8c2 100644 --- a/node/service/src/lazy_loading/mod.rs +++ b/node/service/src/lazy_loading/mod.rs @@ -604,10 +604,10 @@ where )); let additional_key_values = vec![ - // TODO: TIMESTAMP_NOW can be removed after runtime 4000 ( - #[allow(deprecated)] - moonbeam_core_primitives::well_known_relay_keys::TIMESTAMP_NOW + // TIMESTAMP_NOW was deprecated in runtime 4000, but should + // be kept for backwards compatibility with old runtimes + pallet_timestamp::Now::::hashed_key() .to_vec(), timestamp.encode(), ), diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index 917076d70ca..2a41e7caad3 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -1059,12 +1059,7 @@ where nimbus_consensus::collators::lookahead::run::( nimbus_consensus::collators::lookahead::Params { additional_digests_provider: maybe_provide_vrf_digest, - additional_relay_keys: vec![ - // TODO: Can be removed after runtime 4000 - #[allow(deprecated)] - moonbeam_core_primitives::well_known_relay_keys::TIMESTAMP_NOW.to_vec(), - relay_chain::well_known_keys::EPOCH_INDEX.to_vec(), - ], + additional_relay_keys: vec![relay_chain::well_known_keys::EPOCH_INDEX.to_vec()], authoring_duration: block_authoring_duration, block_import, code_hash_provider,