Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jan 14, 2025
1 parent 83a331b commit fd34ca4
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 164 deletions.
66 changes: 3 additions & 63 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1441,3 +1441,4 @@ wasmi = { opt-level = 3 }
x25519-dalek = { opt-level = 3 }
yamux = { opt-level = 3 }
zeroize = { opt-level = 3 }
tikv-jemalloc-sys = { opt-level = 3 }
3 changes: 0 additions & 3 deletions bridges/snowbridge/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ runtime-benchmarks = [
"polkadot-parachain-primitives/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
<<<<<<< HEAD
=======
"xcm-executor/runtime-benchmarks",
"xcm/runtime-benchmarks",
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))
]
10 changes: 0 additions & 10 deletions cumulus/pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,16 @@ sp-std.workspace = true
sp-trie.workspace = true
sp-version.workspace = true
polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true }
<<<<<<< HEAD
polkadot-runtime-parachains.workspace = true
polkadot-runtime-common = { optional = true, workspace = true }
xcm.workspace = true
xcm-builder.workspace = true
cumulus-pallet-parachain-system-proc-macro.workspace = true
cumulus-primitives-core.workspace = true
cumulus-primitives-parachain-inherent.workspace = true
cumulus-primitives-proof-size-hostfunction.workspace = true
=======
polkadot-runtime-parachains = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }

# Cumulus
cumulus-pallet-parachain-system-proc-macro = { workspace = true }
cumulus-primitives-core = { workspace = true }
cumulus-primitives-parachain-inherent = { workspace = true }
cumulus-primitives-proof-size-hostfunction = { workspace = true }
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))

[dev-dependencies]
assert_matches = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
// limitations under the License.

use crate::imports::*;
<<<<<<< HEAD
=======
use rococo_system_emulated_network::rococo_emulated_chain::rococo_runtime::Dmp;
use sp_core::{crypto::get_public_from_string_or_panic, sr25519};
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))

fn relay_to_para_sender_assertions(t: RelayToParaTest) {
type RuntimeEvent = <Rococo as Chain>::RuntimeEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

<<<<<<< HEAD
use crate::imports::*;
=======
use crate::{create_pool_with_wnd_on, foreign_balance_on, imports::*};
use sp_core::{crypto::get_public_from_string_or_panic, sr25519};
use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp;
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))

fn relay_to_para_sender_assertions(t: RelayToParaTest) {
type RuntimeEvent = <Westend as Chain>::RuntimeEvent;
Expand Down
5 changes: 1 addition & 4 deletions polkadot/xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ json-schema = [
"dep:schemars",
"sp-weights/json-schema",
]
runtime-benchmarks = [
"frame-support/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
runtime-benchmarks = ["sp-runtime/runtime-benchmarks"]
39 changes: 0 additions & 39 deletions polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,45 +321,6 @@ benchmarks_instance_pallet! {
}
}

<<<<<<< HEAD
=======
initiate_transfer {
let (sender_account, sender_location) = account_and_location::<T>(1);
let asset = T::get_asset();
let mut holding = T::worst_case_holding(1);
let dest_location = T::valid_destination()?;

// Ensure that origin can send to destination (e.g. setup delivery fees, ensure router setup, ...)
let (_, _) = T::DeliveryHelper::ensure_successful_delivery(
&sender_location,
&dest_location,
FeeReason::ChargeFees,
);

let sender_account_balance_before = T::TransactAsset::balance(&sender_account);

// Add our asset to the holding.
holding.push(asset.clone());

let mut executor = new_executor::<T>(sender_location);
executor.set_holding(holding.into());
let instruction = Instruction::<XcmCallOf<T>>::InitiateTransfer {
destination: dest_location,
// ReserveDeposit is the most expensive filter.
remote_fees: Some(AssetTransferFilter::ReserveDeposit(asset.clone().into())),
// It's more expensive if we reanchor the origin.
preserve_origin: true,
assets: vec![AssetTransferFilter::ReserveDeposit(asset.into())],
remote_xcm: Xcm::new(),
};
let xcm = Xcm(vec![instruction]);
}: {
executor.bench_process(xcm)?;
} verify {
assert!(T::TransactAsset::balance(&sender_account) <= sender_account_balance_before);
}

>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))
impl_benchmark_test_suite!(
Pallet,
crate::fungible::mock::new_test_ext(),
Expand Down
15 changes: 1 addition & 14 deletions polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,24 +293,11 @@ benchmarks! {
let mut executor = new_executor::<T>(origin.clone());
let instruction = Instruction::SubscribeVersion { query_id, max_response_weight };
let xcm = Xcm(vec![instruction]);
<<<<<<< HEAD
T::DeliveryHelper::ensure_successful_delivery(&origin, &origin, FeeReason::QueryPallet);
} : {
executor.bench_process(xcm)?;
} verify {
assert!(<T::XcmConfig as xcm_executor::Config>::SubscriptionService::is_subscribed(&origin));
=======

T::DeliveryHelper::ensure_successful_delivery(&origin, &origin, FeeReason::QueryPallet);

#[block]
{
executor.bench_process(xcm)?;
}
assert!(<T::XcmConfig as xcm_executor::Config>::SubscriptionService::is_subscribed(
&origin
));
Ok(())
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))
}

