Merge remote-tracking branch 'origin/master' into gav-xcm-v3

This commit is contained in:
Keith Yeung
2022-08-24 21:45:32 +08:00
84 changed files with 1415 additions and 760 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ version = "0.1.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+1 -1
View File
@@ -7,7 +7,7 @@ version = "0.1.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
smallvec = "1.9.0"
# Substrate
@@ -743,6 +743,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)
@@ -214,13 +214,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Done by hand to satisfy master branch
// This will be regenerated for the next release
fn try_increment_id() -> Weight {
(20_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
@@ -9,7 +9,7 @@ description = "Statemint parachain runtime"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.17", default-features = false }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
smallvec = "1.9.0"
@@ -772,6 +772,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)
@@ -214,13 +214,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Done by hand to satisfy master branch
// This will be regenerated for the next release
fn try_increment_id() -> Weight {
(20_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
@@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
smallvec = "1.9.0"
# Substrate
@@ -733,6 +733,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)
@@ -214,13 +214,6 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Done by hand to satisfy master branch
// This will be regenerated for the next release
fn try_increment_id() -> Weight {
(20_000_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Uniques Class (r:1 w:0)
// Storage: Uniques ClassMetadataOf (r:1 w:1)
fn clear_collection_metadata() -> Weight {
@@ -9,7 +9,7 @@ description = "Polkadot Collectives Parachain Runtime"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.17", default-features = false }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
smallvec = "1.6.1"
@@ -15,7 +15,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
smallvec = "1.9.0"
# Substrate
@@ -477,6 +477,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)
@@ -8,7 +8,7 @@ edition = "2021"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
# Substrate
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -32,6 +32,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features
cumulus-pallet-parachain-system = { path = "../../../../pallets/parachain-system", default-features = false }
cumulus-pallet-solo-to-para = { path = "../../../../pallets/solo-to-para", default-features = false }
parachain-info = { path = "../../../pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false }
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
[build-dependencies]
@@ -64,4 +65,5 @@ std = [
"cumulus-pallet-solo-to-para/std",
"cumulus-primitives-core/std",
"parachain-info/std",
"parachains-common/std",
]
@@ -52,6 +52,7 @@ pub use frame_support::{
StorageValue,
};
use frame_system::limits::{BlockLength, BlockWeights};
use parachains_common::{AccountId, Signature};
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use sp_runtime::{Perbill, Permill};
@@ -189,11 +190,6 @@ construct_runtime! {
}
}
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = sp_runtime::MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
/// Index of a transaction in the chain.
pub type Index = u32;
/// A hash of some data used by the chain.
@@ -8,7 +8,7 @@ edition = "2021"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
# Substrate
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -39,6 +39,7 @@ cumulus-pallet-xcm = { path = "../../../../pallets/xcm", default-features = fals
cumulus-primitives-core = { path = "../../../../primitives/core", default-features = false }
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
parachain-info = { path = "../../../pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false }
[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -73,6 +74,7 @@ std = [
"cumulus-primitives-core/std",
"cumulus-primitives-utility/std",
"parachain-info/std",
"parachains-common/std",
]
try-runtime = [
"frame-executive/try-runtime",
@@ -59,6 +59,7 @@ pub use frame_support::{
StorageValue,
};
use frame_system::limits::{BlockLength, BlockWeights};
use parachains_common::{AccountId, Signature};
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use sp_runtime::{Perbill, Permill};
@@ -228,11 +229,6 @@ impl sp_runtime::traits::SignedExtension for DisallowSigned {
}
}
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = sp_runtime::MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
/// Index of a transaction in the chain.
pub type Index = u32;
/// A hash of some data used by the chain.
@@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
hex-literal = { version = "0.3.4", optional = true }
log = { version = "0.4.16", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
smallvec = "1.9.0"
# Substrate
@@ -74,6 +74,7 @@ cumulus-primitives-timestamp = { path = "../../../../primitives/timestamp", defa
cumulus-primitives-utility = { path = "../../../../primitives/utility", default-features = false }
pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false }
parachain-info = { path = "../../../../parachains/pallets/parachain-info", default-features = false }
parachains-common = { path = "../../../common", default-features = false }
[features]
default = [
+20 -9
View File
@@ -50,9 +50,9 @@ pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, Verify},
traits::{AccountIdLookup, BlakeTwo256, Block as BlockT},
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult, MultiSignature,
ApplyExtrinsicResult,
};
pub use sp_runtime::{traits::ConvertInto, MultiAddress, Perbill, Permill};
use sp_std::prelude::*;
@@ -70,16 +70,10 @@ use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
// XCM Imports
use parachains_common::{AccountId, Signature};
use xcm::latest::prelude::BodyId;
use xcm_executor::XcmExecutor;
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as Verify>::Signer as IdentifyAccount>::AccountId;
/// Balance of an account.
pub type Balance = u128;
@@ -674,6 +668,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)
@@ -9,7 +9,7 @@ description = "Simple runtime used by the rococo parachain(s)"
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.143", optional = true, features = ["derive"] }
serde = { version = "1.0.144", optional = true, features = ["derive"] }
# Substrate
frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -60,7 +60,7 @@ pub use sp_runtime::{Perbill, Permill};
use parachains_common::{
impls::{AssetsFrom, NonZeroIssuance},
AssetId,
AccountId, AssetId, Signature,
};
use xcm_builder::{
AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId,
@@ -558,11 +558,6 @@ construct_runtime! {
}
}
/// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
pub type Signature = sp_runtime::MultiSignature;
/// Some way of identifying an account on the chain. We intentionally make it equivalent
/// to the public key of our transaction signing scheme.
pub type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
/// Balance of an account.
pub type Balance = u128;
/// Index of a transaction in the chain.
@@ -717,6 +712,23 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, Call>
for Runtime
{
fn query_call_info(
call: Call,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: Call,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
}
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
fn collect_collation_info(header: &<Block as BlockT>::Header) -> cumulus_primitives_core::CollationInfo {
ParachainSystem::collect_collation_info(header)