Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Update CI image with rust 1.81.0 and 2024-09-11 #5676

Merged
merged 102 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
195f96f
[ci] Update CI image with rust 1.81.0 and 2024-09-11
alvicsam Sep 11, 2024
7460c42
".git/.scripts/commands/fmt/fmt.sh"
Sep 11, 2024
f3d3aea
Merge branch 'master' into as-upd-rust
mordamax Sep 11, 2024
a4c861f
fix try runtime usage in frame-support
gui1117 Aug 30, 2024
96f2bfc
Prepare for Rust 1.81
ggwpez Sep 11, 2024
f676227
Clippy
ggwpez Sep 11, 2024
6047445
Fix test
ggwpez Sep 11, 2024
2702d29
More
ggwpez Sep 11, 2024
46a51ca
More
ggwpez Sep 11, 2024
2006bde
More
ggwpez Sep 11, 2024
2f4a493
Clippy
ggwpez Sep 11, 2024
94c4d37
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 12, 2024
89a168d
fix
ggwpez Sep 12, 2024
5b06b9d
try again
ggwpez Sep 12, 2024
2b1a759
next try
ggwpez Sep 12, 2024
3d3d6d8
Fix weights
ggwpez Sep 17, 2024
2da0f7b
Remove no_show_duration from BlockImportedCandidates
ggwpez Sep 17, 2024
a7c80f8
Remove unused tests
ggwpez Sep 17, 2024
f9b9648
fmt
ggwpez Sep 17, 2024
0cae551
Remove prepare_stats from ArtifactState
ggwpez Sep 17, 2024
6f8b4e4
Remove PrepareWorkerResult from Outcome::RenameTmpFile
ggwpez Sep 17, 2024
4df574a
Remove session_data from CacheSizes
ggwpez Sep 17, 2024
6ab0a78
Remove unused file
ggwpez Sep 17, 2024
7af8a10
Remove id from ProvedValidator
ggwpez Sep 17, 2024
a8f5783
Remove PeerId from sc-network BehaviourOut
ggwpez Sep 17, 2024
1d22e28
Remove unused fields from litep2p DiscoveryEvent
ggwpez Sep 17, 2024
364d0ad
Remove inbound from sc-network NotificationsOut
ggwpez Sep 17, 2024
784cb3c
sc-network: Delete unused module
ggwpez Sep 17, 2024
47eca24
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 17, 2024
35c96fc
fmt
ggwpez Sep 17, 2024
d434b3a
Fix build_profile feature
ggwpez Sep 18, 2024
8f84a2a
Delete unused code
ggwpez Sep 18, 2024
7d6e682
Remove duplicate feature gates
ggwpez Sep 18, 2024
f5bd317
Temporarily try with dead_code
ggwpez Sep 18, 2024
81dde13
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 18, 2024
10b3682
Temporarily try with dead_code
ggwpez Sep 18, 2024
b548dbe
Supress in test
ggwpez Sep 18, 2024
54861b3
DNM: Remove DWarnings flag to see all warnings at once
ggwpez Sep 18, 2024
f3adc3d
Revert "DNM: Remove DWarnings flag to see all warnings at once"
ggwpez Sep 18, 2024
504418a
Delete unused code
ggwpez Sep 18, 2024
d8c9e87
Delete tests with bls-experimental feature since that does not exist
ggwpez Sep 18, 2024
dba150d
Simplify TestNetworkEvent
ggwpez Sep 18, 2024
a04f70c
Fixup test
ggwpez Sep 18, 2024
0edd1e0
Clippy map->inspect
ggwpez Sep 18, 2024
8aa57b1
Fix
ggwpez Sep 18, 2024
f4b1c4a
Remove unused test code
ggwpez Sep 18, 2024
9edac7a
Update substrate/utils/wasm-builder/src/wasm_project.rs
ggwpez Sep 18, 2024
d185393
Update substrate/utils/frame/benchmarking-cli/build.rs
ggwpez Sep 18, 2024
956fc46
Update substrate/utils/frame/benchmarking-cli/build.rs
ggwpez Sep 18, 2024
2248c8a
Remove unused struct and trait
ggwpez Sep 18, 2024
4c4c3a3
messages-relay: Remove stuff from RelayReference etc
ggwpez Sep 18, 2024
d1c8045
sc-network: remove more
ggwpez Sep 18, 2024
0d40efb
Fixup frame-procedural
ggwpez Sep 18, 2024
a500e2c
pallet-contracts: remove unused field
ggwpez Sep 18, 2024
c7749b9
keep FIXME on buggy test
ggwpez Sep 18, 2024
7ba5dc7
fmt
ggwpez Sep 18, 2024
373beb6
Merge remote-tracking branch 'origin/as-upd-rust' into as-upd-rust
ggwpez Sep 18, 2024
9e14b6c
sc-network: remove more
ggwpez Sep 18, 2024
ed2a8ba
test fix
ggwpez Sep 18, 2024
4041c50
pallet-contracts: remove unsued code_len fn
ggwpez Sep 18, 2024
dbe084a
see if it works without dead_code
ggwpez Sep 18, 2024
d03cf7d
clippy
ggwpez Sep 18, 2024
88462de
clippy
ggwpez Sep 19, 2024
ab78ab7
needs deadcode
ggwpez Sep 19, 2024
31d2343
Update UI tests
ggwpez Sep 19, 2024
9decbcb
Clippy
ggwpez Sep 19, 2024
373dfaf
Add manual Debug impl for GrandpaJustification
ggwpez Sep 19, 2024
408e60e
Use where clause in Runtime API to make clippy happy
ggwpez Sep 19, 2024
0879b8f
fmt toml
ggwpez Sep 19, 2024
f5646ee
fix rust doc
ggwpez Sep 19, 2024
8890001
fix
ggwpez Sep 19, 2024
a062000
doctest
ggwpez Sep 19, 2024
0723ec2
Allow dead code in overseer because of orchestra bug
ggwpez Sep 20, 2024
96d65e5
Ignore doctest that was probably never executed anyway
ggwpez Sep 20, 2024
c083dac
Merge branch 'master' into as-upd-rust
ggwpez Sep 20, 2024
b714170
prdoc
ggwpez Sep 20, 2024
da228d5
Fix mmr benchmark
ggwpez Sep 21, 2024
ea4544d
Fix mmr benchmark
ggwpez Sep 21, 2024
677d92c
Add 'pause' syscall to execute worker whitelist
ggwpez Sep 21, 2024
22d8d3c
Update UI tests
ggwpez Sep 21, 2024
37f082f
fix trybuild for sp-api
ggwpez Sep 21, 2024
1652b4a
Add 'pause' syscall to prepare worker whitelist
ggwpez Sep 21, 2024
d1968f0
unused import
ggwpez Sep 23, 2024
3c52726
make py script less verbose
ggwpez Sep 23, 2024
dce585b
Add PrDoc (auto generated)
ggwpez Sep 23, 2024
3effb47
Merge remote-tracking branch 'origin/as-upd-rust' into as-upd-rust
ggwpez Sep 23, 2024
cf54652
fix prdoc script and docs
ggwpez Sep 23, 2024
91f5afd
fix other prdocs
ggwpez Sep 23, 2024
751ec26
more clippy
ggwpez Sep 23, 2024
55e30e7
Debug UI test
ggwpez Sep 23, 2024
8fef197
fix update-ui-tests script
ggwpez Sep 23, 2024
60e50b2
fix ui tests again
ggwpez Sep 23, 2024
7a59493
Merge branch 'master' into as-upd-rust
ggwpez Sep 25, 2024
e954965
Merge branch 'master' into as-upd-rust
ggwpez Sep 25, 2024
fbf2825
bp-messages: fix feature gates
ggwpez Sep 26, 2024
b9254a2
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
70097cb
Run ONLY ui tests in the UI CI check
ggwpez Sep 26, 2024
007527a
fmt
ggwpez Sep 26, 2024
b19c684
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
7b74876
fix prdoc
ggwpez Sep 26, 2024
e14a466
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
d24475d
fmt
ggwpez Sep 26, 2024
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
2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v202407161507"
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034"
8 changes: 4 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- name: script
run: |
forklift cargo clippy --all-targets --locked --workspace
forklift cargo clippy --all-targets --all-features --locked --workspace
forklift cargo clippy --all-targets --locked --workspace --quiet
forklift cargo clippy --all-targets --all-features --locked --workspace --quiet
check-try-runtime:
runs-on: ${{ needs.preflight.outputs.RUNNER }}
needs: [preflight]
Expand All @@ -46,13 +46,13 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- name: script
run: |
forklift cargo check --locked --all --features try-runtime
forklift cargo check --locked --all --features try-runtime --quiet
# this is taken from cumulus
# Check that parachain-template will compile with `try-runtime` feature flag.
forklift cargo check --locked -p parachain-template-node --features try-runtime
# add after https://github.com/paritytech/substrate/pull/14502 is merged
# experimental code may rely on try-runtime and vice-versa
forklift cargo check --locked --all --features try-runtime,experimental
forklift cargo check --locked --all --features try-runtime,experimental --quiet
# check-core-crypto-features works fast without forklift
check-core-crypto-features:
runs-on: ${{ needs.preflight.outputs.RUNNER }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet

test-linux-stable:
needs: [preflight]
Expand Down Expand Up @@ -91,12 +91,13 @@ jobs:
--locked \
--release \
--no-fail-fast \
--cargo-quiet \
--features try-runtime,experimental,riscv,ci-only-tests \
--partition count:${{ matrix.partition }}
# run runtime-api tests with `enable-staging-api` feature on the 1st node
- name: runtime-api tests
if: ${{ matrix.partition == '1/3' }}
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api --cargo-quiet

confirm-required-jobs-passed:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet

# cf https://github.com/paritytech/polkadot-sdk/issues/1652
test-syscalls:
Expand All @@ -52,7 +52,7 @@ jobs:
- name: script
id: test
run: |
forklift cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker
forklift cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker --quiet
cd polkadot/scripts/list-syscalls
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-execute-worker --only-used-syscalls | diff -u execute-worker-syscalls -
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
Expand All @@ -75,4 +75,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo check --all --benches
run: forklift cargo check --all --benches --quiet
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ workflow:
- if: $CI_COMMIT_BRANCH

variables:
CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
# CI_IMAGE: !reference [ .ci-unified, variables, CI_IMAGE ]
CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034"
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ default-members = [
[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }
# `substrate_runtime` is a common `cfg` condition name used in the repo.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(substrate_runtime)'] }
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(substrate_runtime)', 'cfg(build_profile, values("debug", "release"))', 'cfg(build_opt_level, values("3"))', 'cfg(enable_alloc_error_handler)', 'cfg(fuzzing)'] }

[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
Expand Down
37 changes: 19 additions & 18 deletions bridges/modules/xcm-bridge-hub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1474,25 +1474,26 @@ mod tests {
let lane_id = LaneId::from_inner(Either::Left(H256::default()));
let lane_id_mismatch = LaneId::from_inner(Either::Left(H256::from([1u8; 32])));

let test_bridge_state = |id,
bridge,
(lane_id, bridge_id),
(inbound_lane_id, outbound_lane_id),
expected_error: Option<TryRuntimeError>| {
Bridges::<TestRuntime, ()>::insert(id, bridge);
LaneToBridge::<TestRuntime, ()>::insert(lane_id, bridge_id);
let test_bridge_state =
|id,
bridge,
(lane_id, bridge_id),
(inbound_lane_id, outbound_lane_id),
expected_error: Option<TryRuntimeError>| {
Bridges::<TestRuntime, ()>::insert(id, bridge);
LaneToBridge::<TestRuntime, ()>::insert(lane_id, bridge_id);

let lanes_manager = LanesManagerOf::<TestRuntime, ()>::new();
lanes_manager.create_inbound_lane(inbound_lane_id).unwrap();
lanes_manager.create_outbound_lane(outbound_lane_id).unwrap();

let result = XcmOverBridge::do_try_state();
if let Some(e) = expected_error {
assert_err!(result, e);
} else {
assert_ok!(result);
}
};
let lanes_manager = LanesManagerOf::<TestRuntime, ()>::new();
lanes_manager.create_inbound_lane(inbound_lane_id).unwrap();
lanes_manager.create_outbound_lane(outbound_lane_id).unwrap();

let result = XcmOverBridge::do_try_state();
if let Some(e) = expected_error {
assert_err!(result, e);
} else {
assert_ok!(result);
}
};
let cleanup = |bridge_id, lane_ids| {
Bridges::<TestRuntime, ()>::remove(bridge_id);
for lane_id in lane_ids {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ impl<'a, P: SubstrateParachainsPipeline, SourceRelayClnt, TargetClnt>
for (
&'a OnDemandParachainsRelay<P, SourceRelayClnt, TargetClnt>,
&'a ParachainsSource<P, SourceRelayClnt>,
) where
)
where
SourceRelayClnt: Client<P::SourceRelayChain>,
TargetClnt: Client<P::TargetChain>,
{
Expand Down
4 changes: 4 additions & 0 deletions bridges/relays/messages/src/message_race_limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ pub struct RelayReference<
TargetClient: MessageLaneTargetClient<P>,
> {
/// The client that is connected to the message lane source node.
#[allow(dead_code)] // FAIL-CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is about this?

pub lane_source_client: SourceClient,
/// The client that is connected to the message lane target node.
#[allow(dead_code)] // FAIL-CI
pub lane_target_client: TargetClient,
/// Metrics reference.
#[allow(dead_code)] // FAIL-CI
pub metrics: Option<MessageLaneLoopMetrics>,
/// Messages size summary
pub selected_size: u32,

/// Hard check begin nonce
#[allow(dead_code)] // FAIL-CI
pub hard_selected_begin_nonce: MessageNonce,

/// Index by all ready nonces
Expand Down
3 changes: 3 additions & 0 deletions bridges/relays/messages/src/message_race_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,16 @@ pub trait RaceState<SourceHeaderId, TargetHeaderId>: Clone + Send + Sync {
fn set_best_finalized_source_header_id_at_best_target(&mut self, id: SourceHeaderId);

/// Best finalized source header id at the source client.
#[allow(dead_code)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this trait not public outside of this module? We should remove this code then.

fn best_finalized_source_header_id_at_source(&self) -> Option<SourceHeaderId>;
/// Best finalized source header id at the best block on the target
/// client (at the `best_finalized_source_header_id_at_best_target`).
fn best_finalized_source_header_id_at_best_target(&self) -> Option<SourceHeaderId>;
/// The best header id at the target client.
#[allow(dead_code)]
fn best_target_header_id(&self) -> Option<TargetHeaderId>;
/// Best finalized header id at the target client.
#[allow(dead_code)]
fn best_finalized_target_header_id(&self) -> Option<TargetHeaderId>;

/// Returns `true` if we have selected nonces to submit to the target node.
Expand Down
6 changes: 4 additions & 2 deletions bridges/relays/messages/src/message_race_strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ impl<
TargetHeaderHash,
SourceNoncesRange,
Proof,
> where
>
where
SourceHeaderHash: Clone,
SourceHeaderNumber: Clone + Ord,
SourceNoncesRange: NoncesRange,
Expand Down Expand Up @@ -189,7 +190,8 @@ impl<
TargetHeaderHash,
SourceNoncesRange,
Proof,
> where
>
where
SourceHeaderHash: Clone + Debug + Send + Sync,
SourceHeaderNumber: Clone + Ord + Debug + Send + Sync,
SourceNoncesRange: NoncesRange + Debug + Send + Sync,
Expand Down
20 changes: 1 addition & 19 deletions bridges/snowbridge/pallets/outbound-queue/merkle-tree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@ where
let root = merkelize::<H, _, _>(hashes.into_iter(), &mut collect_proof);
let leaf = leaf.expect("Requested `leaf_index` is greater than number of leaves.");

#[cfg(feature = "debug")]
log::debug!(
"[merkle_proof] Proof: {:?}",
collect_proof.proof.iter().map(hex::encode).collect::<Vec<_>>()
);

MerkleProof { root, proof: collect_proof.proof, number_of_leaves, leaf_index, leaf }
}

Expand Down Expand Up @@ -274,8 +268,6 @@ where
V: Visitor,
I: Iterator<Item = H256>,
{
#[cfg(feature = "debug")]
log::debug!("[merkelize_row]");
next.clear();

let hash_len = <H as sp_core::Hasher>::LENGTH;
Expand All @@ -286,9 +278,6 @@ where
let b = iter.next();
visitor.visit(index, &a, &b);

#[cfg(feature = "debug")]
log::debug!(" {:?}\n {:?}", a.as_ref().map(hex::encode), b.as_ref().map(hex::encode));

index += 2;
match (a, b) {
(Some(a), Some(b)) => {
Expand All @@ -309,14 +298,7 @@ where
// Last item = root.
(Some(a), None) => return Ok(a),
// Finish up, no more items.
_ => {
#[cfg(feature = "debug")]
log::debug!(
"[merkelize_row] Next: {:?}",
next.iter().map(hex::encode).collect::<Vec<_>>()
);
return Err(next)
},
_ => return Err(next),
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions bridges/snowbridge/primitives/router/src/inbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ impl<
ConvertAssetId,
EthereumUniversalLocation,
GlobalAssetHubLocation,
> where
>
where
CreateAssetCall: Get<CallIndex>,
CreateAssetDeposit: Get<u128>,
InboundQueuePalletInstance: Get<u8>,
Expand Down Expand Up @@ -226,7 +227,8 @@ impl<
ConvertAssetId,
EthereumUniversalLocation,
GlobalAssetHubLocation,
> where
>
where
CreateAssetCall: Get<CallIndex>,
CreateAssetDeposit: Get<u128>,
InboundQueuePalletInstance: Get<u8>,
Expand Down
3 changes: 2 additions & 1 deletion bridges/snowbridge/primitives/router/src/outbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ impl<UniversalLocation, EthereumNetwork, OutboundQueue, AgentHashedDescription,
OutboundQueue,
AgentHashedDescription,
ConvertAssetId,
> where
>
where
UniversalLocation: Get<InteriorLocation>,
EthereumNetwork: Get<NetworkId>,
OutboundQueue: SendMessage<Balance = u128>,
Expand Down
3 changes: 2 additions & 1 deletion bridges/snowbridge/runtime/runtime-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ impl<Balance, AccountId, FeeAssetLocation, EthereumNetwork, AssetTransactor, Fee
EthereumNetwork,
AssetTransactor,
FeeProvider,
> where
>
where
Balance: BaseArithmetic + Unsigned + Copy + From<u128> + Into<u128> + Debug,
AccountId: Clone + FullCodec,
FeeAssetLocation: Get<Location>,
Expand Down
3 changes: 2 additions & 1 deletion cumulus/pallets/parachain-system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ pub mod pallet {

let maximum_channels = host_config
.hrmp_max_message_num_per_candidate
.min(<AnnouncedHrmpMessagesPerCandidate<T>>::take()) as usize;
.min(<AnnouncedHrmpMessagesPerCandidate<T>>::take())
as usize;

// Note: this internally calls the `GetChannelInfo` implementation for this
// pallet, which draws on the `RelevantMessagingState`. That in turn has
Expand Down
61 changes: 1 addition & 60 deletions cumulus/pallets/xcmp-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use cumulus_pallet_parachain_system::AnyRelayNumber;
use cumulus_primitives_core::{ChannelInfo, IsSystem, ParaId};
use frame_support::{
derive_impl, parameter_types,
traits::{ConstU32, Everything, Nothing, OriginTrait},
traits::{ConstU32, Everything, OriginTrait},
BoundedSlice,
};
use frame_system::EnsureRoot;
Expand All @@ -30,10 +30,6 @@ use sp_runtime::{
BuildStorage,
};
use xcm::prelude::*;
use xcm_builder::{
FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, IsConcrete, NativeAsset,
ParentIsPreset,
};
use xcm_executor::traits::ConvertOrigin;

type Block = frame_system::mocking::MockBlock<Test>;
Expand Down Expand Up @@ -118,61 +114,6 @@ parameter_types! {
pub const MaxAssetsIntoHolding: u32 = 64;
}

/// Means for transacting assets on this chain.
pub type LocalAssetTransactor = FungibleAdapter<
// Use this currency:
Balances,
// Use this currency when it is a fungible asset matching the given location or name:
IsConcrete<RelayChain>,
// Do a simple punn to convert an AccountId32 Location into a native chain account ID:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
AccountId,
// We don't track any teleports.
(),
>;

pub type LocationToAccountId = (ParentIsPreset<AccountId>,);

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
// How to withdraw and deposit an asset.
type AssetTransactor = LocalAssetTransactor;
type OriginConverter = ();
type IsReserve = NativeAsset;
type IsTeleporter = NativeAsset;
type UniversalLocation = UniversalLocation;
type Barrier = ();
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type Trader = ();
type ResponseHandler = ();
type AssetTrap = ();
type AssetClaims = ();
type SubscriptionService = ();
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type AssetLocker = ();
type AssetExchanger = ();
type FeeManager = ();
type MessageExporter = ();
type UniversalAliases = Nothing;
type CallDispatcher = RuntimeCall;
type SafeCallFilter = Everything;
type Aliasers = Nothing;
type TransactionalProcessor = FrameTransactionalProcessor;
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = ();
}

pub type XcmRouter = (
// XCMP to communicate with the sibling chains.
XcmpQueue,
);

pub struct SystemParachainAsSuperuser<RuntimeOrigin>(PhantomData<RuntimeOrigin>);
impl<RuntimeOrigin: OriginTrait> ConvertOrigin<RuntimeOrigin>
for SystemParachainAsSuperuser<RuntimeOrigin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() {
let delivery_fees = AssetHubRococo::execute_with(|| {
xcm_helpers::teleport_assets_delivery_fees::<
<AssetHubRococoXcmConfig as xcm_executor::Config>::XcmSender,
>(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest)
>(
test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest
)
});

// Sender's balance is reduced
Expand Down
Loading
Loading