Skip to content
GitLab
Explore
Sign in
parity
Mirrored projects
polkadot-sdk
Compare revisions
be1d7d05e5f32b1bfa67aec2f6344d2c6ff60f50 to aceda4659509d426d364188fa72555de58b887ba
Hide whitespace changes
Inline
Side-by-side
cumulus/parachains/runtimes/glutton/glutton-westend/build.rs
View file @
aceda465
...
...
@@ -16,9 +16,5 @@
use
substrate_wasm_builder
::
WasmBuilder
;
fn
main
()
{
WasmBuilder
::
new
()
.with_current_project
()
.export_heap_base
()
.import_memory
()
.build
()
WasmBuilder
::
build_using_defaults
();
}
cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs
View file @
aceda465
...
...
@@ -30,8 +30,8 @@ use xcm_builder::{
parameter_types!
{
pub
const
WestendLocation
:
Location
=
Location
::
parent
();
pub
const
WestendNetwork
:
Option
<
NetworkId
>
=
Some
(
NetworkId
::
Westend
)
;
pub
UniversalLocation
:
InteriorLocation
=
[
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
pub
const
WestendNetwork
:
NetworkId
=
NetworkId
::
Westend
;
pub
UniversalLocation
:
InteriorLocation
=
[
GlobalConsensus
(
WestendNetwork
::
get
()),
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
}
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
...
...
cumulus/parachains/runtimes/people/people-rococo/src/lib.rs
View file @
aceda465
...
...
@@ -102,6 +102,7 @@ pub type UncheckedExtrinsic =
/// Migrations to apply on runtime upgrade.
pub
type
Migrations
=
(
pallet_collator_selection
::
migration
::
v2
::
MigrationToV2
<
Runtime
>
,
// permanent
pallet_xcm
::
migration
::
MigrateToLatestXcmVersion
<
Runtime
>
,
);
...
...
cumulus/parachains/runtimes/people/people-rococo/src/weights/pallet_xcm.rs
View file @
aceda465
...
...
@@ -17,9 +17,9 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-0
3
-2
1
, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-0
2
-2
0
, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-
h2rr8wx7
-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-
bn-ce5rx
-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("people-rococo-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -62,28 +62,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 17_935_000 picoseconds.
Weight
::
from_parts
(
18_482_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn
send_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 18_311_000 picoseconds.
Weight
::
from_parts
(
18_850_000
,
0
)
// Minimum execution time: 17_830_000 picoseconds.
Weight
::
from_parts
(
18_411_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -104,8 +84,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `70`
// Estimated: `3535`
// Minimum execution time: 5
6_182
_000 picoseconds.
Weight
::
from_parts
(
5
8_136
_000
,
0
)
// Minimum execution time: 5
5_456
_000 picoseconds.
Weight
::
from_parts
(
5
6_808
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3535
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -140,24 +120,14 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight
::
from_parts
(
18_446_744_073_709_551_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn
execute_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight
::
from_parts
(
18_446_744_073_709_551_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn
force_xcm_version
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 5_9
7
9_000 picoseconds.
Weight
::
from_parts
(
6_
289
_000
,
0
)
// Minimum execution time: 5_99
6
_000 picoseconds.
Weight
::
from_parts
(
6_
154
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -167,8 +137,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_
853
_000 picoseconds.
Weight
::
from_parts
(
2_045
_000
,
0
)
// Minimum execution time: 1_
768
_000 picoseconds.
Weight
::
from_parts
(
1_914
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -192,8 +162,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 2
3_827
_000 picoseconds.
Weight
::
from_parts
(
24_
493
_000
,
0
)
// Minimum execution time: 2
4_120
_000 picoseconds.
Weight
::
from_parts
(
24_
745
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -216,8 +186,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `255`
// Estimated: `3720`
// Minimum execution time: 26_
755
_000 picoseconds.
Weight
::
from_parts
(
27_
125
_000
,
0
)
// Minimum execution time: 26_
630
_000 picoseconds.
Weight
::
from_parts
(
27_
289
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3720
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -228,8 +198,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_8
98
_000 picoseconds.
Weight
::
from_parts
(
2_028
_000
,
0
)
// Minimum execution time: 1_8
21
_000 picoseconds.
Weight
::
from_parts
(
1_946
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -239,8 +209,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `89`
// Estimated: `13454`
// Minimum execution time: 16_
300
_000 picoseconds.
Weight
::
from_parts
(
16_9
95
_000
,
0
)
// Minimum execution time: 16_
586
_000 picoseconds.
Weight
::
from_parts
(
16_9
77
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13454
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -251,8 +221,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `93`
// Estimated: `13458`
// Minimum execution time: 16_
495
_000 picoseconds.
Weight
::
from_parts
(
1
6_950
_000
,
0
)
// Minimum execution time: 16_
923
_000 picoseconds.
Weight
::
from_parts
(
1
7_415
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13458
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -263,8 +233,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `15946`
// Minimum execution time: 18_
153
_000 picoseconds.
Weight
::
from_parts
(
18_
595
_000
,
0
)
// Minimum execution time: 18_
596
_000 picoseconds.
Weight
::
from_parts
(
18_
823
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
15946
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -284,8 +254,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `6046`
// Minimum execution time: 23_
3
87_000 picoseconds.
Weight
::
from_parts
(
24_
677
_000
,
0
)
// Minimum execution time: 23_8
1
7_000 picoseconds.
Weight
::
from_parts
(
24_
520
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6046
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -296,8 +266,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `136`
// Estimated: `11026`
// Minimum execution time: 1
0_939
_000 picoseconds.
Weight
::
from_parts
(
11_
210
_000
,
0
)
// Minimum execution time: 1
1_042
_000 picoseconds.
Weight
::
from_parts
(
11_
578
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11026
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -307,8 +277,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `100`
// Estimated: `13465`
// Minimum execution time: 1
6_850
_000 picoseconds.
Weight
::
from_parts
(
17_
195
_000
,
0
)
// Minimum execution time: 1
7_306
_000 picoseconds.
Weight
::
from_parts
(
17_
817
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13465
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -329,8 +299,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `13471`
// Minimum execution time: 3
1_93
1_000 picoseconds.
Weight
::
from_parts
(
32_
4
94_000
,
0
)
// Minimum execution time: 3
2_14
1_000 picoseconds.
Weight
::
from_parts
(
32_9
5
4_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13471
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
10
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -343,8 +313,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `32`
// Estimated: `1517`
// Minimum execution time: 3_
514
_000 picoseconds.
Weight
::
from_parts
(
3_
709
_000
,
0
)
// Minimum execution time: 3_
410
_000 picoseconds.
Weight
::
from_parts
(
3_
556
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1517
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -355,8 +325,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `7669`
// Estimated: `11134`
// Minimum execution time: 2
4_863
_000 picoseconds.
Weight
::
from_parts
(
25_2
93
_000
,
0
)
// Minimum execution time: 2
5_021
_000 picoseconds.
Weight
::
from_parts
(
25_2
40
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11134
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -367,8 +337,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `90`
// Estimated: `3555`
// Minimum execution time: 33_
799
_000 picoseconds.
Weight
::
from_parts
(
34_6
6
5_000
,
0
)
// Minimum execution time: 33_
801
_000 picoseconds.
Weight
::
from_parts
(
34_6
5
5_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3555
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs
View file @
aceda465
...
...
@@ -36,16 +36,16 @@ use polkadot_parachain_primitives::primitives::Sibling;
use
sp_runtime
::
traits
::
AccountIdConversion
;
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
KnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeTerminus
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HashedDescription
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
HrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeTerminus
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HashedDescription
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
};
use
xcm_executor
::
{
traits
::
WithOriginFilter
,
XcmExecutor
}
;
use
xcm_executor
::
XcmExecutor
;
parameter_types!
{
pub
const
RootLocation
:
Location
=
Location
::
here
();
...
...
@@ -148,55 +148,6 @@ impl Contains<Location> for ParentOrParentsPlurality {
}
}
/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
/// account for proof size weights.
///
/// Calls that are allowed through this filter must:
/// 1. Have a fixed weight;
/// 2. Cannot lead to another call being made;
/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters.
pub
struct
SafeCallFilter
;
impl
Contains
<
RuntimeCall
>
for
SafeCallFilter
{
fn
contains
(
call
:
&
RuntimeCall
)
->
bool
{
#[cfg(feature
=
"runtime-benchmarks"
)]
{
if
matches!
(
call
,
RuntimeCall
::
System
(
frame_system
::
Call
::
remark_with_event
{
..
}))
{
return
true
}
}
matches!
(
call
,
RuntimeCall
::
PolkadotXcm
(
pallet_xcm
::
Call
::
force_xcm_version
{
..
}
|
pallet_xcm
::
Call
::
force_default_xcm_version
{
..
}
)
|
RuntimeCall
::
System
(
frame_system
::
Call
::
set_heap_pages
{
..
}
|
frame_system
::
Call
::
set_code
{
..
}
|
frame_system
::
Call
::
set_code_without_checks
{
..
}
|
frame_system
::
Call
::
authorize_upgrade
{
..
}
|
frame_system
::
Call
::
authorize_upgrade_without_checks
{
..
}
|
frame_system
::
Call
::
kill_prefix
{
..
},
)
|
RuntimeCall
::
ParachainSystem
(
..
)
|
RuntimeCall
::
Timestamp
(
..
)
|
RuntimeCall
::
Balances
(
..
)
|
RuntimeCall
::
CollatorSelection
(
pallet_collator_selection
::
Call
::
set_desired_candidates
{
..
}
|
pallet_collator_selection
::
Call
::
set_candidacy_bond
{
..
}
|
pallet_collator_selection
::
Call
::
register_as_candidate
{
..
}
|
pallet_collator_selection
::
Call
::
leave_intent
{
..
}
|
pallet_collator_selection
::
Call
::
set_invulnerables
{
..
}
|
pallet_collator_selection
::
Call
::
add_invulnerable
{
..
}
|
pallet_collator_selection
::
Call
::
remove_invulnerable
{
..
},
)
|
RuntimeCall
::
Session
(
pallet_session
::
Call
::
purge_keys
{
..
})
|
RuntimeCall
::
XcmpQueue
(
..
)
|
RuntimeCall
::
MessageQueue
(
..
)
|
RuntimeCall
::
Identity
(
..
)
|
RuntimeCall
::
IdentityMigrator
(
..
)
)
}
}
pub
type
Barrier
=
TrailingSetTopicAsId
<
DenyThenTry
<
DenyReserveTransferToRelayChain
,
...
...
@@ -214,6 +165,8 @@ pub type Barrier = TrailingSetTopicAsId<
AllowExplicitUnpaidExecutionFrom
<
ParentOrParentsPlurality
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
ParentRelayOrSiblingParachains
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
@@ -270,8 +223,8 @@ impl xcm_executor::Config for XcmConfig {
>
;
type
MessageExporter
=
();
type
UniversalAliases
=
Nothing
;
type
CallDispatcher
=
WithOriginFilter
<
SafeCallFilter
>
;
type
SafeCallFilter
=
SafeCallFilter
;
type
CallDispatcher
=
RuntimeCall
;
type
SafeCallFilter
=
Everything
;
type
Aliasers
=
Nothing
;
type
TransactionalProcessor
=
FrameTransactionalProcessor
;
type
HrmpNewChannelOpenRequestHandler
=
();
...
...
cumulus/parachains/runtimes/people/people-westend/src/lib.rs
View file @
aceda465
...
...
@@ -102,6 +102,7 @@ pub type UncheckedExtrinsic =
/// Migrations to apply on runtime upgrade.
pub
type
Migrations
=
(
pallet_collator_selection
::
migration
::
v2
::
MigrationToV2
<
Runtime
>
,
// permanent
pallet_xcm
::
migration
::
MigrateToLatestXcmVersion
<
Runtime
>
,
);
...
...
cumulus/parachains/runtimes/people/people-westend/src/weights/pallet_xcm.rs
View file @
aceda465
...
...
@@ -17,9 +17,9 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-0
3
-2
1
, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-0
2
-2
0
, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner-
h2rr8wx7
-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! HOSTNAME: `runner-
bn-ce5rx
-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("people-westend-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -62,28 +62,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 17_450_000 picoseconds.
Weight
::
from_parts
(
17_913_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1)
/// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0)
/// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn
send_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 18_082_000 picoseconds.
Weight
::
from_parts
(
18_293_000
,
0
)
// Minimum execution time: 17_856_000 picoseconds.
Weight
::
from_parts
(
18_473_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -104,8 +84,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `70`
// Estimated: `3535`
// Minimum execution time: 5
4_939
_000 picoseconds.
Weight
::
from_parts
(
5
5_721
_000
,
0
)
// Minimum execution time: 5
6_112
_000 picoseconds.
Weight
::
from_parts
(
5
7_287
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3535
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -140,24 +120,14 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight
::
from_parts
(
18_446_744_073_709_551_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn
execute_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight
::
from_parts
(
18_446_744_073_709_551_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn
force_xcm_version
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time:
5_789
_000 picoseconds.
Weight
::
from_parts
(
5_995
_000
,
0
)
// Minimum execution time:
6_186
_000 picoseconds.
Weight
::
from_parts
(
6_420
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -167,8 +137,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_
795
_000 picoseconds.
Weight
::
from_parts
(
1_9
24
_000
,
0
)
// Minimum execution time: 1_
824
_000 picoseconds.
Weight
::
from_parts
(
1_9
99
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -192,8 +162,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 23_
445
_000 picoseconds.
Weight
::
from_parts
(
2
3_90
6_000
,
0
)
// Minimum execution time: 23_
833
_000 picoseconds.
Weight
::
from_parts
(
2
4_63
6_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -216,8 +186,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `255`
// Estimated: `3720`
// Minimum execution time: 26_5
90
_000 picoseconds.
Weight
::
from_parts
(
27_
056
_000
,
0
)
// Minimum execution time: 26_5
57
_000 picoseconds.
Weight
::
from_parts
(
27_
275
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3720
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -228,8 +198,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_
889
_000 picoseconds.
Weight
::
from_parts
(
1_962
_000
,
0
)
// Minimum execution time: 1_
921
_000 picoseconds.
Weight
::
from_parts
(
2_040
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -239,8 +209,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `89`
// Estimated: `13454`
// Minimum execution time: 16_
408
_000 picoseconds.
Weight
::
from_parts
(
1
6_877
_000
,
0
)
// Minimum execution time: 16_
832
_000 picoseconds.
Weight
::
from_parts
(
1
7_312
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13454
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -251,8 +221,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `93`
// Estimated: `13458`
// Minimum execution time: 16_
791
_000 picoseconds.
Weight
::
from_parts
(
17_1
11
_000
,
0
)
// Minimum execution time: 16_
687
_000 picoseconds.
Weight
::
from_parts
(
17_1
23
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13458
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -263,8 +233,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `15946`
// Minimum execution time: 18_
355
_000 picoseconds.
Weight
::
from_parts
(
1
9_11
0_000
,
0
)
// Minimum execution time: 18_
164
_000 picoseconds.
Weight
::
from_parts
(
1
8_58
0_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
15946
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -284,8 +254,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `6046`
// Minimum execution time: 23_
354
_000 picoseconds.
Weight
::
from_parts
(
2
3_999
_000
,
0
)
// Minimum execution time: 23_
577
_000 picoseconds.
Weight
::
from_parts
(
2
4_324
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6046
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -296,8 +266,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `136`
// Estimated: `11026`
// Minimum execution time: 11_0
65
_000 picoseconds.
Weight
::
from_parts
(
11_
302
_000
,
0
)
// Minimum execution time: 11_0
14
_000 picoseconds.
Weight
::
from_parts
(
11_
223
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11026
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -307,8 +277,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `100`
// Estimated: `13465`
// Minimum execution time: 16_
998
_000 picoseconds.
Weight
::
from_parts
(
17_
509
_000
,
0
)
// Minimum execution time: 16_
887
_000 picoseconds.
Weight
::
from_parts
(
17_
361
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13465
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -329,8 +299,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `13471`
// Minimum execution time: 31_
068
_000 picoseconds.
Weight
::
from_parts
(
3
1_978
_000
,
0
)
// Minimum execution time: 31_
705
_000 picoseconds.
Weight
::
from_parts
(
3
2_166
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13471
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
10
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -343,8 +313,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `32`
// Estimated: `1517`
// Minimum execution time: 3_
47
8_000 picoseconds.
Weight
::
from_parts
(
3_
595
_000
,
0
)
// Minimum execution time: 3_
56
8_000 picoseconds.
Weight
::
from_parts
(
3_
669
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1517
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -355,8 +325,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `7669`
// Estimated: `11134`
// Minimum execution time: 24_
962
_000 picoseconds.
Weight
::
from_parts
(
25_4
0
4_000
,
0
)
// Minimum execution time: 24_
823
_000 picoseconds.
Weight
::
from_parts
(
25_
3
44_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11134
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -367,8 +337,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `90`
// Estimated: `3555`
// Minimum execution time: 3
2_685
_000 picoseconds.
Weight
::
from_parts
(
3
3_592
_000
,
0
)
// Minimum execution time: 3
4_516
_000 picoseconds.
Weight
::
from_parts
(
3
5_478
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3555
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs
View file @
aceda465
...
...
@@ -36,16 +36,16 @@ use polkadot_parachain_primitives::primitives::Sibling;
use
sp_runtime
::
traits
::
AccountIdConversion
;
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
KnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeTerminus
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HashedDescription
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
HrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeTerminus
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HashedDescription
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
};
use
xcm_executor
::
{
traits
::
WithOriginFilter
,
XcmExecutor
}
;
use
xcm_executor
::
XcmExecutor
;
parameter_types!
{
pub
const
RootLocation
:
Location
=
Location
::
here
();
...
...
@@ -155,55 +155,6 @@ impl Contains<Location> for FellowsPlurality {
}
}
/// A call filter for the XCM Transact instruction. This is a temporary measure until we properly
/// account for proof size weights.
///
/// Calls that are allowed through this filter must:
/// 1. Have a fixed weight;
/// 2. Cannot lead to another call being made;
/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call parameters.
pub
struct
SafeCallFilter
;
impl
Contains
<
RuntimeCall
>
for
SafeCallFilter
{
fn
contains
(
call
:
&
RuntimeCall
)
->
bool
{
#[cfg(feature
=
"runtime-benchmarks"
)]
{
if
matches!
(
call
,
RuntimeCall
::
System
(
frame_system
::
Call
::
remark_with_event
{
..
}))
{
return
true
}
}
matches!
(
call
,
RuntimeCall
::
PolkadotXcm
(
pallet_xcm
::
Call
::
force_xcm_version
{
..
}
|
pallet_xcm
::
Call
::
force_default_xcm_version
{
..
}
)
|
RuntimeCall
::
System
(
frame_system
::
Call
::
set_heap_pages
{
..
}
|
frame_system
::
Call
::
set_code
{
..
}
|
frame_system
::
Call
::
set_code_without_checks
{
..
}
|
frame_system
::
Call
::
authorize_upgrade
{
..
}
|
frame_system
::
Call
::
authorize_upgrade_without_checks
{
..
}
|
frame_system
::
Call
::
kill_prefix
{
..
},
)
|
RuntimeCall
::
ParachainSystem
(
..
)
|
RuntimeCall
::
Timestamp
(
..
)
|
RuntimeCall
::
Balances
(
..
)
|
RuntimeCall
::
CollatorSelection
(
pallet_collator_selection
::
Call
::
set_desired_candidates
{
..
}
|
pallet_collator_selection
::
Call
::
set_candidacy_bond
{
..
}
|
pallet_collator_selection
::
Call
::
register_as_candidate
{
..
}
|
pallet_collator_selection
::
Call
::
leave_intent
{
..
}
|
pallet_collator_selection
::
Call
::
set_invulnerables
{
..
}
|
pallet_collator_selection
::
Call
::
add_invulnerable
{
..
}
|
pallet_collator_selection
::
Call
::
remove_invulnerable
{
..
},
)
|
RuntimeCall
::
Session
(
pallet_session
::
Call
::
purge_keys
{
..
})
|
RuntimeCall
::
XcmpQueue
(
..
)
|
RuntimeCall
::
MessageQueue
(
..
)
|
RuntimeCall
::
Identity
(
..
)
|
RuntimeCall
::
IdentityMigrator
(
..
)
)
}
}
pub
type
Barrier
=
TrailingSetTopicAsId
<
DenyThenTry
<
DenyReserveTransferToRelayChain
,
...
...
@@ -222,6 +173,8 @@ pub type Barrier = TrailingSetTopicAsId<
AllowExplicitUnpaidExecutionFrom
<
(
ParentOrParentsPlurality
,
FellowsPlurality
)
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
ParentRelayOrSiblingParachains
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
@@ -278,8 +231,8 @@ impl xcm_executor::Config for XcmConfig {
>
;
type
MessageExporter
=
();
type
UniversalAliases
=
Nothing
;
type
CallDispatcher
=
WithOriginFilter
<
SafeCallFilter
>
;
type
SafeCallFilter
=
SafeCallFilter
;
type
CallDispatcher
=
RuntimeCall
;
type
SafeCallFilter
=
Everything
;
type
Aliasers
=
Nothing
;
type
TransactionalProcessor
=
FrameTransactionalProcessor
;
type
HrmpNewChannelOpenRequestHandler
=
();
...
...
cumulus/parachains/runtimes/starters/shell/src/xcm_config.rs
View file @
aceda465
...
...
@@ -30,8 +30,8 @@ use xcm_builder::{
parameter_types!
{
pub
const
RococoLocation
:
Location
=
Location
::
parent
();
pub
const
RococoNetwork
:
Option
<
NetworkId
>
=
Some
(
NetworkId
::
Rococo
)
;
pub
UniversalLocation
:
InteriorLocation
=
[
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
pub
const
RococoNetwork
:
NetworkId
=
NetworkId
::
Rococo
;
pub
UniversalLocation
:
InteriorLocation
=
[
GlobalConsensus
(
RococoNetwork
::
get
()),
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
}
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
...
...
cumulus/parachains/runtimes/testing/penpal/build.rs
View file @
aceda465
...
...
@@ -16,11 +16,7 @@
#[cfg(feature
=
"std"
)]
fn
main
()
{
substrate_wasm_builder
::
WasmBuilder
::
new
()
.with_current_project
()
.export_heap_base
()
.import_memory
()
.build
()
substrate_wasm_builder
::
WasmBuilder
::
build_using_defaults
();
}
#[cfg(not(feature
=
"std"
))]
...
...
cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs
View file @
aceda465
...
...
@@ -43,14 +43,15 @@ use polkadot_runtime_common::{impls::ToAuthor, xcm_sender::ExponentialPrice};
use
sp_runtime
::
traits
::{
AccountIdConversion
,
ConvertInto
,
Identity
,
TryConvertInto
};
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
AccountId32Aliases
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
AsPrefixedGeneralIndex
,
ConvertedConcreteId
,
EnsureXcmOrigin
,
FixedWeightBounds
,
FrameTransactionalProcessor
,
FungibleAdapter
,
FungiblesAdapter
,
IsConcrete
,
LocalMint
,
NativeAsset
,
NoChecking
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
StartsWith
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
AccountId32Aliases
,
AllowHrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
AsPrefixedGeneralIndex
,
ConvertedConcreteId
,
EnsureXcmOrigin
,
FixedWeightBounds
,
FrameTransactionalProcessor
,
FungibleAdapter
,
FungiblesAdapter
,
IsConcrete
,
LocalMint
,
NativeAsset
,
NoChecking
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
StartsWith
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
};
use
xcm_executor
::{
traits
::
JustTry
,
XcmExecutor
};
...
...
@@ -217,6 +218,8 @@ pub type Barrier = TrailingSetTopicAsId<(
AllowTopLevelPaidExecutionFrom
<
Everything
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
Everything
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
cumulus/parachains/runtimes/testing/rococo-parachain/build.rs
View file @
aceda465
...
...
@@ -15,11 +15,7 @@
#[cfg(feature
=
"std"
)]
fn
main
()
{
substrate_wasm_builder
::
WasmBuilder
::
new
()
.with_current_project
()
.export_heap_base
()
.import_memory
()
.build
()
substrate_wasm_builder
::
WasmBuilder
::
build_using_defaults
();
}
#[cfg(not(feature
=
"std"
))]
...
...
cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs
View file @
aceda465
...
...
@@ -74,9 +74,9 @@ use parachains_common::{
AccountId
,
AssetIdForTrustBackedAssets
,
Signature
,
};
use
xcm_builder
::{
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AsPrefixedGeneralIndex
,
ConvertedConcreteId
,
FrameTransactionalProcessor
,
FungiblesAdapter
,
LocalMint
,
TrailingSetTopicAsId
,
WithUniqueTopic
,
AllowHrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AsPrefixedGeneralIndex
,
ConvertedConcreteId
,
FrameTransactionalProcessor
,
FungiblesAdapter
,
LocalMint
,
TrailingSetTopicAsId
,
WithUniqueTopic
,
};
use
xcm_executor
::
traits
::
JustTry
;
...
...
@@ -327,9 +327,9 @@ impl cumulus_pallet_aura_ext::Config for Runtime {}
parameter_types!
{
pub
const
RocLocation
:
Location
=
Location
::
parent
();
pub
const
RococoNetwork
:
Option
<
NetworkId
>
=
Some
(
NetworkId
::
Rococo
)
;
pub
const
RococoNetwork
:
NetworkId
=
NetworkId
::
Rococo
;
pub
RelayChainOrigin
:
RuntimeOrigin
=
cumulus_pallet_xcm
::
Origin
::
Relay
.into
();
pub
UniversalLocation
:
InteriorLocation
=
[
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
pub
UniversalLocation
:
InteriorLocation
=
[
GlobalConsensus
(
RococoNetwork
::
get
()),
Parachain
(
ParachainInfo
::
parachain_id
()
.into
())]
.into
();
pub
CheckingAccount
:
AccountId
=
PolkadotXcm
::
check_account
();
}
...
...
@@ -444,6 +444,8 @@ pub type Barrier = TrailingSetTopicAsId<(
AllowKnownQueryResponses
<
PolkadotXcm
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
Everything
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
)
>
;
parameter_types!
{
...
...
cumulus/primitives/utility/src/lib.rs
View file @
aceda465
...
...
@@ -69,6 +69,9 @@ where
let
price
=
P
::
price_for_delivery
((),
&
xcm
);
let
versioned_xcm
=
W
::
wrap_version
(
&
d
,
xcm
)
.map_err
(|()|
SendError
::
DestinationUnsupported
)
?
;
versioned_xcm
.validate_xcm_nesting
()
.map_err
(|()|
SendError
::
ExceedsMaxMessageSize
)
?
;
let
data
=
versioned_xcm
.encode
();
Ok
((
data
,
price
))
...
...
@@ -526,6 +529,8 @@ impl<
mod
test_xcm_router
{
use
super
::
*
;
use
cumulus_primitives_core
::
UpwardMessage
;
use
frame_support
::
assert_ok
;
use
xcm
::
MAX_XCM_DECODE_DEPTH
;
/// Validates [`validate`] for required Some(destination) and Some(message)
struct
OkFixedXcmHashWithAssertingRequiredInputsSender
;
...
...
@@ -621,6 +626,29 @@ mod test_xcm_router {
)
>
(
dest
.into
(),
message
)
);
}
#[test]
fn
parent_as_ump_validate_nested_xcm_works
()
{
let
dest
=
Parent
;
type
Router
=
ParentAsUmp
<
(),
(),
()
>
;
// Message that is not too deeply nested:
let
mut
good
=
Xcm
(
vec!
[
ClearOrigin
]);
for
_
in
0
..
MAX_XCM_DECODE_DEPTH
-
1
{
good
=
Xcm
(
vec!
[
SetAppendix
(
good
)]);
}
// Check that the good message is validated:
assert_ok!
(
<
Router
as
SendXcm
>
::
validate
(
&
mut
Some
(
dest
.into
()),
&
mut
Some
(
good
.clone
())));
// Nesting the message one more time should reject it:
let
bad
=
Xcm
(
vec!
[
SetAppendix
(
good
)]);
assert_eq!
(
Err
(
SendError
::
ExceedsMaxMessageSize
),
<
Router
as
SendXcm
>
::
validate
(
&
mut
Some
(
dest
.into
()),
&
mut
Some
(
bad
))
);
}
}
#[cfg(test)]
mod
test_trader
{
...
...
cumulus/test/runtime/build.rs
View file @
aceda465
...
...
@@ -18,16 +18,10 @@
fn
main
()
{
use
substrate_wasm_builder
::
WasmBuilder
;
WasmBuilder
::
new
()
.with_current_project
()
.export_heap_base
()
.import_memory
()
.build
();
WasmBuilder
::
build_using_defaults
();
WasmBuilder
::
new
()
.with_current_project
()
WasmBuilder
::
init_with_defaults
()
.enable_feature
(
"increment-spec-version"
)
.import_memory
()
.set_file_name
(
"wasm_binary_spec_version_incremented.rs"
)
.build
();
}
...
...
docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile
View file @
aceda465
# this image is built on top of existing Zombienet image
ARG
ZOMBIENET_IMAGE
# this image uses substrate-relay image built elsewhere
ARG
SUBSTRATE_RELAY_IMAGE=docker.io/paritytech/substrate-relay:v1.
2.1
ARG
SUBSTRATE_RELAY_IMAGE=docker.io/paritytech/substrate-relay:v1.
5.0
# metadata
ARG
VCS_REF
...
...
polkadot/cli/src/cli.rs
View file @
aceda465
...
...
@@ -131,6 +131,23 @@ pub struct RunCmd {
#[arg(long,
value_name
=
"PATH"
)]
pub
workers_path
:
Option
<
PathBuf
>
,
/// Override the maximum number of pvf execute workers.
///
/// **Dangerous!** Do not touch unless explicitly advised to.
#[arg(long)]
pub
execute_workers_max_num
:
Option
<
usize
>
,
/// Override the maximum number of pvf workers that can be spawned in the pvf prepare
/// pool for tasks with the priority below critical.
///
/// **Dangerous!** Do not touch unless explicitly advised to.
#[arg(long)]
pub
prepare_workers_soft_max_num
:
Option
<
usize
>
,
/// Override the absolute number of pvf workers that can be spawned in the pvf prepare pool.
///
/// **Dangerous!** Do not touch unless explicitly advised to.
#[arg(long)]
pub
prepare_workers_hard_max_num
:
Option
<
usize
>
,
/// TESTING ONLY: disable the version check between nodes and workers.
#[arg(long,
hide
=
true
)]
pub
disable_worker_version_check
:
bool
,
...
...
polkadot/cli/src/command.rs
View file @
aceda465
...
...
@@ -253,6 +253,9 @@ where
.overseer_channel_capacity_override
,
malus_finality_delay
:
maybe_malus_finality_delay
,
hwbench
,
execute_workers_max_num
:
cli
.run.execute_workers_max_num
,
prepare_workers_hard_max_num
:
cli
.run.prepare_workers_hard_max_num
,
prepare_workers_soft_max_num
:
cli
.run.prepare_workers_soft_max_num
,
},
)
.map
(|
full
|
full
.task_manager
)
?
;
...
...
polkadot/node/core/approval-voting/Cargo.toml
View file @
aceda465
...
...
@@ -53,3 +53,14 @@ kvdb-memorydb = "0.13.0"
test-helpers
=
{
package
=
"polkadot-primitives-test-helpers"
,
path
=
"../../../primitives/test-helpers"
}
log
=
{
workspace
=
true
,
default-features
=
true
}
env_logger
=
"0.11"
polkadot-subsystem-bench
=
{
path
=
"../../subsystem-bench"
}
[[bench]]
name
=
"approval-voting-regression-bench"
path
=
"benches/approval-voting-regression-bench.rs"
harness
=
false
required-features
=
[
"subsystem-benchmarks"
]
[features]
subsystem-benchmarks
=
[]
polkadot/node/core/approval-voting/benches/approval-voting-regression-bench.rs
0 → 100644
View file @
aceda465
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Polkadot.
// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! approval-voting throughput test
//!
//! Approval Voting benchmark based on Kusama parameters and scale.
//!
//! Subsystems involved:
//! - approval-distribution
//! - approval-voting
use
polkadot_subsystem_bench
::{
self
,
approval
::{
bench_approvals
,
prepare_test
,
ApprovalsOptions
},
configuration
::
TestConfiguration
,
usage
::
BenchmarkUsage
,
utils
::
save_to_file
,
};
use
std
::
io
::
Write
;
const
BENCH_COUNT
:
usize
=
10
;
fn
main
()
->
Result
<
(),
String
>
{
let
mut
messages
=
vec!
[];
let
mut
config
=
TestConfiguration
::
default
();
config
.n_cores
=
100
;
config
.n_validators
=
500
;
config
.num_blocks
=
10
;
config
.peer_bandwidth
=
524288000000
;
config
.bandwidth
=
524288000000
;
config
.latency
=
None
;
config
.connectivity
=
100
;
config
.generate_pov_sizes
();
let
options
=
ApprovalsOptions
{
last_considered_tranche
:
89
,
coalesce_mean
:
3.0
,
coalesce_std_dev
:
1.0
,
coalesce_tranche_diff
:
12
,
enable_assignments_v2
:
true
,
stop_when_approved
:
false
,
workdir_prefix
:
"/tmp"
.to_string
(),
num_no_shows_per_candidate
:
0
,
};
println!
(
"Benchmarking..."
);
let
usages
:
Vec
<
BenchmarkUsage
>
=
(
0
..
BENCH_COUNT
)
.map
(|
n
|
{
print!
(
"
\r
[{}{}]"
,
"#"
.repeat
(
n
),
"_"
.repeat
(
BENCH_COUNT
-
n
));
std
::
io
::
stdout
()
.flush
()
.unwrap
();
let
(
mut
env
,
state
)
=
prepare_test
(
config
.clone
(),
options
.clone
(),
false
);
env
.runtime
()
.block_on
(
bench_approvals
(
"approvals_throughput"
,
&
mut
env
,
state
))
})
.collect
();
println!
(
"
\r
Done!{}"
,
" "
.repeat
(
BENCH_COUNT
));
let
average_usage
=
BenchmarkUsage
::
average
(
&
usages
);
save_to_file
(
"charts/approval-voting-regression-bench.json"
,
average_usage
.to_chart_json
()
.map_err
(|
e
|
e
.to_string
())
?
,
)
.map_err
(|
e
|
e
.to_string
())
?
;
println!
(
"{}"
,
average_usage
);
// We expect no variance for received and sent
// but use 0.001 because we operate with floats
messages
.extend
(
average_usage
.check_network_usage
(
&
[
(
"Received from peers"
,
52942.4600
,
0.001
),
(
"Sent to peers"
,
63547.0330
,
0.001
),
]));
messages
.extend
(
average_usage
.check_cpu_usage
(
&
[
(
"approval-distribution"
,
7.0317
,
0.1
),
(
"approval-voting"
,
9.5751
,
0.1
),
]));
if
messages
.is_empty
()
{
Ok
(())
}
else
{
eprintln!
(
"{}"
,
messages
.join
(
"
\n
"
));
Err
(
"Regressions found"
.to_string
())
}
}
Prev
1
…
4
5
6
7
8
9
10
11
12
…
17
Next