Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

XCM v3 Companion #697

Merged
merged 156 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
8f48998
Fixes
gavofyork Oct 23, 2021
2ac537e
Undiener
gavofyork Oct 23, 2021
138f06d
Undiener
gavofyork Oct 24, 2021
535b254
Undiener
gavofyork Oct 24, 2021
9f5c19f
Lockfile
gavofyork Oct 26, 2021
9a93d95
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
gavofyork Oct 27, 2021
2c0ac0a
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 31, 2021
fc381c9
Changes for send returning hash
gavofyork Jan 20, 2022
8b81608
Merge branch 'master' into gav-xcm-v3
KiChjang Mar 9, 2022
23c26db
Include message ID as params to execute_xcm
KiChjang Mar 9, 2022
6cec5c8
Fixes
KiChjang Mar 10, 2022
3fb3bb9
Merge branch 'master' into gav-xcm-v3
KiChjang Mar 11, 2022
005d37a
Fixes
KiChjang Mar 11, 2022
a10ac2e
Fixes
KiChjang Mar 11, 2022
9e70ba8
Fixes
KiChjang Mar 11, 2022
484e63d
Fixes
KiChjang Mar 11, 2022
f474297
Fixes
KiChjang Mar 11, 2022
ed87d18
Companion fixes
gavofyork Mar 11, 2022
feec189
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
gavofyork Mar 11, 2022
e5cdda0
Formatting
gavofyork Mar 11, 2022
8e73c00
Fixes
gavofyork Mar 11, 2022
3f9e25a
Formatting
gavofyork Mar 11, 2022
4b72261
Bump
gavofyork Mar 11, 2022
865839a
Bump
gavofyork Mar 11, 2022
6462dd9
Fixes
gavofyork Mar 11, 2022
b9cc2f2
Formatting
gavofyork Mar 11, 2022
fb1d3f2
Make the price of UMP/XCMP message sending configurable
KiChjang Mar 12, 2022
c42ccaf
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Mar 12, 2022
c3ee8a1
cargo fmt
KiChjang Mar 12, 2022
ae1436e
Remove InvertLocation
gavofyork Mar 12, 2022
d42833b
Formatting
gavofyork Mar 12, 2022
780475d
Use ConstantPrice from polkadot-runtime-common
KiChjang Mar 14, 2022
b8cb39d
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Mar 14, 2022
d8861bd
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Mar 21, 2022
3fd47f9
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Mar 21, 2022
4453f08
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Apr 15, 2022
9c6296c
Merge remote-tracking branch 'origin' into gav-xcm-v3
KiChjang Aug 13, 2022
667273a
Fix naming
KiChjang Aug 14, 2022
0e6fd2d
cargo fmt
KiChjang Aug 14, 2022
620c42c
Fixes
KiChjang Aug 14, 2022
059037f
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Aug 24, 2022
4e53da1
Fixes
KiChjang Aug 24, 2022
9ee4759
Fixes
KiChjang Aug 24, 2022
187c47a
Add CallDispatcher
KiChjang Aug 24, 2022
bd3ce91
Fixes
KiChjang Aug 24, 2022
ad1cbec
Fixes
KiChjang Aug 24, 2022
5a34514
Fixes
KiChjang Aug 24, 2022
67c99fd
Fixes
KiChjang Aug 24, 2022
1fc2cb4
Fixes
KiChjang Aug 24, 2022
0f3f8b8
Fixes
KiChjang Aug 24, 2022
57e4420
Fixes
KiChjang Aug 24, 2022
d1230e3
Fixes
KiChjang Aug 24, 2022
3ba852b
Fixes
KiChjang Aug 24, 2022
31accbd
Fixes
KiChjang Aug 25, 2022
004f044
Fixes
KiChjang Aug 25, 2022
bee34ba
Fixes
KiChjang Aug 25, 2022
5c54d38
Fixes
KiChjang Aug 25, 2022
5166698
Fixes
KiChjang Aug 25, 2022
7dc793d
Merge branch 'master' into gav-xcm-v3
KiChjang Sep 22, 2022
1dba83a
Fixes
KiChjang Sep 22, 2022
e02878e
Fixes
KiChjang Sep 22, 2022
25958aa
Fixes
KiChjang Sep 23, 2022
4f88026
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 26, 2022
9e30984
Fixes
KiChjang Sep 27, 2022
afccd79
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Sep 27, 2022
013534a
Fixes
KiChjang Sep 27, 2022
4984ef3
Remove unused import
KiChjang Sep 27, 2022
5efee4c
Remove unused import
KiChjang Sep 27, 2022
483b20c
XCMv3 fixes (#1710)
bkontur Oct 3, 2022
763d88b
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Oct 3, 2022
c446b63
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Oct 4, 2022
7290787
Avoid consuming XCM message for NotApplicable scenario (#1787)
bkontur Oct 25, 2022
6ece1b6
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Nov 7, 2022
ded04c2
Add 10 message processing limit to DMP queue
KiChjang Nov 15, 2022
f9fc7c6
Add 10 message limit to XCMP queue
KiChjang Nov 15, 2022
61438f5
Always increment the message_processed count whenever a message is pr…
KiChjang Nov 16, 2022
d1f21d7
Fix formatting
KiChjang Nov 16, 2022
03c318c
Set an upper limit to the overweight message DMP queue
KiChjang Nov 16, 2022
953aaae
Add upper limit to XCMP overweight message queue
KiChjang Nov 16, 2022
e196377
Fix for missing weight for `fn unpaid_execution()`
bkontur Nov 8, 2022
aea33d1
Fix - usage of `messages_processed`
bkontur Nov 19, 2022
6d534f0
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Nov 22, 2022
196ad14
Fixes
KiChjang Nov 22, 2022
331b21e
Fixes
KiChjang Nov 22, 2022
b613a35
Fixes
KiChjang Nov 22, 2022
930b988
cargo fmt
KiChjang Nov 22, 2022
cd1452b
Fixes
KiChjang Nov 22, 2022
a0865d8
Fixes
KiChjang Nov 22, 2022
d953b60
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Nov 22, 2022
e80d39b
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Nov 22, 2022
3fdf078
Fixes
KiChjang Nov 22, 2022
d6d1a7d
Fixes
KiChjang Nov 22, 2022
2d4603d
Remove unused import
KiChjang Nov 28, 2022
3647b74
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Nov 28, 2022
c6f8c3d
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Nov 29, 2022
db18833
Fixes for gav-xcm-v3 (#1835)
bkontur Nov 29, 2022
61c1cdf
Fixes
KiChjang Nov 29, 2022
d30d218
Fixes
KiChjang Nov 29, 2022
2a8678d
Fixes
KiChjang Nov 29, 2022
b1e8b37
Fixes
KiChjang Nov 29, 2022
fad4c13
Fixes
KiChjang Nov 29, 2022
f1e7e18
Fix tests
KiChjang Nov 29, 2022
4829edb
Fixes
KiChjang Nov 29, 2022
8afc224
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 3, 2022
6057952
Add SafeCallFilter
KiChjang Dec 3, 2022
33404f2
Add missing config items
KiChjang Dec 3, 2022
ff25026
Add TODO
KiChjang Dec 3, 2022
080c7f0
Use () as the PriceForParentDelivery
KiChjang Dec 6, 2022
a9a359b
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 6, 2022
9bad64e
Fixes
KiChjang Dec 6, 2022
9ad8152
Fixes
KiChjang Dec 6, 2022
f366c7f
Fixes
KiChjang Dec 6, 2022
92ace05
Fixes
KiChjang Dec 6, 2022
d2684b2
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 7, 2022
ffc7926
Update transact_origin to transact_origin_and_runtime_call
KiChjang Dec 8, 2022
cb1dd01
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 8, 2022
7c25f95
Add ReachableDest config item to XCM pallet
KiChjang Dec 8, 2022
b144b78
Update SafeCallFilter to allow remark_with_event in runtime benchmarks
KiChjang Dec 9, 2022
2719c7a
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 9, 2022
06c43f5
cargo fmt
KiChjang Dec 9, 2022
7f0e710
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 10, 2022
fef449a
Update substrate
KiChjang Dec 10, 2022
e3a6bc6
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Dec 11, 2022
1fcb5d5
Fix worst_case_holding
KiChjang Dec 12, 2022
dd74806
Fix DMQ queue unit tests
KiChjang Dec 12, 2022
97d8c80
Remove unused label
KiChjang Dec 12, 2022
36a767c
cargo fmt
KiChjang Dec 12, 2022
1d6f7ae
Actually process incoming XCMs
KiChjang Dec 12, 2022
90b7e77
Fixes
KiChjang Dec 12, 2022
838656a
Fixes
KiChjang Dec 12, 2022
a50aed6
Fixes
KiChjang Dec 12, 2022
2b2d90e
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Dec 13, 2022
ccb74d9
Fixes - return back Weightless
bkontur Dec 13, 2022
221d6be
Added measured benchmarks for `pallet_xcm` (#1968)
bkontur Dec 13, 2022
27f9798
cargo fmt
bkontur Dec 13, 2022
bb821eb
Fix benchmarks
KiChjang Dec 14, 2022
c70a11f
Bko gav xcm v3 (#1993)
bkontur Dec 14, 2022
5cf2a72
Change AllowUnpaidExecutionFrom to be explicit
KiChjang Dec 15, 2022
1d53b51
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 21, 2022
2f39d75
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Dec 22, 2022
5cdc48a
xcm-v3 benchmarks, weights, fixes for bridge-hubs (#2035)
bkontur Dec 23, 2022
7f3727f
Merge branch 'master' into gav-xcm-v3
KiChjang Dec 29, 2022
e2a3354
Add event for showing the hash of an UMP sent message (#1228)
girazoki Jan 3, 2023
b7970c3
Merge branch 'master' into gav-xcm-v3
KiChjang Jan 3, 2023
63a18c2
Fixes
KiChjang Jan 3, 2023
f9a0390
Fixes
KiChjang Jan 3, 2023
893bc5c
Fixes
KiChjang Jan 3, 2023
e303fb2
Fixes
KiChjang Jan 3, 2023
8fe432b
Allow explicit unpaid executions from the relay chains for system par…
KiChjang Jan 7, 2023
e28ef3c
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
KiChjang Jan 7, 2023
87e0ea1
Allow receiving XCMs from any relay chain plurality
KiChjang Jan 10, 2023
146c742
Fixes
KiChjang Jan 10, 2023
d5787aa
Merge remote-tracking branch 'origin/master' into gav-xcm-v3
bkontur Jan 13, 2023
447d1a7
update lockfile for {"polkadot", "substrate"}
Jan 17, 2023
eb99eff
Update polkadot
KiChjang Jan 17, 2023
a6210c1
Add runtime-benchmarks feature
KiChjang Jan 17, 2023
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin' into gav-xcm-v3
  • Loading branch information
KiChjang committed Aug 13, 2022
commit 9c6296ca959ce54389bd7e241b7494d3a818cdba
2,725 changes: 829 additions & 1,896 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pallets/parachain-system/src/validate_block/implementation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ where
assert!(parent_head.hash() == *block.header().parent_hash(), "Invalid parent hash",);

// Create the db
let (db, _root) = match storage_proof.to_memory_db(Some(parent_head.state_root())) {
Ok((db, root)) => (db, root),
let db = match storage_proof.to_memory_db(Some(parent_head.state_root())) {
Ok((db, _)) => db,
Err(_) => panic!("Compact proof decoding failure."),
};

Expand Down
21 changes: 12 additions & 9 deletions pallets/xcmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,17 @@ pub mod pallet {
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
/// Some XCM was executed ok.
Success(Option<XcmHash>),
Success { message_hash: Option<XcmHash>, weight: Weight },
/// Some XCM failed.
Fail(Option<XcmHash>, XcmError),
Fail { message_hash: Option<XcmHash>, error: XcmError, weight: Weight },
/// Bad XCM version used.
BadVersion(Option<XcmHash>),
BadVersion { message_hash: Option<XcmHash> },
/// Bad XCM format used.
BadFormat(Option<XcmHash>),
BadFormat { message_hash: Option<XcmHash> },
/// An upward message was sent to the relay chain.
UpwardMessageSent(Option<XcmHash>),
UpwardMessageSent { message_hash: Option<XcmHash> },
/// An HRMP message was sent to a sibling parachain.
XcmpMessageSent(Option<XcmHash>),
XcmpMessageSent { message_hash: Option<XcmHash> },
/// An XCM exceeded the individual message weight budget.
OverweightEnqueued {
sender: ParaId,
Expand Down Expand Up @@ -608,9 +608,12 @@ impl<T: Config> Pallet<T> {
let (result, event) = match Xcm::<T::Call>::try_from(xcm) {
Ok(xcm) => {
let location = (Parent, Parachain(sender.into()));

match T::XcmExecutor::execute_xcm(location, xcm, hash, max_weight) {
Outcome::Error(e) => (Err(e), Event::Fail(Some(hash), e)),
Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))),
Outcome::Error(e) =>
(Err(e), Event::Fail { message_hash: Some(hash), error: e, weight: 0 }),
Outcome::Complete(w) =>
(Ok(w), Event::Success { message_hash: Some(hash), weight: w }),
// As far as the caller is concerned, this was dispatched without error, so
// we just report the weight used.
Outcome::Incomplete(w, e) =>
Expand Down Expand Up @@ -1142,7 +1145,7 @@ impl<T: Config> SendXcm for Pallet<T> {

match Self::send_fragment(id, XcmpMessageFormat::ConcatenatedVersionedXcm, xcm) {
Ok(_) => {
Self::deposit_event(Event::XcmpMessageSent(Some(hash)));
Self::deposit_event(Event::XcmpMessageSent { message_hash: Some(hash) });
Ok(hash)
},
Err(e) => Err(SendError::Transport(<&'static str>::from(e))),
Expand Down
2 changes: 1 addition & 1 deletion parachain-template/runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
};
use core::marker::PhantomData;
use frame_support::{
match_types, parameter_types,
log, match_types, parameter_types,
traits::{ConstU32, Everything, Nothing},
weights::Weight,
};
Expand Down
2 changes: 1 addition & 1 deletion parachains/pallets/ping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub mod pallet {
) {
Ok((hash, cost)) => {
Pings::<T>::insert(seq, n);
Self::deposit_event(Event::PingSent(para, seq, payload, hash, cost));
Self::deposit_event(Event::PingSent(para, seq, payload.to_vec(), hash, cost));
},
Err(e) => {
Self::deposit_event(Event::ErrorSendingPing(
Expand Down
1 change: 1 addition & 0 deletions parachains/runtimes/assets/statemine/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ parameter_types! {
pub UnitWeightCost: Weight = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}

match_types! {
Expand Down
1 change: 1 addition & 0 deletions parachains/runtimes/assets/statemint/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ parameter_types! {
pub UnitWeightCost: Weight = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}

match_types! {
Expand Down
1 change: 1 addition & 0 deletions parachains/runtimes/assets/westmint/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ parameter_types! {
pub UnitWeightCost: Weight = 1_000_000_000;
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
}

match_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use super::{
};
use frame_support::{
match_types, parameter_types,
traits::{ConstU32, EnsureOneOf, Everything, Nothing},
traits::{ConstU32, EitherOfDiverse, Everything, Nothing},
weights::Weight,
};
use frame_system::EnsureRoot;
Expand Down
1 change: 1 addition & 0 deletions parachains/runtimes/testing/rococo-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use frame_support::traits::{ConstU32, Nothing};
use sp_api::impl_runtime_apis;
use sp_core::OpaqueMetadata;
Expand Down
8 changes: 7 additions & 1 deletion primitives/utility/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@

use codec::Encode;
use cumulus_primitives_core::{MessageSendError, UpwardMessageSender};
use frame_support::traits::Get;
use frame_support::{
traits::{Get, tokens::{fungibles, fungibles::Inspect}},
weights::Weight,
};
use polkadot_runtime_common::xcm_sender::ConstantPrice;
use sp_runtime::{traits::Saturating, SaturatedConversion};
use sp_std::{marker::PhantomData, prelude::*};
use xcm::{latest::prelude::*, WrapVersion};
use xcm_builder::TakeRevenue;
use xcm_executor::traits::{MatchesFungibles, TransactAsset, WeightTrader};

pub trait PriceForParentDelivery {
fn price_for_parent_delivery(message: &Xcm<()>) -> MultiAssets;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.