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/assets/asset-hub-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("asset-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -64,30 +64,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 21_224_000 picoseconds.
Weight
::
from_parts
(
21_821_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3610
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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: `145`
// Estimated: `3610`
// Minimum execution time: 21_474_000 picoseconds.
Weight
::
from_parts
(
22_072_000
,
0
)
// Minimum execution time: 22_136_000 picoseconds.
Weight
::
from_parts
(
22_518_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3610
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -112,8 +90,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 9
0_6
77_000 picoseconds.
Weight
::
from_parts
(
9
3_658
_000
,
0
)
// Minimum execution time: 9
2_2
77_000 picoseconds.
Weight
::
from_parts
(
9
4_843
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3610
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -140,8 +118,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `400`
// Estimated: `6196`
// Minimum execution time: 1
16_767
_000 picoseconds.
Weight
::
from_parts
(
1
18_843
_000
,
0
)
// Minimum execution time: 1
20_110
_000 picoseconds.
Weight
::
from_parts
(
1
22_968
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6196
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
9
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -170,8 +148,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `496`
// Estimated: `6208`
// Minimum execution time: 1
37_983
_000 picoseconds.
Weight
::
from_parts
(
14
1
_3
96
_000
,
0
)
// Minimum execution time: 1
43_116
_000 picoseconds.
Weight
::
from_parts
(
14
7
_3
55
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6208
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
12
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
7
))
...
...
@@ -186,24 +164,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: 6_
232
_000 picoseconds.
Weight
::
from_parts
(
6_
507
_000
,
0
)
// Minimum execution time: 6_
517
_000 picoseconds.
Weight
::
from_parts
(
6_
756
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -213,8 +181,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
8
4_000 picoseconds.
Weight
::
from_parts
(
2_0
16
_000
,
0
)
// Minimum execution time: 1_8
9
4_000 picoseconds.
Weight
::
from_parts
(
2_0
24
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -240,8 +208,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `145`
// Estimated: `3610`
// Minimum execution time: 2
6_637
_000 picoseconds.
Weight
::
from_parts
(
2
7_616
_000
,
0
)
// Minimum execution time: 2
7_314
_000 picoseconds.
Weight
::
from_parts
(
2
8_787
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3610
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -266,8 +234,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `363`
// Estimated: `3828`
// Minimum execution time: 2
8_668
_000 picoseconds.
Weight
::
from_parts
(
29_413
_000
,
0
)
// Minimum execution time: 2
9_840
_000 picoseconds.
Weight
::
from_parts
(
30_589
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3828
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -278,8 +246,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_
990
_000 picoseconds.
Weight
::
from_parts
(
2_
114
_000
,
0
)
// Minimum execution time: 1_
893
_000 picoseconds.
Weight
::
from_parts
(
2_
017
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -289,8 +257,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `159`
// Estimated: `13524`
// Minimum execution time: 1
8_856
_000 picoseconds.
Weight
::
from_parts
(
19_
430
_000
,
0
)
// Minimum execution time: 1
9_211
_000 picoseconds.
Weight
::
from_parts
(
19_
552
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13524
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -301,8 +269,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `163`
// Estimated: `13528`
// Minimum execution time: 19_
068
_000 picoseconds.
Weight
::
from_parts
(
19_
43
4_000
,
0
)
// Minimum execution time: 19_
177
_000 picoseconds.
Weight
::
from_parts
(
19_
70
4_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13528
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -313,8 +281,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `173`
// Estimated: `16013`
// Minimum execution time: 2
1_055
_000 picoseconds.
Weight
::
from_parts
(
21_
379
_000
,
0
)
// Minimum execution time: 2
0_449
_000 picoseconds.
Weight
::
from_parts
(
21_
075
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
16013
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -336,8 +304,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `6152`
// Minimum execution time: 2
5_736
_000 picoseconds.
Weight
::
from_parts
(
2
6_423
_000
,
0
)
// Minimum execution time: 2
6_578
_000 picoseconds.
Weight
::
from_parts
(
2
7_545
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6152
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -348,8 +316,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `206`
// Estimated: `11096`
// Minimum execution time: 11_
853
_000 picoseconds.
Weight
::
from_parts
(
1
2_215
_000
,
0
)
// Minimum execution time: 11_
646
_000 picoseconds.
Weight
::
from_parts
(
1
1_944
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11096
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -359,8 +327,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `170`
// Estimated: `13535`
// Minimum execution time: 19_
418
_000 picoseconds.
Weight
::
from_parts
(
19_
79
4_000
,
0
)
// Minimum execution time: 19_
301
_000 picoseconds.
Weight
::
from_parts
(
19_
66
4_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13535
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -383,8 +351,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `212`
// Estimated: `13577`
// Minimum execution time: 3
4
_71
9
_000 picoseconds.
Weight
::
from_parts
(
3
5_260
_000
,
0
)
// Minimum execution time: 3
5
_71
5
_000 picoseconds.
Weight
::
from_parts
(
3
6_915
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13577
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
11
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -397,8 +365,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `103`
// Estimated: `1588`
// Minimum execution time: 4_
937
_000 picoseconds.
Weight
::
from_parts
(
5_
203
_000
,
0
)
// Minimum execution time: 4_
871
_000 picoseconds.
Weight
::
from_parts
(
5_
066
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1588
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -409,8 +377,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `7740`
// Estimated: `11205`
// Minimum execution time: 2
6_064
_000 picoseconds.
Weight
::
from_parts
(
26_
497
_000
,
0
)
// Minimum execution time: 2
5_150
_000 picoseconds.
Weight
::
from_parts
(
26_
119
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11205
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -421,8 +389,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 3
7_132
_000 picoseconds.
Weight
::
from_parts
(
3
7_868
_000
,
0
)
// Minimum execution time: 3
8_248
_000 picoseconds.
Weight
::
from_parts
(
3
9_122
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3625
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs
View file @
aceda465
...
...
@@ -49,19 +49,19 @@ use testnet_parachains_constants::rococo::snowbridge::{
};
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
KnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeAllTerminal
,
DescribeFamily
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapte
r
,
Fungible
s
Adapter
,
GlobalConsensusParachainConvertsFor
,
HashedDescription
,
IsConcrete
,
LocalMint
,
NetworkExportTableI
te
m
,
NoChecking
,
NonFungiblesAdapter
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
S
overeignPaidRemoteExporter
,
SovereignSignedViaLocation
,
StartsWith
,
StartsWithExplicitGlobalConsensus
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
HrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeAllTerminal
,
DescribeFamily
,
EnsureXcmOrigin
,
FrameTransactionalProcesso
r
,
FungibleAdapter
,
FungiblesAdapter
,
GlobalConsensusParachainConvertsFor
,
HashedDescription
,
IsConcre
te
,
LocalMint
,
NetworkExportTableItem
,
NoChecking
,
NonFungiblesAdapter
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
S
ignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignPaidRemoteExporter
,
SovereignSignedViaLocation
,
StartsWith
,
StartsWithExplicitGlobalConsensus
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
};
use
xcm_executor
::
{
traits
::
WithOriginFilter
,
XcmExecutor
}
;
use
xcm_executor
::
XcmExecutor
;
parameter_types!
{
pub
const
TokenLocation
:
Location
=
Location
::
parent
();
...
...
@@ -263,223 +263,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
}
}
// Allow to change dedicated storage items (called by governance-like)
match
call
{
RuntimeCall
::
System
(
frame_system
::
Call
::
set_storage
{
items
})
if
items
.iter
()
.all
(|(
k
,
_
)|
{
k
.eq
(
&
bridging
::
XcmBridgeHubRouterByteFee
::
key
())
||
k
.eq
(
&
bridging
::
XcmBridgeHubRouterBaseFee
::
key
())
||
k
.eq
(
&
bridging
::
to_ethereum
::
BridgeHubEthereumBaseFee
::
key
())
})
=>
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
(
..
)
|
RuntimeCall
::
Session
(
pallet_session
::
Call
::
purge_keys
{
..
})
|
RuntimeCall
::
XcmpQueue
(
..
)
|
RuntimeCall
::
MessageQueue
(
..
)
|
RuntimeCall
::
Assets
(
pallet_assets
::
Call
::
create
{
..
}
|
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
start_destroy
{
..
}
|
pallet_assets
::
Call
::
destroy_accounts
{
..
}
|
pallet_assets
::
Call
::
destroy_approvals
{
..
}
|
pallet_assets
::
Call
::
finish_destroy
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
mint
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
ForeignAssets
(
pallet_assets
::
Call
::
create
{
..
}
|
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
start_destroy
{
..
}
|
pallet_assets
::
Call
::
destroy_accounts
{
..
}
|
pallet_assets
::
Call
::
destroy_approvals
{
..
}
|
pallet_assets
::
Call
::
finish_destroy
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
mint
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
PoolAssets
(
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
AssetConversion
(
pallet_asset_conversion
::
Call
::
create_pool
{
..
}
|
pallet_asset_conversion
::
Call
::
add_liquidity
{
..
}
|
pallet_asset_conversion
::
Call
::
remove_liquidity
{
..
}
|
pallet_asset_conversion
::
Call
::
swap_tokens_for_exact_tokens
{
..
}
|
pallet_asset_conversion
::
Call
::
swap_exact_tokens_for_tokens
{
..
},
)
|
RuntimeCall
::
NftFractionalization
(
pallet_nft_fractionalization
::
Call
::
fractionalize
{
..
}
|
pallet_nft_fractionalization
::
Call
::
unify
{
..
},
)
|
RuntimeCall
::
Nfts
(
pallet_nfts
::
Call
::
create
{
..
}
|
pallet_nfts
::
Call
::
force_create
{
..
}
|
pallet_nfts
::
Call
::
destroy
{
..
}
|
pallet_nfts
::
Call
::
mint
{
..
}
|
pallet_nfts
::
Call
::
force_mint
{
..
}
|
pallet_nfts
::
Call
::
burn
{
..
}
|
pallet_nfts
::
Call
::
transfer
{
..
}
|
pallet_nfts
::
Call
::
lock_item_transfer
{
..
}
|
pallet_nfts
::
Call
::
unlock_item_transfer
{
..
}
|
pallet_nfts
::
Call
::
lock_collection
{
..
}
|
pallet_nfts
::
Call
::
transfer_ownership
{
..
}
|
pallet_nfts
::
Call
::
set_team
{
..
}
|
pallet_nfts
::
Call
::
force_collection_owner
{
..
}
|
pallet_nfts
::
Call
::
force_collection_config
{
..
}
|
pallet_nfts
::
Call
::
approve_transfer
{
..
}
|
pallet_nfts
::
Call
::
cancel_approval
{
..
}
|
pallet_nfts
::
Call
::
clear_all_transfer_approvals
{
..
}
|
pallet_nfts
::
Call
::
lock_item_properties
{
..
}
|
pallet_nfts
::
Call
::
set_attribute
{
..
}
|
pallet_nfts
::
Call
::
force_set_attribute
{
..
}
|
pallet_nfts
::
Call
::
clear_attribute
{
..
}
|
pallet_nfts
::
Call
::
approve_item_attributes
{
..
}
|
pallet_nfts
::
Call
::
cancel_item_attributes_approval
{
..
}
|
pallet_nfts
::
Call
::
set_metadata
{
..
}
|
pallet_nfts
::
Call
::
clear_metadata
{
..
}
|
pallet_nfts
::
Call
::
set_collection_metadata
{
..
}
|
pallet_nfts
::
Call
::
clear_collection_metadata
{
..
}
|
pallet_nfts
::
Call
::
set_accept_ownership
{
..
}
|
pallet_nfts
::
Call
::
set_collection_max_supply
{
..
}
|
pallet_nfts
::
Call
::
update_mint_settings
{
..
}
|
pallet_nfts
::
Call
::
set_price
{
..
}
|
pallet_nfts
::
Call
::
buy_item
{
..
}
|
pallet_nfts
::
Call
::
pay_tips
{
..
}
|
pallet_nfts
::
Call
::
create_swap
{
..
}
|
pallet_nfts
::
Call
::
cancel_swap
{
..
}
|
pallet_nfts
::
Call
::
claim_swap
{
..
},
)
|
RuntimeCall
::
Uniques
(
pallet_uniques
::
Call
::
create
{
..
}
|
pallet_uniques
::
Call
::
force_create
{
..
}
|
pallet_uniques
::
Call
::
destroy
{
..
}
|
pallet_uniques
::
Call
::
mint
{
..
}
|
pallet_uniques
::
Call
::
burn
{
..
}
|
pallet_uniques
::
Call
::
transfer
{
..
}
|
pallet_uniques
::
Call
::
freeze
{
..
}
|
pallet_uniques
::
Call
::
thaw
{
..
}
|
pallet_uniques
::
Call
::
freeze_collection
{
..
}
|
pallet_uniques
::
Call
::
thaw_collection
{
..
}
|
pallet_uniques
::
Call
::
transfer_ownership
{
..
}
|
pallet_uniques
::
Call
::
set_team
{
..
}
|
pallet_uniques
::
Call
::
approve_transfer
{
..
}
|
pallet_uniques
::
Call
::
cancel_approval
{
..
}
|
pallet_uniques
::
Call
::
force_item_status
{
..
}
|
pallet_uniques
::
Call
::
set_attribute
{
..
}
|
pallet_uniques
::
Call
::
clear_attribute
{
..
}
|
pallet_uniques
::
Call
::
set_metadata
{
..
}
|
pallet_uniques
::
Call
::
clear_metadata
{
..
}
|
pallet_uniques
::
Call
::
set_collection_metadata
{
..
}
|
pallet_uniques
::
Call
::
clear_collection_metadata
{
..
}
|
pallet_uniques
::
Call
::
set_accept_ownership
{
..
}
|
pallet_uniques
::
Call
::
set_collection_max_supply
{
..
}
|
pallet_uniques
::
Call
::
set_price
{
..
}
|
pallet_uniques
::
Call
::
buy_item
{
..
}
)
|
RuntimeCall
::
ToWestendXcmRouter
(
pallet_xcm_bridge_hub_router
::
Call
::
report_bridge_status
{
..
}
)
)
}
}
pub
type
Barrier
=
TrailingSetTopicAsId
<
DenyThenTry
<
DenyReserveTransferToRelayChain
,
...
...
@@ -502,6 +285,8 @@ pub type Barrier = TrailingSetTopicAsId<
)
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
ParentRelayOrSiblingParachains
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
@@ -632,8 +417,8 @@ impl xcm_executor::Config for XcmConfig {
type
MessageExporter
=
();
type
UniversalAliases
=
(
bridging
::
to_westend
::
UniversalAliases
,
bridging
::
to_ethereum
::
UniversalAliases
);
type
CallDispatcher
=
WithOriginFilter
<
SafeCallFilter
>
;
type
SafeCallFilter
=
SafeCallFilter
;
type
CallDispatcher
=
RuntimeCall
;
type
SafeCallFilter
=
Everything
;
type
Aliasers
=
Nothing
;
type
TransactionalProcessor
=
FrameTransactionalProcessor
;
type
HrmpNewChannelOpenRequestHandler
=
();
...
...
cumulus/parachains/runtimes/assets/asset-hub-westend/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/assets/asset-hub-westend/src/lib.rs
View file @
aceda465
...
...
@@ -963,7 +963,7 @@ pub type Migrations = (
// v9420
pallet_nfts
::
migration
::
v1
::
MigrateToV1
<
Runtime
>
,
// unreleased
pallet_collator_selection
::
migration
::
v
1
::
Migrat
e
ToV
1
<
Runtime
>
,
pallet_collator_selection
::
migration
::
v
2
::
Migrat
ion
ToV
2
<
Runtime
>
,
// unreleased
pallet_multisig
::
migrations
::
v1
::
MigrateToV1
<
Runtime
>
,
// unreleased
...
...
@@ -1610,27 +1610,23 @@ impl_runtime_apis! {
fn
worst_case_holding
(
depositable_count
:
u32
)
->
xcm
::
v4
::
Assets
{
// A mix of fungible, non-fungible, and concrete assets.
let
holding_non_fungibles
=
MaxAssetsIntoHolding
::
get
()
/
2
-
depositable_count
;
let
holding_fungibles
=
holding_non_fungibles
-
1
;
let
holding_fungibles
=
holding_non_fungibles
-
2
;
// -2 for two `iter::once` bellow
let
fungibles_amount
:
u128
=
100
;
let
mut
assets
=
(
0
..
holding_fungibles
)
(
0
..
holding_fungibles
)
.map
(|
i
|
{
Asset
{
id
:
AssetId
(
GeneralIndex
(
i
as
u128
)
.into
()),
fun
:
Fungible
(
fungibles_amount
*
i
as
u128
),
fun
:
Fungible
(
fungibles_amount
*
(
i
+
1
)
as
u128
),
// non-zero amount
}
})
.chain
(
core
::
iter
::
once
(
Asset
{
id
:
AssetId
(
Here
.into
()),
fun
:
Fungible
(
u128
::
MAX
)
}))
.chain
(
core
::
iter
::
once
(
Asset
{
id
:
AssetId
(
WestendLocation
::
get
()),
fun
:
Fungible
(
1_000_000
*
UNITS
)
}))
.chain
((
0
..
holding_non_fungibles
)
.map
(|
i
|
Asset
{
id
:
AssetId
(
GeneralIndex
(
i
as
u128
)
.into
()),
fun
:
NonFungible
(
asset_instance_from
(
i
)),
}))
.collect
::
<
Vec
<
_
>>
();
assets
.push
(
Asset
{
id
:
AssetId
(
WestendLocation
::
get
()),
fun
:
Fungible
(
1_000_000
*
UNITS
),
});
assets
.into
()
.collect
::
<
Vec
<
_
>>
()
.into
()
}
}
...
...
cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_xcm.rs
View file @
aceda465
...
...
@@ -70,28 +70,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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: `145`
// Estimated: `3610`
// Minimum execution time: 21_164_000 picoseconds.
Weight
::
from_parts
(
21_656_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3610
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `ParachainInfo::ParachainId` (r:1 w:0)
/// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
...
...
@@ -184,14 +162,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight
::
from_parts
(
7_791_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
fn
execute_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_585_000 picoseconds.
Weight
::
from_parts
(
7_897_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
{
...
...
cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
View file @
aceda465
...
...
@@ -45,10 +45,10 @@ use polkadot_runtime_common::xcm_sender::ExponentialPrice;
use
sp_runtime
::
traits
::{
AccountIdConversion
,
ConvertInto
};
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
KnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeFamily
,
DescribePalletTerminal
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
FungiblesAdapter
,
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
Allow
HrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
DescribeFamily
,
DescribePalletTerminal
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
FungiblesAdapter
,
GlobalConsensusParachainConvertsFor
,
HashedDescription
,
IsConcrete
,
LocalMint
,
NetworkExportTableItem
,
NoChecking
,
NonFungiblesAdapter
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
...
...
@@ -57,7 +57,7 @@ use xcm_builder::{
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeManagerFromComponents
,
XcmFeeToAccount
,
};
use
xcm_executor
::
{
traits
::
WithOriginFilter
,
XcmExecutor
}
;
use
xcm_executor
::
XcmExecutor
;
parameter_types!
{
pub
const
WestendLocation
:
Location
=
Location
::
parent
();
...
...
@@ -275,228 +275,6 @@ impl Contains<Location> for AmbassadorEntities {
}
}
/// 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
}
}
// Allow to change dedicated storage items (called by governance-like)
match
call
{
RuntimeCall
::
System
(
frame_system
::
Call
::
set_storage
{
items
})
if
items
.iter
()
.all
(|(
k
,
_
)|
k
.eq
(
&
bridging
::
XcmBridgeHubRouterByteFee
::
key
()))
||
items
.iter
()
.all
(|(
k
,
_
)|
k
.eq
(
&
bridging
::
XcmBridgeHubRouterBaseFee
::
key
()))
=>
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
(
..
)
|
RuntimeCall
::
Session
(
pallet_session
::
Call
::
purge_keys
{
..
})
|
RuntimeCall
::
XcmpQueue
(
..
)
|
RuntimeCall
::
MessageQueue
(
..
)
|
RuntimeCall
::
Assets
(
pallet_assets
::
Call
::
create
{
..
}
|
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
start_destroy
{
..
}
|
pallet_assets
::
Call
::
destroy_accounts
{
..
}
|
pallet_assets
::
Call
::
destroy_approvals
{
..
}
|
pallet_assets
::
Call
::
finish_destroy
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
mint
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
ForeignAssets
(
pallet_assets
::
Call
::
create
{
..
}
|
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
start_destroy
{
..
}
|
pallet_assets
::
Call
::
destroy_accounts
{
..
}
|
pallet_assets
::
Call
::
destroy_approvals
{
..
}
|
pallet_assets
::
Call
::
finish_destroy
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
mint
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
PoolAssets
(
pallet_assets
::
Call
::
create
{
..
}
|
pallet_assets
::
Call
::
force_create
{
..
}
|
pallet_assets
::
Call
::
start_destroy
{
..
}
|
pallet_assets
::
Call
::
destroy_accounts
{
..
}
|
pallet_assets
::
Call
::
destroy_approvals
{
..
}
|
pallet_assets
::
Call
::
finish_destroy
{
..
}
|
pallet_assets
::
Call
::
block
{
..
}
|
pallet_assets
::
Call
::
mint
{
..
}
|
pallet_assets
::
Call
::
burn
{
..
}
|
pallet_assets
::
Call
::
transfer
{
..
}
|
pallet_assets
::
Call
::
transfer_keep_alive
{
..
}
|
pallet_assets
::
Call
::
force_transfer
{
..
}
|
pallet_assets
::
Call
::
freeze
{
..
}
|
pallet_assets
::
Call
::
thaw
{
..
}
|
pallet_assets
::
Call
::
freeze_asset
{
..
}
|
pallet_assets
::
Call
::
thaw_asset
{
..
}
|
pallet_assets
::
Call
::
transfer_ownership
{
..
}
|
pallet_assets
::
Call
::
set_team
{
..
}
|
pallet_assets
::
Call
::
set_metadata
{
..
}
|
pallet_assets
::
Call
::
clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_set_metadata
{
..
}
|
pallet_assets
::
Call
::
force_clear_metadata
{
..
}
|
pallet_assets
::
Call
::
force_asset_status
{
..
}
|
pallet_assets
::
Call
::
approve_transfer
{
..
}
|
pallet_assets
::
Call
::
cancel_approval
{
..
}
|
pallet_assets
::
Call
::
force_cancel_approval
{
..
}
|
pallet_assets
::
Call
::
transfer_approved
{
..
}
|
pallet_assets
::
Call
::
touch
{
..
}
|
pallet_assets
::
Call
::
touch_other
{
..
}
|
pallet_assets
::
Call
::
refund
{
..
}
|
pallet_assets
::
Call
::
refund_other
{
..
},
)
|
RuntimeCall
::
AssetConversion
(
pallet_asset_conversion
::
Call
::
create_pool
{
..
}
|
pallet_asset_conversion
::
Call
::
add_liquidity
{
..
}
|
pallet_asset_conversion
::
Call
::
remove_liquidity
{
..
}
|
pallet_asset_conversion
::
Call
::
swap_tokens_for_exact_tokens
{
..
}
|
pallet_asset_conversion
::
Call
::
swap_exact_tokens_for_tokens
{
..
},
)
|
RuntimeCall
::
NftFractionalization
(
pallet_nft_fractionalization
::
Call
::
fractionalize
{
..
}
|
pallet_nft_fractionalization
::
Call
::
unify
{
..
},
)
|
RuntimeCall
::
Nfts
(
pallet_nfts
::
Call
::
create
{
..
}
|
pallet_nfts
::
Call
::
force_create
{
..
}
|
pallet_nfts
::
Call
::
destroy
{
..
}
|
pallet_nfts
::
Call
::
mint
{
..
}
|
pallet_nfts
::
Call
::
force_mint
{
..
}
|
pallet_nfts
::
Call
::
burn
{
..
}
|
pallet_nfts
::
Call
::
transfer
{
..
}
|
pallet_nfts
::
Call
::
lock_item_transfer
{
..
}
|
pallet_nfts
::
Call
::
unlock_item_transfer
{
..
}
|
pallet_nfts
::
Call
::
lock_collection
{
..
}
|
pallet_nfts
::
Call
::
transfer_ownership
{
..
}
|
pallet_nfts
::
Call
::
set_team
{
..
}
|
pallet_nfts
::
Call
::
force_collection_owner
{
..
}
|
pallet_nfts
::
Call
::
force_collection_config
{
..
}
|
pallet_nfts
::
Call
::
approve_transfer
{
..
}
|
pallet_nfts
::
Call
::
cancel_approval
{
..
}
|
pallet_nfts
::
Call
::
clear_all_transfer_approvals
{
..
}
|
pallet_nfts
::
Call
::
lock_item_properties
{
..
}
|
pallet_nfts
::
Call
::
set_attribute
{
..
}
|
pallet_nfts
::
Call
::
force_set_attribute
{
..
}
|
pallet_nfts
::
Call
::
clear_attribute
{
..
}
|
pallet_nfts
::
Call
::
approve_item_attributes
{
..
}
|
pallet_nfts
::
Call
::
cancel_item_attributes_approval
{
..
}
|
pallet_nfts
::
Call
::
set_metadata
{
..
}
|
pallet_nfts
::
Call
::
clear_metadata
{
..
}
|
pallet_nfts
::
Call
::
set_collection_metadata
{
..
}
|
pallet_nfts
::
Call
::
clear_collection_metadata
{
..
}
|
pallet_nfts
::
Call
::
set_accept_ownership
{
..
}
|
pallet_nfts
::
Call
::
set_collection_max_supply
{
..
}
|
pallet_nfts
::
Call
::
update_mint_settings
{
..
}
|
pallet_nfts
::
Call
::
set_price
{
..
}
|
pallet_nfts
::
Call
::
buy_item
{
..
}
|
pallet_nfts
::
Call
::
pay_tips
{
..
}
|
pallet_nfts
::
Call
::
create_swap
{
..
}
|
pallet_nfts
::
Call
::
cancel_swap
{
..
}
|
pallet_nfts
::
Call
::
claim_swap
{
..
},
)
|
RuntimeCall
::
Uniques
(
pallet_uniques
::
Call
::
create
{
..
}
|
pallet_uniques
::
Call
::
force_create
{
..
}
|
pallet_uniques
::
Call
::
destroy
{
..
}
|
pallet_uniques
::
Call
::
mint
{
..
}
|
pallet_uniques
::
Call
::
burn
{
..
}
|
pallet_uniques
::
Call
::
transfer
{
..
}
|
pallet_uniques
::
Call
::
freeze
{
..
}
|
pallet_uniques
::
Call
::
thaw
{
..
}
|
pallet_uniques
::
Call
::
freeze_collection
{
..
}
|
pallet_uniques
::
Call
::
thaw_collection
{
..
}
|
pallet_uniques
::
Call
::
transfer_ownership
{
..
}
|
pallet_uniques
::
Call
::
set_team
{
..
}
|
pallet_uniques
::
Call
::
approve_transfer
{
..
}
|
pallet_uniques
::
Call
::
cancel_approval
{
..
}
|
pallet_uniques
::
Call
::
force_item_status
{
..
}
|
pallet_uniques
::
Call
::
set_attribute
{
..
}
|
pallet_uniques
::
Call
::
clear_attribute
{
..
}
|
pallet_uniques
::
Call
::
set_metadata
{
..
}
|
pallet_uniques
::
Call
::
clear_metadata
{
..
}
|
pallet_uniques
::
Call
::
set_collection_metadata
{
..
}
|
pallet_uniques
::
Call
::
clear_collection_metadata
{
..
}
|
pallet_uniques
::
Call
::
set_accept_ownership
{
..
}
|
pallet_uniques
::
Call
::
set_collection_max_supply
{
..
}
|
pallet_uniques
::
Call
::
set_price
{
..
}
|
pallet_uniques
::
Call
::
buy_item
{
..
}
)
|
RuntimeCall
::
ToRococoXcmRouter
(
pallet_xcm_bridge_hub_router
::
Call
::
report_bridge_status
{
..
}
)
)
}
}
pub
type
Barrier
=
TrailingSetTopicAsId
<
DenyThenTry
<
DenyReserveTransferToRelayChain
,
...
...
@@ -521,6 +299,8 @@ pub type Barrier = TrailingSetTopicAsId<
)
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
Everything
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
@@ -653,8 +433,8 @@ impl xcm_executor::Config for XcmConfig {
>
;
type
MessageExporter
=
();
type
UniversalAliases
=
(
bridging
::
to_rococo
::
UniversalAliases
,);
type
CallDispatcher
=
WithOriginFilter
<
SafeCallFilter
>
;
type
SafeCallFilter
=
SafeCallFilter
;
type
CallDispatcher
=
RuntimeCall
;
type
SafeCallFilter
=
Everything
;
type
Aliasers
=
Nothing
;
type
TransactionalProcessor
=
FrameTransactionalProcessor
;
type
HrmpNewChannelOpenRequestHandler
=
();
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml
View file @
aceda465
...
...
@@ -22,6 +22,7 @@ scale-info = { version = "2.11.1", default-features = false, features = [
"derive"
,
]
}
serde
=
{
optional
=
true
,
features
=
[
"derive"
],
workspace
=
true
,
default-features
=
true
}
tuplex
=
{
version
=
"0.1"
,
default-features
=
false
}
# Substrate
frame-benchmarking
=
{
path
=
"../../../../../substrate/frame/benchmarking"
,
default-features
=
false
,
optional
=
true
}
...
...
@@ -218,6 +219,7 @@ std = [
"sp-version/std"
,
"substrate-wasm-builder"
,
"testnet-parachains-constants/std"
,
"tuplex/std"
,
"xcm-builder/std"
,
"xcm-executor/std"
,
"xcm/std"
,
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs
View file @
aceda465
...
...
@@ -49,7 +49,8 @@ pub type BridgeGrandpaWestendInstance = pallet_bridge_grandpa::Instance3;
impl
pallet_bridge_grandpa
::
Config
<
BridgeGrandpaWestendInstance
>
for
Runtime
{
type
RuntimeEvent
=
RuntimeEvent
;
type
BridgedChain
=
bp_westend
::
Westend
;
type
MaxFreeMandatoryHeadersPerBlock
=
ConstU32
<
4
>
;
type
MaxFreeHeadersPerBlock
=
ConstU32
<
4
>
;
type
FreeHeadersInterval
=
ConstU32
<
5
>
;
type
HeadersToKeep
=
RelayChainHeadersToKeep
;
type
WeightInfo
=
weights
::
pallet_bridge_grandpa
::
WeightInfo
<
Runtime
>
;
}
...
...
@@ -89,7 +90,8 @@ pub type BridgeGrandpaRococoBulletinInstance = pallet_bridge_grandpa::Instance4;
impl
pallet_bridge_grandpa
::
Config
<
BridgeGrandpaRococoBulletinInstance
>
for
Runtime
{
type
RuntimeEvent
=
RuntimeEvent
;
type
BridgedChain
=
bp_polkadot_bulletin
::
PolkadotBulletin
;
type
MaxFreeMandatoryHeadersPerBlock
=
ConstU32
<
4
>
;
type
MaxFreeHeadersPerBlock
=
ConstU32
<
4
>
;
type
FreeHeadersInterval
=
ConstU32
<
5
>
;
type
HeadersToKeep
=
RelayChainHeadersToKeep
;
// Technically this is incorrect - we have two pallet instances and ideally we shall
// benchmark every instance separately. But the benchmarking engine has a flaw - it
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_bulletin_config.rs
View file @
aceda465
...
...
@@ -20,17 +20,15 @@
//! are reusing Polkadot Bulletin chain primitives everywhere here.
use
crate
::{
bridge_common_config
::{
BridgeGrandpaRococoBulletinInstance
,
BridgeHubRococo
},
weights
,
xcm_config
::
UniversalLocation
,
AccountId
,
BridgeRococoBulletinGrandpa
,
BridgeRococoBulletinMessages
,
PolkadotXcm
,
Runtime
,
RuntimeEvent
,
XcmOverRococoBulletin
,
XcmRouter
,
bridge_common_config
::
BridgeHubRococo
,
weights
,
xcm_config
::
UniversalLocation
,
AccountId
,
BridgeRococoBulletinGrandpa
,
BridgeRococoBulletinMessages
,
PolkadotXcm
,
Runtime
,
RuntimeEvent
,
XcmOverRococoBulletin
,
XcmRouter
,
};
use
bp_messages
::
LaneId
;
use
bp_runtime
::
Chain
;
use
bridge_runtime_common
::{
extensions
::
refund_relayer_extension
::{
ActualFeeRefund
,
RefundBridged
Grandpa
Messages
,
RefundSignedExtensionAdapter
,
ActualFeeRefund
,
RefundBridgedMessages
,
RefundSignedExtensionAdapter
,
RefundableMessagesLane
,
},
messages
,
...
...
@@ -83,6 +81,9 @@ parameter_types! {
pub
const
RococoPeopleToRococoBulletinMessagesLane
:
bp_messages
::
LaneId
=
XCM_LANE_FOR_ROCOCO_PEOPLE_TO_ROCOCO_BULLETIN
;
// see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value
pub
PriorityBoostPerRelayHeader
:
u64
=
58_014_163_614_163
;
/// Priority boost that the registered relayer receives for every additional message in the message
/// delivery transaction.
///
...
...
@@ -169,9 +170,8 @@ impl messages::BridgedChainWithMessages for RococoBulletin {}
/// Signed extension that refunds relayers that are delivering messages from the Rococo Bulletin
/// chain.
pub
type
OnBridgeHubRococoRefundRococoBulletinMessages
=
RefundSignedExtensionAdapter
<
RefundBridged
Grandpa
Messages
<
RefundBridgedMessages
<
Runtime
,
BridgeGrandpaRococoBulletinInstance
,
RefundableMessagesLane
<
WithRococoBulletinMessagesInstance
,
RococoPeopleToRococoBulletinMessagesLane
,
...
...
@@ -244,6 +244,9 @@ mod tests {
/// operational costs and a faster bridge), so this value should be significant.
const
FEE_BOOST_PER_MESSAGE
:
Balance
=
2
*
rococo
::
currency
::
UNITS
;
// see `FEE_BOOST_PER_MESSAGE` comment
const
FEE_BOOST_PER_RELAY_HEADER
:
Balance
=
2
*
rococo
::
currency
::
UNITS
;
#[test]
fn
ensure_bridge_hub_rococo_message_lane_weights_are_correct
()
{
check_message_lane_weights
::
<
...
...
@@ -273,7 +276,13 @@ mod tests {
// Bulletin chain - it has the same (almost) runtime for Polkadot Bulletin and Rococo
// Bulletin, so we have to adhere Polkadot names here
bridge_runtime_common
::
extensions
::
priority_calculator
::
ensure_priority_boost_is_sane
::
<
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_relay_header
::
ensure_priority_boost_is_sane
::
<
Runtime
,
BridgeGrandpaRococoBulletinInstance
,
PriorityBoostPerRelayHeader
,
>
(
FEE_BOOST_PER_RELAY_HEADER
);
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_message
::
ensure_priority_boost_is_sane
::
<
Runtime
,
WithRococoBulletinMessagesInstance
,
PriorityBoostPerMessage
,
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_westend_config.rs
View file @
aceda465
...
...
@@ -29,8 +29,8 @@ use bp_messages::LaneId;
use
bp_runtime
::
Chain
;
use
bridge_runtime_common
::{
extensions
::
refund_relayer_extension
::{
ActualFeeRefund
,
RefundBridged
Parachain
Messages
,
RefundSignedExtensionAdapter
,
RefundableMessagesLane
,
RefundableParachain
,
ActualFeeRefund
,
RefundBridgedMessages
,
RefundSignedExtensionAdapter
,
RefundableMessagesLane
,
},
messages
,
messages
::{
...
...
@@ -65,6 +65,10 @@ parameter_types! {
2
,
[
GlobalConsensus
(
WestendGlobalConsensusNetwork
::
get
())]
);
// see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value
pub
PriorityBoostPerRelayHeader
:
u64
=
32_007_814_407_814
;
// see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value
pub
PriorityBoostPerParachainHeader
:
u64
=
1_396_340_903_540_903
;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub
PriorityBoostPerMessage
:
u64
=
182_044_444_444_444
;
...
...
@@ -174,12 +178,8 @@ impl messages::BridgedChainWithMessages for BridgeHubWestend {}
/// Signed extension that refunds relayers that are delivering messages from the Westend parachain.
pub
type
OnBridgeHubRococoRefundBridgeHubWestendMessages
=
RefundSignedExtensionAdapter
<
RefundBridged
Parachain
Messages
<
RefundBridgedMessages
<
Runtime
,
RefundableParachain
<
BridgeParachainWestendInstance
,
bp_bridge_hub_westend
::
BridgeHubWestend
,
>
,
RefundableMessagesLane
<
WithBridgeHubWestendMessagesInstance
,
AssetHubRococoToAssetHubWestendMessagesLane
,
...
...
@@ -246,6 +246,7 @@ mod tests {
use
crate
::
bridge_common_config
::
BridgeGrandpaWestendInstance
;
use
bridge_runtime_common
::{
assert_complete_bridge_types
,
extensions
::
refund_relayer_extension
::
RefundableParachain
,
integrity
::{
assert_complete_bridge_constants
,
check_message_lane_weights
,
AssertBridgeMessagesPalletConstants
,
AssertBridgePalletNames
,
AssertChainConstants
,
...
...
@@ -266,6 +267,11 @@ mod tests {
/// operational costs and a faster bridge), so this value should be significant.
const
FEE_BOOST_PER_MESSAGE
:
Balance
=
2
*
rococo
::
currency
::
UNITS
;
// see `FEE_BOOST_PER_MESSAGE` comment
const
FEE_BOOST_PER_RELAY_HEADER
:
Balance
=
2
*
rococo
::
currency
::
UNITS
;
// see `FEE_BOOST_PER_MESSAGE` comment
const
FEE_BOOST_PER_PARACHAIN_HEADER
:
Balance
=
2
*
rococo
::
currency
::
UNITS
;
#[test]
fn
ensure_bridge_hub_rococo_message_lane_weights_are_correct
()
{
check_message_lane_weights
::
<
...
...
@@ -318,7 +324,19 @@ mod tests {
},
});
bridge_runtime_common
::
extensions
::
priority_calculator
::
ensure_priority_boost_is_sane
::
<
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_relay_header
::
ensure_priority_boost_is_sane
::
<
Runtime
,
BridgeGrandpaWestendInstance
,
PriorityBoostPerRelayHeader
,
>
(
FEE_BOOST_PER_RELAY_HEADER
);
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_parachain_header
::
ensure_priority_boost_is_sane
::
<
Runtime
,
RefundableParachain
<
WithBridgeHubWestendMessagesInstance
,
BridgeHubWestend
>
,
PriorityBoostPerParachainHeader
,
>
(
FEE_BOOST_PER_PARACHAIN_HEADER
);
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_message
::
ensure_priority_boost_is_sane
::
<
Runtime
,
WithBridgeHubWestendMessagesInstance
,
PriorityBoostPerMessage
,
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
View file @
aceda465
...
...
@@ -35,6 +35,12 @@ pub mod bridge_to_westend_config;
mod
weights
;
pub
mod
xcm_config
;
use
bridge_runtime_common
::
extensions
::{
check_obsolete_extension
::{
CheckAndBoostBridgeGrandpaTransactions
,
CheckAndBoostBridgeParachainsTransactions
,
},
refund_relayer_extension
::
RefundableParachain
,
};
use
cumulus_pallet_parachain_system
::
RelayNumberMonotonicallyIncreases
;
use
snowbridge_beacon_primitives
::{
Fork
,
ForkVersions
};
use
snowbridge_core
::{
...
...
@@ -63,7 +69,7 @@ use frame_support::{
dispatch
::
DispatchClass
,
genesis_builder_helper
::{
build_state
,
get_preset
},
parameter_types
,
traits
::{
ConstBool
,
ConstU32
,
ConstU64
,
ConstU8
,
TransformOrigin
},
traits
::{
ConstBool
,
ConstU32
,
ConstU64
,
ConstU8
,
Get
,
TransformOrigin
},
weights
::{
ConstantMultiplier
,
Weight
},
PalletId
,
};
...
...
@@ -139,7 +145,7 @@ pub type UncheckedExtrinsic =
/// Migrations to apply on runtime upgrade.
pub
type
Migrations
=
(
pallet_collator_selection
::
migration
::
v
1
::
Migrat
e
ToV
1
<
Runtime
>
,
pallet_collator_selection
::
migration
::
v
2
::
Migrat
ion
ToV
2
<
Runtime
>
,
pallet_multisig
::
migrations
::
v1
::
MigrateToV1
<
Runtime
>
,
InitStorageVersions
,
cumulus_pallet_xcmp_queue
::
migration
::
v4
::
MigrationToV4
<
Runtime
>
,
...
...
@@ -740,10 +746,28 @@ pub type XcmOverRococoBulletin = XcmOverPolkadotBulletin;
bridge_runtime_common
::
generate_bridge_reject_obsolete_headers_and_messages!
{
RuntimeCall
,
AccountId
,
// Grandpa
BridgeWestendGrandpa
,
BridgeRococoBulletinGrandpa
,
CheckAndBoostBridgeGrandpaTransactions
<
Runtime
,
bridge_common_config
::
BridgeGrandpaWestendInstance
,
bridge_to_westend_config
::
PriorityBoostPerRelayHeader
,
xcm_config
::
TreasuryAccount
,
>
,
CheckAndBoostBridgeGrandpaTransactions
<
Runtime
,
bridge_common_config
::
BridgeGrandpaRococoBulletinInstance
,
bridge_to_bulletin_config
::
PriorityBoostPerRelayHeader
,
xcm_config
::
TreasuryAccount
,
>
,
// Parachains
BridgeWestendParachains
,
CheckAndBoostBridgeParachainsTransactions
<
Runtime
,
RefundableParachain
<
bridge_common_config
::
BridgeParachainWestendInstance
,
bp_bridge_hub_westend
::
BridgeHubWestend
,
>
,
bridge_to_westend_config
::
PriorityBoostPerParachainHeader
,
xcm_config
::
TreasuryAccount
,
>
,
// Messages
BridgeWestendMessages
,
BridgeRococoBulletinMessages
...
...
@@ -938,6 +962,11 @@ impl_runtime_apis! {
fn
best_finalized
()
->
Option
<
HeaderId
<
bp_westend
::
Hash
,
bp_westend
::
BlockNumber
>>
{
BridgeWestendGrandpa
::
best_finalized
()
}
fn
free_headers_interval
()
->
Option
<
bp_westend
::
BlockNumber
>
{
<
Runtime
as
pallet_bridge_grandpa
::
Config
<
bridge_common_config
::
BridgeGrandpaWestendInstance
>>
::
FreeHeadersInterval
::
get
()
}
fn
synced_headers_grandpa_info
(
)
->
Vec
<
bp_header_chain
::
StoredHeaderGrandpaInfo
<
bp_westend
::
Header
>>
{
BridgeWestendGrandpa
::
synced_headers_grandpa_info
()
...
...
@@ -950,6 +979,10 @@ impl_runtime_apis! {
bp_bridge_hub_westend
::
BridgeHubWestend
>
()
.unwrap_or
(
None
)
}
fn
free_headers_interval
()
->
Option
<
bp_bridge_hub_westend
::
BlockNumber
>
{
// "free interval" is not currently used for parachains
None
}
}
// This is exposed by BridgeHubRococo
...
...
@@ -984,6 +1017,12 @@ impl_runtime_apis! {
BridgePolkadotBulletinGrandpa
::
best_finalized
()
}
fn
free_headers_interval
()
->
Option
<
bp_polkadot_bulletin
::
BlockNumber
>
{
<
Runtime
as
pallet_bridge_grandpa
::
Config
<
bridge_common_config
::
BridgeGrandpaRococoBulletinInstance
>>
::
FreeHeadersInterval
::
get
()
}
fn
synced_headers_grandpa_info
(
)
->
Vec
<
bp_header_chain
::
StoredHeaderGrandpaInfo
<
bp_polkadot_bulletin
::
Header
>>
{
BridgePolkadotBulletinGrandpa
::
synced_headers_grandpa_info
()
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs
View file @
aceda465
...
...
@@ -17,8 +17,10 @@
//! Expose the auto generated weight files.
use
::
pallet_bridge_grandpa
::
WeightInfoExt
as
GrandpaWeightInfoExt
;
use
::
pallet_bridge_messages
::
WeightInfoExt
as
MessagesWeightInfoExt
;
use
::
pallet_bridge_parachains
::
WeightInfoExt
as
ParachainsWeightInfoExt
;
use
::
pallet_bridge_relayers
::
WeightInfo
as
_
;
pub
mod
block_weights
;
pub
mod
cumulus_pallet_parachain_system
;
...
...
@@ -56,6 +58,16 @@ use frame_support::weights::Weight;
// import trait from dependency module
use
::
pallet_bridge_relayers
::
WeightInfoExt
as
_
;
impl
GrandpaWeightInfoExt
for
pallet_bridge_grandpa
::
WeightInfo
<
crate
::
Runtime
>
{
fn
submit_finality_proof_overhead_from_runtime
()
->
Weight
{
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pallet_bridge_relayers
::
WeightInfo
::
<
Runtime
>
::
slash_and_deregister
()
}
}
impl
MessagesWeightInfoExt
for
pallet_bridge_messages_rococo_to_rococo_bulletin
::
WeightInfo
<
crate
::
Runtime
>
{
...
...
@@ -94,4 +106,12 @@ impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo<crate::Run
fn
expected_extra_storage_proof_size
()
->
u32
{
bp_bridge_hub_westend
::
EXTRA_STORAGE_PROOF_SIZE
}
fn
submit_parachain_heads_overhead_from_runtime
()
->
Weight
{
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pallet_bridge_relayers
::
WeightInfo
::
<
Runtime
>
::
slash_and_deregister
()
}
}
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-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("bridge-hub-rococo-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -64,30 +64,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 18_732_000 picoseconds.
Weight
::
from_parts
(
19_386_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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_943_000 picoseconds.
Weight
::
from_parts
(
19_455_000
,
0
)
// Minimum execution time: 18_513_000 picoseconds.
Weight
::
from_parts
(
19_156_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -112,8 +90,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `70`
// Estimated: `3593`
// Minimum execution time: 88_
917
_000 picoseconds.
Weight
::
from_parts
(
91_611
_000
,
0
)
// Minimum execution time: 88_
096
_000 picoseconds.
Weight
::
from_parts
(
89_732
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3593
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -148,8 +126,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `70`
// Estimated: `3593`
// Minimum execution time: 88_
587
_000 picoseconds.
Weight
::
from_parts
(
90_303
_000
,
0
)
// Minimum execution time: 88_
239
_000 picoseconds.
Weight
::
from_parts
(
89_729
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3593
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -164,24 +142,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_
856
_000 picoseconds.
Weight
::
from_parts
(
6_2
02
_000
,
0
)
// Minimum execution time: 5_
955
_000 picoseconds.
Weight
::
from_parts
(
6_2
66
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -191,8 +159,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_
797
_000 picoseconds.
Weight
::
from_parts
(
1_9
70
_000
,
0
)
// Minimum execution time: 1_
868
_000 picoseconds.
Weight
::
from_parts
(
1_9
61
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -218,8 +186,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 24_
479
_000 picoseconds.
Weight
::
from_parts
(
25_0
58
_000
,
0
)
// Minimum execution time: 24_
388
_000 picoseconds.
Weight
::
from_parts
(
25_0
72
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -244,8 +212,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `255`
// Estimated: `3720`
// Minimum execution time: 2
7_28
2_000 picoseconds.
Weight
::
from_parts
(
27_
924
_000
,
0
)
// Minimum execution time: 2
6_76
2_000 picoseconds.
Weight
::
from_parts
(
27_
631
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3720
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -256,8 +224,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
01
_000 picoseconds.
Weight
::
from_parts
(
1_988
_000
,
0
)
// Minimum execution time: 1_8
56
_000 picoseconds.
Weight
::
from_parts
(
2_033
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -267,8 +235,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `89`
// Estimated: `13454`
// Minimum execution time: 1
6_509
_000 picoseconds.
Weight
::
from_parts
(
1
6_939
_000
,
0
)
// Minimum execution time: 1
7_718
_000 picoseconds.
Weight
::
from_parts
(
1
8_208
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13454
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -279,8 +247,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `93`
// Estimated: `13458`
// Minimum execution time: 1
6_140
_000 picoseconds.
Weight
::
from_parts
(
1
6_843
_000
,
0
)
// Minimum execution time: 1
7_597
_000 picoseconds.
Weight
::
from_parts
(
1
8_090
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13458
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -291,8 +259,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `15946`
// Minimum execution time: 1
8_160
_000 picoseconds.
Weight
::
from_parts
(
18_948
_000
,
0
)
// Minimum execution time: 1
9_533
_000 picoseconds.
Weight
::
from_parts
(
20_164
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
15946
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -314,8 +282,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `6046`
// Minimum execution time: 24_
409
_000 picoseconds.
Weight
::
from_parts
(
25_
261
_000
,
0
)
// Minimum execution time: 24_
958
_000 picoseconds.
Weight
::
from_parts
(
25_
628
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6046
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -326,8 +294,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_848
_000 picoseconds.
Weight
::
from_parts
(
1
1_241
_000
,
0
)
// Minimum execution time: 1
2_209
_000 picoseconds.
Weight
::
from_parts
(
1
2_612
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11026
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -337,8 +305,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_609
_000 picoseconds.
Weight
::
from_parts
(
1
7_044
_000
,
0
)
// Minimum execution time: 1
7_844
_000 picoseconds.
Weight
::
from_parts
(
1
8_266
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13465
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -361,8 +329,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
2_500
_000 picoseconds.
Weight
::
from_parts
(
3
3_475
_000
,
0
)
// Minimum execution time: 3
4_131
_000 picoseconds.
Weight
::
from_parts
(
3
4_766
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13471
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
11
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -375,8 +343,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_
484
_000 picoseconds.
Weight
::
from_parts
(
3_
673
_000
,
0
)
// Minimum execution time: 3_
525
_000 picoseconds.
Weight
::
from_parts
(
3_
724
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1517
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -387,8 +355,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
5_22
5_000 picoseconds.
Weight
::
from_parts
(
25_
731
_000
,
0
)
// Minimum execution time: 2
4_97
5_000 picoseconds.
Weight
::
from_parts
(
25_
517
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11134
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -399,8 +367,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_
9
61_000 picoseconds.
Weight
::
from_parts
(
34_
818
_000
,
0
)
// Minimum execution time: 33_
7
61_000 picoseconds.
Weight
::
from_parts
(
34_
674
_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/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs
View file @
aceda465
...
...
@@ -19,22 +19,12 @@ use super::{
ParachainSystem
,
PolkadotXcm
,
Runtime
,
RuntimeCall
,
RuntimeEvent
,
RuntimeOrigin
,
TransactionByteFee
,
WeightToFee
,
XcmpQueue
,
};
use
crate
::{
bridge_common_config
::{
BridgeGrandpaRococoBulletinInstance
,
BridgeGrandpaWestendInstance
,
BridgeParachainWestendInstance
,
DeliveryRewardInBalance
,
RequiredStakeForStakeAndSlash
,
},
bridge_to_bulletin_config
::
WithRococoBulletinMessagesInstance
,
bridge_to_westend_config
::
WithBridgeHubWestendMessagesInstance
,
EthereumGatewayAddress
,
};
use
bp_messages
::
LaneId
;
use
bp_relayers
::{
PayRewardFromAccount
,
RewardsAccountOwner
,
RewardsAccountParams
};
use
bp_runtime
::
ChainId
;
use
frame_support
::{
parameter_types
,
traits
::{
tokens
::
imbalance
::
ResolveTo
,
ConstU32
,
Contains
,
Equals
,
Everything
,
Nothing
},
StoragePrefixedMap
,
};
use
frame_system
::
EnsureRoot
;
use
pallet_collator_selection
::
StakingPotAccountId
;
...
...
@@ -56,15 +46,16 @@ use testnet_parachains_constants::rococo::snowbridge::EthereumNetwork;
use
xcm
::
latest
::
prelude
::
*
;
use
xcm_builder
::{
deposit_or_burn_fee
,
AccountId32Aliases
,
AllowExplicitUnpaidExecutionFrom
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HandleFee
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeToAccount
,
AllowHrmpNotificationsFromRelayChain
,
AllowKnownQueryResponses
,
AllowSubscriptionsFrom
,
AllowTopLevelPaidExecutionFrom
,
DenyReserveTransferToRelayChain
,
DenyThenTry
,
EnsureXcmOrigin
,
FrameTransactionalProcessor
,
FungibleAdapter
,
HandleFee
,
IsConcrete
,
ParentAsSuperuser
,
ParentIsPreset
,
RelayChainAsNative
,
SiblingParachainAsNative
,
SiblingParachainConvertsVia
,
SignedAccountId32AsNative
,
SignedToAccountId32
,
SovereignSignedViaLocation
,
TakeWeightCredit
,
TrailingSetTopicAsId
,
UsingComponents
,
WeightInfoBounds
,
WithComputedOrigin
,
WithUniqueTopic
,
XcmFeeToAccount
,
};
use
xcm_executor
::{
traits
::{
FeeManager
,
FeeReason
,
FeeReason
::
Export
,
TransactAsset
,
WithOriginFilter
},
traits
::{
FeeManager
,
FeeReason
,
FeeReason
::
Export
,
TransactAsset
},
XcmExecutor
,
};
...
...
@@ -138,104 +129,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
}
}
// Allow to change dedicated storage items (called by governance-like)
match
call
{
RuntimeCall
::
System
(
frame_system
::
Call
::
set_storage
{
items
})
if
items
.iter
()
.all
(|(
k
,
_
)|
{
k
.eq
(
&
DeliveryRewardInBalance
::
key
())
||
k
.eq
(
&
RequiredStakeForStakeAndSlash
::
key
())
||
k
.eq
(
&
EthereumGatewayAddress
::
key
())
||
// Allow resetting of Ethereum nonces in Rococo only.
k
.starts_with
(
&
snowbridge_pallet_inbound_queue
::
Nonce
::
<
Runtime
>
::
final_prefix
())
||
k
.starts_with
(
&
snowbridge_pallet_outbound_queue
::
Nonce
::
<
Runtime
>
::
final_prefix
())
})
=>
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
(
..
)
|
RuntimeCall
::
Session
(
pallet_session
::
Call
::
purge_keys
{
..
})
|
RuntimeCall
::
XcmpQueue
(
..
)
|
RuntimeCall
::
MessageQueue
(
..
)
|
RuntimeCall
::
BridgeWestendGrandpa
(
pallet_bridge_grandpa
::
Call
::
<
Runtime
,
BridgeGrandpaWestendInstance
,
>
::
initialize
{
..
})
|
RuntimeCall
::
BridgeWestendGrandpa
(
pallet_bridge_grandpa
::
Call
::
<
Runtime
,
BridgeGrandpaWestendInstance
,
>
::
set_operating_mode
{
..
})
|
RuntimeCall
::
BridgeWestendParachains
(
pallet_bridge_parachains
::
Call
::
<
Runtime
,
BridgeParachainWestendInstance
,
>
::
set_operating_mode
{
..
})
|
RuntimeCall
::
BridgeWestendMessages
(
pallet_bridge_messages
::
Call
::
<
Runtime
,
WithBridgeHubWestendMessagesInstance
,
>
::
set_operating_mode
{
..
})
|
RuntimeCall
::
BridgePolkadotBulletinGrandpa
(
pallet_bridge_grandpa
::
Call
::
<
Runtime
,
BridgeGrandpaRococoBulletinInstance
,
>
::
initialize
{
..
})
|
RuntimeCall
::
BridgePolkadotBulletinGrandpa
(
pallet_bridge_grandpa
::
Call
::
<
Runtime
,
BridgeGrandpaRococoBulletinInstance
,
>
::
set_operating_mode
{
..
})
|
RuntimeCall
::
BridgePolkadotBulletinMessages
(
pallet_bridge_messages
::
Call
::
<
Runtime
,
WithRococoBulletinMessagesInstance
,
>
::
set_operating_mode
{
..
})
|
RuntimeCall
::
EthereumBeaconClient
(
snowbridge_pallet_ethereum_client
::
Call
::
force_checkpoint
{
..
}
|
snowbridge_pallet_ethereum_client
::
Call
::
set_operating_mode
{
..
},
)
|
RuntimeCall
::
EthereumInboundQueue
(
snowbridge_pallet_inbound_queue
::
Call
::
set_operating_mode
{
..
},
)
|
RuntimeCall
::
EthereumOutboundQueue
(
snowbridge_pallet_outbound_queue
::
Call
::
set_operating_mode
{
..
},
)
|
RuntimeCall
::
EthereumSystem
(
snowbridge_pallet_system
::
Call
::
upgrade
{
..
}
|
snowbridge_pallet_system
::
Call
::
set_operating_mode
{
..
}
|
snowbridge_pallet_system
::
Call
::
set_pricing_parameters
{
..
}
|
snowbridge_pallet_system
::
Call
::
force_update_channel
{
..
}
|
snowbridge_pallet_system
::
Call
::
force_transfer_native_from_agent
{
..
}
|
snowbridge_pallet_system
::
Call
::
set_token_transfer_fees
{
..
},
)
)
}
}
pub
type
Barrier
=
TrailingSetTopicAsId
<
DenyThenTry
<
DenyReserveTransferToRelayChain
,
...
...
@@ -258,6 +151,8 @@ pub type Barrier = TrailingSetTopicAsId<
)
>
,
// Subscriptions for version tracking are OK.
AllowSubscriptionsFrom
<
ParentRelayOrSiblingParachains
>
,
// HRMP notifications from the relay chain are OK.
AllowHrmpNotificationsFromRelayChain
,
),
UniversalLocation
,
ConstU32
<
8
>
,
...
...
@@ -337,8 +232,8 @@ impl xcm_executor::Config for XcmConfig {
crate
::
bridge_to_ethereum_config
::
SnowbridgeExporter
,
);
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/bridge-hubs/bridge-hub-rococo/tests/tests.rs
View file @
aceda465
...
...
@@ -80,11 +80,10 @@ fn construct_and_apply_extrinsic(
r
.unwrap
()
}
fn
construct_and_estimate_extrinsic_fee
(
batch
:
pallet_utility
::
Call
<
Runtime
>
)
->
Balance
{
let
batch_call
=
RuntimeCall
::
Utility
(
batch
);
let
batch_info
=
batch_call
.get_dispatch_info
();
let
xt
=
construct_extrinsic
(
Alice
,
batch_call
);
TransactionPayment
::
compute_fee
(
xt
.encoded_size
()
as
_
,
&
batch_info
,
0
)
fn
construct_and_estimate_extrinsic_fee
(
call
:
RuntimeCall
)
->
Balance
{
let
info
=
call
.get_dispatch_info
();
let
xt
=
construct_extrinsic
(
Alice
,
call
);
TransactionPayment
::
compute_fee
(
xt
.encoded_size
()
as
_
,
&
info
,
0
)
}
fn
collator_session_keys
()
->
bridge_hub_test_utils
::
CollatorSessionKeys
<
Runtime
>
{
...
...
@@ -376,20 +375,20 @@ mod bridge_hub_westend_tests {
}
#[test]
pub
fn
complex
_relay_extrinsic_works
()
{
// f
o
r Westend
from_parachain
::
complex
_relay_extrinsic_works
::
<
RuntimeTestsAdapter
>
(
fn
free
_relay_extrinsic_works
()
{
// fr
om
Westend
from_parachain
::
free
_relay_extrinsic_works
::
<
RuntimeTestsAdapter
>
(
collator_session_keys
(),
slot_durations
(),
bp_bridge_hub_rococo
::
BRIDGE_HUB_ROCOCO_PARACHAIN_ID
,
bp_bridge_hub_westend
::
BRIDGE_HUB_WESTEND_PARACHAIN_ID
,
SIBLING_PARACHAIN_ID
,
BridgeHubWestendChainId
::
get
(),
SIBLING_PARACHAIN_ID
,
Rococo
,
XCM_LANE_FOR_ASSET_HUB_ROCOCO_TO_ASSET_HUB_WESTEND
,
||
(),
construct_and_apply_extrinsic
,
)
;
)
}
#[test]
...
...
@@ -414,12 +413,12 @@ mod bridge_hub_westend_tests {
}
#[test]
pub
fn
can_calculate_fee_for_
complex
_message_delivery_transaction
()
{
fn
can_calculate_fee_for_
standalone
_message_delivery_transaction
()
{
bridge_hub_test_utils
::
check_sane_fees_values
(
"bp_bridge_hub_rococo::BridgeHubRococoBaseDeliveryFeeInRocs"
,
bp_bridge_hub_rococo
::
BridgeHubRococoBaseDeliveryFeeInRocs
::
get
(),
||
{
from_parachain
::
can_calculate_fee_for_
complex
_message_delivery_transaction
::
<
from_parachain
::
can_calculate_fee_for_
standalone
_message_delivery_transaction
::
<
RuntimeTestsAdapter
,
>
(
collator_session_keys
(),
construct_and_estimate_extrinsic_fee
)
},
...
...
@@ -433,12 +432,12 @@ mod bridge_hub_westend_tests {
}
#[test]
pub
fn
can_calculate_fee_for_
complex
_message_confirmation_transaction
()
{
fn
can_calculate_fee_for_
standalone
_message_confirmation_transaction
()
{
bridge_hub_test_utils
::
check_sane_fees_values
(
"bp_bridge_hub_rococo::BridgeHubRococoBaseConfirmationFeeInRocs"
,
bp_bridge_hub_rococo
::
BridgeHubRococoBaseConfirmationFeeInRocs
::
get
(),
||
{
from_parachain
::
can_calculate_fee_for_
complex
_message_confirmation_transaction
::
<
from_parachain
::
can_calculate_fee_for_
standalone
_message_confirmation_transaction
::
<
RuntimeTestsAdapter
,
>
(
collator_session_keys
(),
construct_and_estimate_extrinsic_fee
)
},
...
...
@@ -581,28 +580,28 @@ mod bridge_hub_bulletin_tests {
}
#[test]
pub
fn
complex
_relay_extrinsic_works
()
{
// f
o
r Bulletin
from_grandpa_chain
::
complex
_relay_extrinsic_works
::
<
RuntimeTestsAdapter
>
(
fn
free
_relay_extrinsic_works
()
{
// fr
om
Bulletin
from_grandpa_chain
::
free
_relay_extrinsic_works
::
<
RuntimeTestsAdapter
>
(
collator_session_keys
(),
slot_durations
(),
bp_bridge_hub_rococo
::
BRIDGE_HUB_ROCOCO_PARACHAIN_ID
,
SIBLING_PARACHAIN_ID
,
RococoBulletinChainId
::
get
(),
SIBLING_PARACHAIN_ID
,
Rococo
,
XCM_LANE_FOR_ROCOCO_PEOPLE_TO_ROCOCO_BULLETIN
,
||
(),
construct_and_apply_extrinsic
,
)
;
)
}
#[test]
pub
fn
can_calculate_fee_for_
complex
_message_delivery_transaction
()
{
pub
fn
can_calculate_fee_for_
standalone
_message_delivery_transaction
()
{
bridge_hub_test_utils
::
check_sane_fees_values
(
"bp_bridge_hub_rococo::BridgeHubRococoBaseDeliveryFeeInRocs"
,
bp_bridge_hub_rococo
::
BridgeHubRococoBaseDeliveryFeeInRocs
::
get
(),
||
{
from_grandpa_chain
::
can_calculate_fee_for_
complex
_message_delivery_transaction
::
<
from_grandpa_chain
::
can_calculate_fee_for_
standalone
_message_delivery_transaction
::
<
RuntimeTestsAdapter
,
>
(
collator_session_keys
(),
construct_and_estimate_extrinsic_fee
)
},
...
...
@@ -617,12 +616,12 @@ mod bridge_hub_bulletin_tests {
}
#[test]
pub
fn
can_calculate_fee_for_
complex
_message_confirmation_transaction
()
{
pub
fn
can_calculate_fee_for_
standalone
_message_confirmation_transaction
()
{
bridge_hub_test_utils
::
check_sane_fees_values
(
"bp_bridge_hub_rococo::BridgeHubRococoBaseConfirmationFeeInRocs"
,
bp_bridge_hub_rococo
::
BridgeHubRococoBaseConfirmationFeeInRocs
::
get
(),
||
{
from_grandpa_chain
::
can_calculate_fee_for_
complex
_message_confirmation_transaction
::
<
from_grandpa_chain
::
can_calculate_fee_for_
standalone
_message_confirmation_transaction
::
<
RuntimeTestsAdapter
,
>
(
collator_session_keys
(),
construct_and_estimate_extrinsic_fee
)
},
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml
View file @
aceda465
...
...
@@ -18,6 +18,7 @@ hex-literal = { version = "0.4.1" }
log
=
{
workspace
=
true
}
scale-info
=
{
version
=
"2.11.1"
,
default-features
=
false
,
features
=
[
"derive"
]
}
serde
=
{
optional
=
true
,
features
=
[
"derive"
],
workspace
=
true
,
default-features
=
true
}
tuplex
=
{
version
=
"0.1"
,
default-features
=
false
}
# Substrate
frame-benchmarking
=
{
path
=
"../../../../../substrate/frame/benchmarking"
,
default-features
=
false
,
optional
=
true
}
...
...
@@ -180,6 +181,7 @@ std = [
"sp-version/std"
,
"substrate-wasm-builder"
,
"testnet-parachains-constants/std"
,
"tuplex/std"
,
"westend-runtime-constants/std"
,
"xcm-builder/std"
,
"xcm-executor/std"
,
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_rococo_config.rs
View file @
aceda465
...
...
@@ -26,8 +26,8 @@ use bp_parachains::SingleParaStoredHeaderDataBuilder;
use
bp_runtime
::
Chain
;
use
bridge_runtime_common
::{
extensions
::
refund_relayer_extension
::{
ActualFeeRefund
,
RefundBridged
Parachain
Messages
,
RefundSignedExtensionAdapter
,
RefundableMessagesLane
,
RefundableParachain
,
ActualFeeRefund
,
RefundBridgedMessages
,
RefundSignedExtensionAdapter
,
RefundableMessagesLane
,
},
messages
,
messages
::{
...
...
@@ -70,6 +70,10 @@ parameter_types! {
2
,
[
GlobalConsensus
(
RococoGlobalConsensusNetwork
::
get
())]
);
// see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value
pub
PriorityBoostPerRelayHeader
:
u64
=
32_007_814_407_814
;
// see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value
pub
PriorityBoostPerParachainHeader
:
u64
=
1_396_340_903_540_903
;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub
PriorityBoostPerMessage
:
u64
=
182_044_444_444_444
;
...
...
@@ -191,9 +195,8 @@ impl ThisChainWithMessages for BridgeHubWestend {
/// Signed extension that refunds relayers that are delivering messages from the Rococo parachain.
pub
type
OnBridgeHubWestendRefundBridgeHubRococoMessages
=
RefundSignedExtensionAdapter
<
RefundBridged
Parachain
Messages
<
RefundBridgedMessages
<
Runtime
,
RefundableParachain
<
BridgeParachainRococoInstance
,
bp_bridge_hub_rococo
::
BridgeHubRococo
>
,
RefundableMessagesLane
<
WithBridgeHubRococoMessagesInstance
,
AssetHubWestendToAssetHubRococoMessagesLane
,
...
...
@@ -210,7 +213,8 @@ pub type BridgeGrandpaRococoInstance = pallet_bridge_grandpa::Instance1;
impl
pallet_bridge_grandpa
::
Config
<
BridgeGrandpaRococoInstance
>
for
Runtime
{
type
RuntimeEvent
=
RuntimeEvent
;
type
BridgedChain
=
bp_rococo
::
Rococo
;
type
MaxFreeMandatoryHeadersPerBlock
=
ConstU32
<
4
>
;
type
MaxFreeHeadersPerBlock
=
ConstU32
<
4
>
;
type
FreeHeadersInterval
=
ConstU32
<
5
>
;
type
HeadersToKeep
=
RelayChainHeadersToKeep
;
type
WeightInfo
=
weights
::
pallet_bridge_grandpa
::
WeightInfo
<
Runtime
>
;
}
...
...
@@ -281,6 +285,7 @@ mod tests {
use
super
::
*
;
use
bridge_runtime_common
::{
assert_complete_bridge_types
,
extensions
::
refund_relayer_extension
::
RefundableParachain
,
integrity
::{
assert_complete_bridge_constants
,
check_message_lane_weights
,
AssertBridgeMessagesPalletConstants
,
AssertBridgePalletNames
,
AssertChainConstants
,
...
...
@@ -301,6 +306,11 @@ mod tests {
/// operational costs and a faster bridge), so this value should be significant.
const
FEE_BOOST_PER_MESSAGE
:
Balance
=
2
*
westend
::
currency
::
UNITS
;
// see `FEE_BOOST_PER_MESSAGE` comment
const
FEE_BOOST_PER_RELAY_HEADER
:
Balance
=
2
*
westend
::
currency
::
UNITS
;
// see `FEE_BOOST_PER_MESSAGE` comment
const
FEE_BOOST_PER_PARACHAIN_HEADER
:
Balance
=
2
*
westend
::
currency
::
UNITS
;
#[test]
fn
ensure_bridge_hub_westend_message_lane_weights_are_correct
()
{
check_message_lane_weights
::
<
...
...
@@ -352,7 +362,19 @@ mod tests {
},
});
bridge_runtime_common
::
extensions
::
priority_calculator
::
ensure_priority_boost_is_sane
::
<
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_relay_header
::
ensure_priority_boost_is_sane
::
<
Runtime
,
BridgeGrandpaRococoInstance
,
PriorityBoostPerRelayHeader
,
>
(
FEE_BOOST_PER_RELAY_HEADER
);
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_parachain_header
::
ensure_priority_boost_is_sane
::
<
Runtime
,
RefundableParachain
<
WithBridgeHubRococoMessagesInstance
,
BridgeHubRococo
>
,
PriorityBoostPerParachainHeader
,
>
(
FEE_BOOST_PER_PARACHAIN_HEADER
);
bridge_runtime_common
::
extensions
::
priority_calculator
::
per_message
::
ensure_priority_boost_is_sane
::
<
Runtime
,
WithBridgeHubRococoMessagesInstance
,
PriorityBoostPerMessage
,
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
View file @
aceda465
...
...
@@ -32,6 +32,12 @@ pub mod bridge_to_rococo_config;
mod
weights
;
pub
mod
xcm_config
;
use
bridge_runtime_common
::
extensions
::{
check_obsolete_extension
::{
CheckAndBoostBridgeGrandpaTransactions
,
CheckAndBoostBridgeParachainsTransactions
,
},
refund_relayer_extension
::
RefundableParachain
,
};
use
cumulus_pallet_parachain_system
::
RelayNumberMonotonicallyIncreases
;
use
cumulus_primitives_core
::
ParaId
;
use
sp_api
::
impl_runtime_apis
;
...
...
@@ -57,7 +63,7 @@ use frame_support::{
dispatch
::
DispatchClass
,
genesis_builder_helper
::{
build_state
,
get_preset
},
parameter_types
,
traits
::{
ConstBool
,
ConstU32
,
ConstU64
,
ConstU8
,
TransformOrigin
},
traits
::{
ConstBool
,
ConstU32
,
ConstU64
,
ConstU8
,
Get
,
TransformOrigin
},
weights
::{
ConstantMultiplier
,
Weight
},
PalletId
,
};
...
...
@@ -118,7 +124,7 @@ pub type UncheckedExtrinsic =
/// Migrations to apply on runtime upgrade.
pub
type
Migrations
=
(
pallet_collator_selection
::
migration
::
v
1
::
Migrat
e
ToV
1
<
Runtime
>
,
pallet_collator_selection
::
migration
::
v
2
::
Migrat
ion
ToV
2
<
Runtime
>
,
pallet_multisig
::
migrations
::
v1
::
MigrateToV1
<
Runtime
>
,
InitStorageVersions
,
// unreleased
...
...
@@ -502,9 +508,22 @@ construct_runtime!(
bridge_runtime_common
::
generate_bridge_reject_obsolete_headers_and_messages!
{
RuntimeCall
,
AccountId
,
// Grandpa
BridgeRococoGrandpa
,
CheckAndBoostBridgeGrandpaTransactions
<
Runtime
,
bridge_to_rococo_config
::
BridgeGrandpaRococoInstance
,
bridge_to_rococo_config
::
PriorityBoostPerRelayHeader
,
xcm_config
::
TreasuryAccount
,
>
,
// Parachains
BridgeRococoParachains
,
CheckAndBoostBridgeParachainsTransactions
<
Runtime
,
RefundableParachain
<
bridge_to_rococo_config
::
BridgeParachainRococoInstance
,
bp_bridge_hub_rococo
::
BridgeHubRococo
,
>
,
bridge_to_rococo_config
::
PriorityBoostPerParachainHeader
,
xcm_config
::
TreasuryAccount
,
>
,
// Messages
BridgeRococoMessages
}
...
...
@@ -692,6 +711,11 @@ impl_runtime_apis! {
fn
best_finalized
()
->
Option
<
HeaderId
<
bp_rococo
::
Hash
,
bp_rococo
::
BlockNumber
>>
{
BridgeRococoGrandpa
::
best_finalized
()
}
fn
free_headers_interval
()
->
Option
<
bp_rococo
::
BlockNumber
>
{
<
Runtime
as
pallet_bridge_grandpa
::
Config
<
bridge_to_rococo_config
::
BridgeGrandpaRococoInstance
>>
::
FreeHeadersInterval
::
get
()
}
fn
synced_headers_grandpa_info
(
)
->
Vec
<
bp_header_chain
::
StoredHeaderGrandpaInfo
<
bp_rococo
::
Header
>>
{
BridgeRococoGrandpa
::
synced_headers_grandpa_info
()
...
...
@@ -704,6 +728,10 @@ impl_runtime_apis! {
bp_bridge_hub_rococo
::
BridgeHubRococo
>
()
.unwrap_or
(
None
)
}
fn
free_headers_interval
()
->
Option
<
bp_bridge_hub_rococo
::
BlockNumber
>
{
// "free interval" is not currently used for parachains
None
}
}
impl
bp_bridge_hub_rococo
::
FromBridgeHubRococoInboundLaneApi
<
Block
>
for
Runtime
{
...
...
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/mod.rs
View file @
aceda465
...
...
@@ -17,8 +17,10 @@
//! Expose the auto generated weight files.
use
::
pallet_bridge_grandpa
::
WeightInfoExt
as
GrandpaWeightInfoExt
;
use
::
pallet_bridge_messages
::
WeightInfoExt
as
MessagesWeightInfoExt
;
use
::
pallet_bridge_parachains
::
WeightInfoExt
as
ParachainsWeightInfoExt
;
use
::
pallet_bridge_relayers
::
WeightInfo
as
_
;
pub
mod
block_weights
;
pub
mod
cumulus_pallet_parachain_system
;
...
...
@@ -51,6 +53,16 @@ use frame_support::weights::Weight;
// import trait from dependency module
use
::
pallet_bridge_relayers
::
WeightInfoExt
as
_
;
impl
GrandpaWeightInfoExt
for
pallet_bridge_grandpa
::
WeightInfo
<
crate
::
Runtime
>
{
fn
submit_finality_proof_overhead_from_runtime
()
->
Weight
{
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pallet_bridge_relayers
::
WeightInfo
::
<
Runtime
>
::
slash_and_deregister
()
}
}
impl
MessagesWeightInfoExt
for
pallet_bridge_messages
::
WeightInfo
<
crate
::
Runtime
>
{
fn
expected_extra_storage_proof_size
()
->
u32
{
bp_bridge_hub_rococo
::
EXTRA_STORAGE_PROOF_SIZE
...
...
@@ -70,4 +82,12 @@ impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo<crate::Run
fn
expected_extra_storage_proof_size
()
->
u32
{
bp_bridge_hub_rococo
::
EXTRA_STORAGE_PROOF_SIZE
}
fn
submit_parachain_heads_overhead_from_runtime
()
->
Weight
{
// our signed extension:
// 1) checks whether relayer registration is active from validate/pre_dispatch;
// 2) may slash and deregister relayer from post_dispatch
// (2) includes (1), so (2) is the worst case
pallet_bridge_relayers
::
WeightInfo
::
<
Runtime
>
::
slash_and_deregister
()
}
}
cumulus/parachains/runtimes/bridge-hubs/bridge-hub-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
2
, 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("bridge-hub-westend-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -64,30 +64,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 19_702_000 picoseconds.
Weight
::
from_parts
(
20_410_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `ParachainSystem::UpwardDeliveryFeeFactor` (r:1 w:0)
/// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// 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: 19_525_000 picoseconds.
Weight
::
from_parts
(
20_071_000
,
0
)
// Minimum execution time: 19_527_000 picoseconds.
Weight
::
from_parts
(
19_839_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -112,8 +90,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `107`
// Estimated: `3593`
// Minimum execution time: 9
1_7
93_000 picoseconds.
Weight
::
from_parts
(
9
3_761
_000
,
0
)
// Minimum execution time: 9
0_
93
8
_000 picoseconds.
Weight
::
from_parts
(
9
2_822
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3593
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -148,8 +126,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `107`
// Estimated: `3593`
// Minimum execution time: 9
1_819
_000 picoseconds.
Weight
::
from_parts
(
9
3_19
8_000
,
0
)
// Minimum execution time: 9
0_133
_000 picoseconds.
Weight
::
from_parts
(
9
2_30
8_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3593
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -164,24 +142,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: 6_
183
_000 picoseconds.
Weight
::
from_parts
(
6_59
8
_000
,
0
)
// Minimum execution time: 6_
205
_000 picoseconds.
Weight
::
from_parts
(
6_59
5
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -191,8 +159,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_9
8
7_000 picoseconds.
Weight
::
from_parts
(
2_0
7
6_000
,
0
)
// Minimum execution time: 1_9
2
7_000 picoseconds.
Weight
::
from_parts
(
2_06
2
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -218,8 +186,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `38`
// Estimated: `3503`
// Minimum execution time: 25_
375
_000 picoseconds.
Weight
::
from_parts
(
2
6_165
_000
,
0
)
// Minimum execution time: 25_
078
_000 picoseconds.
Weight
::
from_parts
(
2
5_782
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3503
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -244,8 +212,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `255`
// Estimated: `3720`
// Minimum execution time: 28_1
67
_000 picoseconds.
Weight
::
from_parts
(
28_
792
_000
,
0
)
// Minimum execution time: 28_1
88
_000 picoseconds.
Weight
::
from_parts
(
28_
826
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3720
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
7
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -256,8 +224,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time:
2_039
_000 picoseconds.
Weight
::
from_parts
(
2_21
1_000
,
0
)
// Minimum execution time:
1_886
_000 picoseconds.
Weight
::
from_parts
(
1_99
1_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -267,8 +235,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `89`
// Estimated: `13454`
// Minimum execution time: 17_
127
_000 picoseconds.
Weight
::
from_parts
(
17_
519
_000
,
0
)
// Minimum execution time: 17_
443
_000 picoseconds.
Weight
::
from_parts
(
17_
964
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13454
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -279,8 +247,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `93`
// Estimated: `13458`
// Minimum execution time: 1
6_701
_000 picoseconds.
Weight
::
from_parts
(
1
7_250
_000
,
0
)
// Minimum execution time: 1
7_357
_000 picoseconds.
Weight
::
from_parts
(
1
8_006
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13458
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -291,8 +259,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_
795
_000 picoseconds.
Weight
::
from_parts
(
19_
302
_000
,
0
)
// Minimum execution time: 18_
838
_000 picoseconds.
Weight
::
from_parts
(
19_
688
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
15946
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -314,8 +282,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `106`
// Estimated: `6046`
// Minimum execution time: 25_
00
7_000 picoseconds.
Weight
::
from_parts
(
2
5_786
_000
,
0
)
// Minimum execution time: 25_
51
7_000 picoseconds.
Weight
::
from_parts
(
2
6_131
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6046
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
8
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -326,8 +294,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_5
34
_000 picoseconds.
Weight
::
from_parts
(
11_
798
_000
,
0
)
// Minimum execution time: 11_5
87
_000 picoseconds.
Weight
::
from_parts
(
11_
963
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11026
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -337,8 +305,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `100`
// Estimated: `13465`
// Minimum execution time: 17_
357
_000 picoseconds.
Weight
::
from_parts
(
1
7_629
_000
,
0
)
// Minimum execution time: 17_
490
_000 picoseconds.
Weight
::
from_parts
(
1
8_160
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13465
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -361,8 +329,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
3_487
_000 picoseconds.
Weight
::
from_parts
(
34_
033
_000
,
0
)
// Minimum execution time: 3
4_088
_000 picoseconds.
Weight
::
from_parts
(
34_
598
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13471
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
11
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -375,8 +343,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_
688
_000 picoseconds.
Weight
::
from_parts
(
3_
8
54_000
,
0
)
// Minimum execution time: 3_
566
_000 picoseconds.
Weight
::
from_parts
(
3_
7
54_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1517
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -387,8 +355,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
6_336
_000 picoseconds.
Weight
::
from_parts
(
2
6_873
_000
,
0
)
// Minimum execution time: 2
5_078
_000 picoseconds.
Weight
::
from_parts
(
2
5_477
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11134
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -399,8 +367,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `90`
// Estimated: `3555`
// Minimum execution time: 34_6
33
_000 picoseconds.
Weight
::
from_parts
(
35_1
7
1_000
,
0
)
// Minimum execution time: 34_6
61
_000 picoseconds.
Weight
::
from_parts
(
35_
4
11_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3555
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
Prev
1
2
3
4
5
6
7
8
9
10
…
17
Next