Skip to content

Commit

Permalink
Merge branch 'main' into rhmb/move-beefy-pallets-behind-session-pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
ggwpez authored Jan 31, 2024
2 parents 89e999d + ecd1687 commit ab1d5e2
Show file tree
Hide file tree
Showing 27 changed files with 118 additions and 60 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Modify Changelog

on:
pull_request_target:
types:
- synchronize
- edited

jobs:

verifyChangelogIsUpdated:
verifyChangelog:
name: Verify that Changelog is Updated
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/emulated/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cumulus-pallet-xcmp-queue = { version = "0.4.0" }
cumulus-pallet-parachain-system = { features = ["parameterized-consensus-hook",] , version = "0.4.0" }
asset-test-utils = { version = "4.0.0" }
cumulus-pallet-dmp-queue = { version = "0.4.0" }
penpal-runtime = { version = "0.11.0" }
penpal-runtime = { version = "0.11.1" }

# Local runtimes
kusama-runtime = { package = "staging-kusama-runtime", path = "../../../relay/kusama" }
Expand Down
4 changes: 2 additions & 2 deletions relay/kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pallet-membership = { default-features = false , version = "25.0.0" }
pallet-message-queue = { default-features = false , version = "28.0.0" }
pallet-mmr = { default-features = false , version = "24.0.0" }
pallet-multisig = { default-features = false , version = "25.0.0" }
pallet-nomination-pools = { default-features = false , version = "22.0.0" }
pallet-nomination-pools = { default-features = false , version = "22.0.2" }
pallet-offences = { default-features = false , version = "24.0.0" }
pallet-preimage = { default-features = false , version = "25.0.0" }
pallet-proxy = { default-features = false , version = "25.0.0" }
Expand Down Expand Up @@ -112,7 +112,7 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features
primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" }

xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.2" }
xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" }

sp-debug-derive = { default-features = false, version = "10.0.0" }
Expand Down
7 changes: 7 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,13 @@ sp_api::impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(TokenLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
// Kusama doesn't support asset locking
Err(BenchmarkError::Skip)
Expand Down
9 changes: 5 additions & 4 deletions relay/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal,
DescribeFamily, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation,
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount,
DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsChildSystemParachain,
IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId,
UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -362,6 +362,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

parameter_types! {
Expand Down
4 changes: 2 additions & 2 deletions relay/polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pallet-membership = { default-features = false , version = "25.0.0" }
pallet-message-queue = { default-features = false , version = "28.0.0" }
pallet-mmr = { default-features = false , version = "24.0.0" }
pallet-multisig = { default-features = false , version = "25.0.0" }
pallet-nomination-pools = { default-features = false , version = "22.0.0" }
pallet-nomination-pools = { default-features = false , version = "22.0.2" }
pallet-nomination-pools-runtime-api = { default-features = false , version = "20.0.0" }
pallet-offences = { default-features = false , version = "24.0.0" }
pallet-preimage = { default-features = false , version = "25.0.0" }
Expand Down Expand Up @@ -108,7 +108,7 @@ runtime-parachains = { package = "polkadot-runtime-parachains", default-features
primitives = { package = "polkadot-primitives", default-features = false , version = "4.0.0" }

xcm = { package = "staging-xcm", default-features = false , version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false , version = "4.0.2" }
xcm-builder = { package = "staging-xcm-builder", default-features = false , version = "4.0.0" }

sp-debug-derive = { default-features = false, version = "10.0.0" }
Expand Down
7 changes: 7 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2407,6 +2407,13 @@ sp_api::impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(TokenLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
// Polkadot doesn't support asset locking
Err(BenchmarkError::Skip)
Expand Down
9 changes: 5 additions & 4 deletions relay/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative,
ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal,
DescribeFamily, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeesToAccount,
DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation,
OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents,
WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeesToAccount,
};
use xcm_executor::traits::WithOriginFilter;

Expand Down Expand Up @@ -366,6 +366,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

parameter_types! {
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
polkadot-runtime-common = { default-features = false, version = "4.0.0" }
xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" }
xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" }

# Cumulus
cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" }
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(KsmLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
14 changes: 8 additions & 6 deletions system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription,
IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic, XcmFeesToAccount,
EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter,
GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeesToAccount,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -601,6 +602,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
polkadot-runtime-common = { default-features = false, version = "4.0.0" }
xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" }
xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" }

# Cumulus
cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" }
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(DotLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription,
IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus,
TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin,
WithUniqueTopic, XcmFeesToAccount,
EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter,
GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking,
ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative,
SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32,
SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeesToAccount,
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};

Expand Down Expand Up @@ -523,6 +524,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
2 changes: 1 addition & 1 deletion system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
polkadot-runtime-common = { default-features = false, version = "4.0.0" }
xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" }
xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" }

# Cumulus
cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" }
Expand Down
8 changes: 8 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,14 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(KsmRelayLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}


fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
EnsureXcmOrigin, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeesToAccount,
Expand Down Expand Up @@ -281,6 +281,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
polkadot-runtime-common = { default-features = false, version = "4.0.0" }
xcm = { package = "staging-xcm", default-features = false, version = "4.0.0" }
xcm-builder = { package = "staging-xcm-builder", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.0" }
xcm-executor = { package = "staging-xcm-executor", default-features = false, version = "4.0.2" }

# Cumulus
cumulus-pallet-aura-ext = { default-features = false , version = "0.4.0" }
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(DotRelayLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ use xcm_builder::{
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter,
DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily,
EnsureXcmOrigin, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
EnsureXcmOrigin, FrameTransactionalProcessor, HashedDescription, IsConcrete, ParentAsSuperuser,
ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit,
TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic,
XcmFeesToAccount,
Expand Down Expand Up @@ -288,6 +288,7 @@ impl xcm_executor::Config for XcmConfig {
type CallDispatcher = WithOriginFilter<SafeCallFilter>;
type SafeCallFilter = SafeCallFilter;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
}

/// Converts a local signed origin into an XCM multilocation.
Expand Down
Loading

0 comments on commit ab1d5e2

Please sign in to comment.