unsubscribe_version {
Expand Down
11 changes: 11 additions & 0 deletions polkadot/xcm/src/v4/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ pub trait SendXcm {

/// Actually carry out the delivery operation for a previously validated message sending.
fn deliver(ticket: Self::Ticket) -> result::Result<XcmHash, SendError>;

/// Ensure `[Self::delivery]` is successful for the given `location` when called in benchmarks.
#[cfg(feature = "runtime-benchmarks")]
fn ensure_successful_delivery(_location: Option<Location>) {}
}

#[impl_trait_for_tuples::impl_for_tuples(30)]
Expand Down Expand Up @@ -286,6 +290,13 @@ impl SendXcm for Tuple {
)* );
Err(SendError::Unroutable)
}

#[cfg(feature = "runtime-benchmarks")]
fn ensure_successful_delivery(location: Option<Location>) {
for_tuples!( #(
return Tuple::ensure_successful_delivery(location.clone());
)* );
}
}

/// Convenience function for using a `SendXcm` implementation. Just interprets the `dest` and wraps
Expand Down
26 changes: 4 additions & 22 deletions polkadot/xcm/xcm-executor/integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ workspace = true

[dependencies]
codec = { workspace = true, default-features = true }
<<<<<<< HEAD
frame-support.workspace = true
frame-system.workspace = true
futures = { workspace = true }
pallet-transaction-payment.workspace = true
pallet-transaction-payment.default-features = true
pallet-sudo.workspace = true
pallet-xcm.workspace = true
pallet-xcm.default-features = true
polkadot-test-client.workspace = true
polkadot-test-runtime.workspace = true
polkadot-test-service.workspace = true
polkadot-runtime-parachains.workspace = true
sp-consensus.workspace = true
sp-consensus.default-features = true
sp-keyring.workspace = true
Expand All @@ -36,27 +38,7 @@ sp-tracing.workspace = true
sp-tracing.default-features = true
sp-core.workspace = true
sp-core.default-features = true
=======
frame-support = { workspace = true }
frame-system = { workspace = true, default-features = true }
futures = { workspace = true }
pallet-transaction-payment = { workspace = true, default-features = true }
pallet-sudo = { workspace = true, default-features = true }
pallet-xcm = { workspace = true, default-features = true }
polkadot-runtime-parachains = { workspace = true, default-features = true }
polkadot-test-client = { workspace = true }
polkadot-test-runtime = { workspace = true }
polkadot-test-service = { workspace = true }
sp-consensus = { workspace = true, default-features = true }
sp-keyring = { workspace = true, default-features = true }
sp-runtime = { workspace = true }
sp-state-machine = { workspace = true, default-features = true }
xcm = { workspace = true }
xcm-executor = { workspace = true, default-features = true }
sp-tracing = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
>>>>>>> c10e25aa (dmp: Check that the para exist before delivering a message (#6604))

[features]
default = ["std"]
std = ["frame-support/std", "frame-system/std", "pallet-sudo/std", "polkadot-runtime-parachains/std", "sp-runtime/std", "xcm/std"]
std = ["sp-runtime/std", "xcm/std"]

0 comments on commit fd34ca4

Please sign in to comment.