Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Publish draft release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+.*"
- "[0-9]+.[0-9]+.[0-9]+.*"
- "*"
workflow_dispatch:

jobs:
build-runtimes:
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
strategy:
matrix:
runtime: ["interlay", "kintsugi"]
Expand All @@ -18,14 +18,11 @@ jobs:

- name: Build ${{ matrix.runtime }} runtime
id: srtool_build
uses: chevdor/srtool-actions@v0.9.2
uses: paritytech/srtool-actions@v0.9.3
with:
image: docker.io/interlayhq/srtool
tag: nightly-2022-12-15
package: ${{ matrix.runtime }}-runtime-parachain
runtime_dir: ./parachain/runtime/${{ matrix.runtime }}
runtime_dir: parachain/runtime/${{ matrix.runtime }}
chain: ${{ matrix.runtime }}
workdir: ${{ github.workspace }}
- name: Store srtool digest to disk
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}_srtool_output.json
Expand Down Expand Up @@ -91,7 +88,7 @@ jobs:
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to Dockerhub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down Expand Up @@ -122,7 +119,7 @@ jobs:
platforms: linux/amd64

publish-draft-release:
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
needs: ["build-runtimes", "build-binary"]
steps:
- name: Checkout
Expand All @@ -133,6 +130,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: "!*.dockerbuild"

- run: |
find ./artifacts
Expand Down
47 changes: 26 additions & 21 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", bra
cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" }

[patch."https://github.com/open-web3-stack/open-runtime-module-library"]
orml-asset-registry = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-oracle = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-utilities = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-vesting = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xcm = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" }
orml-asset-registry = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-oracle = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-tokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-traits = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-unknown-tokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-utilities = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-vesting = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xcm-support = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xcm = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }
orml-xtokens = { git = "https://github.com/r0gue-io//open-runtime-module-library", branch = "master" }

[patch."https://github.com/paritytech/frontier"]
fc-consensus = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" }
Expand Down
4 changes: 4 additions & 0 deletions parachain/runtime/interlay/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2023-03-01"
components = [ "rustfmt", "rls" ]
targets = [ "wasm32-unknown-unknown" ]
10 changes: 5 additions & 5 deletions parachain/runtime/interlay/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use frame_support::{
traits::{Everything, Get, Nothing},
};
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};
use orml_traits::{
location::AbsoluteReserveProvider, parameter_type_with_key, FixedConversionRateProvider, MultiCurrency,
};
use orml_traits::{parameter_type_with_key, FixedConversionRateProvider, MultiCurrency};
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use orml_xtokens::AbsoluteReserveProviderMigrationPhase;
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use runtime_common::Transactless;
Expand Down Expand Up @@ -198,7 +197,7 @@ impl xcm_executor::Config for XcmConfig {
#[cfg(not(feature = "runtime-benchmarks"))]
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
type IsReserve = MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>;
type IsTeleporter = Nothing; // no teleportation allowed
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
Expand Down Expand Up @@ -432,8 +431,9 @@ impl orml_xtokens::Config for Runtime {
type MaxAssetsForTransfer = MaxAssetsForTransfer;
type MinXcmFee = ParachainMinFee;
type MultiLocationsFilter = Everything;
type ReserveProvider = AbsoluteReserveProvider;
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
type UniversalLocation = UniversalLocation;
type MigrationPhaseUpdateOrigin = EnsureRoot<AccountId>;
}

#[cfg(feature = "runtime-benchmarks")]
Expand Down
4 changes: 4 additions & 0 deletions parachain/runtime/kintsugi/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2023-03-01"
components = [ "rustfmt", "rls" ]
targets = [ "wasm32-unknown-unknown" ]
2 changes: 1 addition & 1 deletion parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kintsugi-parachain"),
impl_name: create_runtime_str!("kintsugi-parachain"),
authoring_version: 1,
spec_version: 1025006,
spec_version: 1025007,
impl_version: 1,
transaction_version: 4,
apis: RUNTIME_API_VERSIONS,
Expand Down
37 changes: 31 additions & 6 deletions parachain/runtime/kintsugi/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ use frame_support::{
traits::{Everything, Get, Nothing},
};
use orml_asset_registry::{AssetRegistryTrader, FixedRateAssetRegistryTrader};
use orml_traits::{
location::AbsoluteReserveProvider, parameter_type_with_key, FixedConversionRateProvider, MultiCurrency,
};
use orml_traits::{parameter_type_with_key, FixedConversionRateProvider, MultiCurrency};
use orml_xcm_support::{DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use orml_xtokens::{AbsoluteReserveProviderMigrationPhase, MigrationPhase};
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use runtime_common::Transactless;
Expand Down Expand Up @@ -192,7 +191,7 @@ impl xcm_executor::Config for XcmConfig {
#[cfg(not(feature = "runtime-benchmarks"))]
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = MultiNativeAsset<AbsoluteReserveProvider>;
type IsReserve = MultiNativeAsset<AbsoluteReserveProviderMigrationPhase<Runtime>>;
type IsTeleporter = Nothing; // no teleportation allowed
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
Expand Down Expand Up @@ -231,6 +230,31 @@ parameter_types! {
pub const ReachableDest: MultiLocation = MultiLocation::parent();
}

// A reserve filter to disable pallet xcm reserve transfers during AHM. The reserve provider used
// in the XcmExecutor isn't catching it for some reason (probably the super outdated xcm version)
pub struct PalletXcmReserveTransferFilterMigrationPhase;
impl frame_support::traits::Contains<(MultiLocation, Vec<MultiAsset>)>
for PalletXcmReserveTransferFilterMigrationPhase
{
fn contains((_, assets): &(MultiLocation, Vec<MultiAsset>)) -> bool {
let migration_phase = orml_xtokens::MigrationStatus::<Runtime>::get();
match migration_phase {
MigrationPhase::InProgress | MigrationPhase::Completed => assets.iter().any(|asset| {
if let AssetId::Concrete(MultiLocation {
parents: 1,
interior: Junctions::Here,
}) = &asset.id
{
false
} else {
true
}
}),
_ => true,
}
}
}

impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
Expand All @@ -241,7 +265,7 @@ impl pallet_xcm::Config for Runtime {
type XcmExecuteFilter = Nothing;
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type XcmReserveTransferFilter = PalletXcmReserveTransferFilterMigrationPhase;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
Expand Down Expand Up @@ -426,8 +450,9 @@ impl orml_xtokens::Config for Runtime {
type MaxAssetsForTransfer = MaxAssetsForTransfer;
type MinXcmFee = ParachainMinFee;
type MultiLocationsFilter = Everything;
type ReserveProvider = AbsoluteReserveProvider;
type ReserveProvider = AbsoluteReserveProviderMigrationPhase<Runtime>;
type UniversalLocation = UniversalLocation;
type MigrationPhaseUpdateOrigin = EnsureRoot<AccountId>;
}

#[cfg(feature = "runtime-benchmarks")]
Expand Down
Loading
Loading