Skip to content

Commit

Permalink
Merge branch 'main' into new-construct-runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr authored Jan 31, 2024
2 parents 646ead4 + b09faa0 commit 47bcf01
Show file tree
Hide file tree
Showing 28 changed files with 133 additions and 74 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Upgrade parachains runtime API from v7 to v8 in Kusama ([polkadot-fellows/runtimes#148](https://github.com/polkadot-fellows/runtimes/pull/148)). Context: https://paritytech.github.io/polkadot-sdk/book/protocol-validator-disabling.html
- Fixed the lowering of Asset Hub existential deposits.
- MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169)

## [1.1.1] 25.01.2024

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
21 changes: 14 additions & 7 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,13 +1527,6 @@ construct_runtime! {
Offences: pallet_offences = 7,
Historical: session_historical = 34,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be before session in order to have leaf contents refer to
// block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,

Session: pallet_session = 8,
Grandpa: pallet_grandpa = 10,
ImOnline: pallet_im_online = 11,
Expand Down Expand Up @@ -1633,6 +1626,13 @@ construct_runtime! {

// Asset rate.
AssetRate: pallet_asset_rate = 101,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue #160 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,
}
}

Expand Down Expand Up @@ -2412,6 +2412,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
21 changes: 14 additions & 7 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1563,13 +1563,6 @@ construct_runtime! {
Offences: pallet_offences = 8,
Historical: session_historical = 33,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be before session in order to have leaf contents
// refer to block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,

Session: pallet_session = 9,
Grandpa: pallet_grandpa = 11,
ImOnline: pallet_im_online = 12,
Expand Down Expand Up @@ -1645,6 +1638,13 @@ construct_runtime! {

// Asset rate.
AssetRate: pallet_asset_rate = 101,

// BEEFY Bridges support.
Beefy: pallet_beefy = 200,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue #160 for details.
Mmr: pallet_mmr = 201,
BeefyMmrLeaf: pallet_beefy_mmr = 202,
}
}

Expand Down 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 @@ -1379,6 +1379,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 @@ -1270,6 +1270,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 @@ -856,6 +856,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
Loading

0 comments on commit 47bcf01

Please sign in to comment.