Skip to content
GitLab
Explore
Sign in
parity
Mirrored projects
polkadot-sdk
Compare revisions
be1d7d05e5f32b1bfa67aec2f6344d2c6ff60f50 to aceda4659509d426d364188fa72555de58b887ba
Hide whitespace changes
Inline
Side-by-side
polkadot/primitives/src/v7/mod.rs
View file @
aceda465
...
...
@@ -62,7 +62,9 @@ pub mod executor_params;
pub
mod
slashing
;
pub
use
async_backing
::
AsyncBackingParams
;
pub
use
executor_params
::{
ExecutorParam
,
ExecutorParamError
,
ExecutorParams
,
ExecutorParamsHash
};
pub
use
executor_params
::{
ExecutorParam
,
ExecutorParamError
,
ExecutorParams
,
ExecutorParamsHash
,
ExecutorParamsPrepHash
,
};
mod
metrics
;
pub
use
metrics
::{
...
...
polkadot/runtime/common/src/crowdloan/mod.rs
View file @
aceda465
...
...
@@ -866,7 +866,7 @@ mod tests {
use
sp_core
::
H256
;
use
std
::{
cell
::
RefCell
,
collections
::
BTreeMap
,
sync
::
Arc
};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requ
r
ied.
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requi
r
ed.
use
crate
::{
crowdloan
,
mock
::
TestRegistrar
,
...
...
polkadot/runtime/common/src/integration_tests.rs
View file @
aceda465
...
...
@@ -39,7 +39,7 @@ use primitives::{
MAX_CODE_SIZE
,
};
use
runtime_parachains
::{
configuration
,
origin
,
paras
,
shared
,
Origin
as
ParaOrigin
,
ParaLifecycle
,
configuration
,
dmp
,
origin
,
paras
,
shared
,
Origin
as
ParaOrigin
,
ParaLifecycle
,
};
use
sp_core
::
H256
;
use
sp_io
::
TestExternalities
;
...
...
@@ -84,6 +84,7 @@ frame_support::construct_runtime!(
Paras
:
paras
,
ParasShared
:
shared
,
ParachainsOrigin
:
origin
,
Dmp
:
dmp
,
// Para Onboarding Pallets
Registrar
:
paras_registrar
,
...
...
@@ -201,6 +202,8 @@ impl shared::Config for Test {
type
DisabledValidators
=
();
}
impl
dmp
::
Config
for
Test
{}
impl
origin
::
Config
for
Test
{}
parameter_types!
{
...
...
polkadot/runtime/common/src/lib.rs
View file @
aceda465
...
...
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
//! Common runtime code for Polkadot
and
Kusama.
//! Common runtime code for
the Relay Chain, e.g. Rococo, Westend,
Polkadot
,
Kusama
..
.
#![cfg_attr(not(feature
=
"std"
),
no_std)]
...
...
polkadot/runtime/common/src/paras_registrar/mod.rs
View file @
aceda465
...
...
@@ -412,7 +412,7 @@ pub mod pallet {
/// validators have reported on the validity of the code, the code will either be enacted
/// or the upgrade will be rejected. If the code will be enacted, the current code of the
/// parachain will be overwritten directly. This means that any PoV will be checked by this
/// new code. The parachain itself will not be informed explict
e
ly that the validation code
/// new code. The parachain itself will not be informed explic
i
tly that the validation code
/// has changed.
///
/// Can be called by Root, the parachain, or the parachain manager if the parachain is
...
...
polkadot/runtime/common/src/xcm_sender.rs
View file @
aceda465
...
...
@@ -119,7 +119,9 @@ where
let
config
=
configuration
::
ActiveConfig
::
<
T
>
::
get
();
let
para
=
id
.into
();
let
price
=
P
::
price_for_delivery
(
para
,
&
xcm
);
let
blob
=
W
::
wrap_version
(
&
d
,
xcm
)
.map_err
(|()|
DestinationUnsupported
)
?
.encode
();
let
versioned_xcm
=
W
::
wrap_version
(
&
d
,
xcm
)
.map_err
(|()|
DestinationUnsupported
)
?
;
versioned_xcm
.validate_xcm_nesting
()
.map_err
(|()|
ExceedsMaxMessageSize
)
?
;
let
blob
=
versioned_xcm
.encode
();
dmp
::
Pallet
::
<
T
>
::
can_queue_downward_message
(
&
config
,
&
para
,
&
blob
)
.map_err
(
Into
::
<
SendError
>
::
into
)
?
;
...
...
@@ -236,9 +238,11 @@ impl EnsureForParachain for () {
#[cfg(test)]
mod
tests
{
use
super
::
*
;
use
frame_support
::
parameter_types
;
use
crate
::
integration_tests
::
new_test_ext
;
use
frame_support
::{
assert_ok
,
parameter_types
};
use
runtime_parachains
::
FeeTracker
;
use
sp_runtime
::
FixedU128
;
use
xcm
::
MAX_XCM_DECODE_DEPTH
;
parameter_types!
{
pub
const
BaseDeliveryFee
:
u128
=
300_000_000
;
...
...
@@ -297,4 +301,40 @@ mod tests {
(
FeeAssetId
::
get
(),
result
)
.into
()
);
}
#[test]
fn
child_parachain_router_validate_nested_xcm_works
()
{
let
dest
=
Parachain
(
5555
);
type
Router
=
ChildParachainRouter
<
crate
::
integration_tests
::
Test
,
(),
NoPriceForMessageDelivery
<
ParaId
>
,
>
;
// Message that is not too deeply nested:
let
mut
good
=
Xcm
(
vec!
[
ClearOrigin
]);
for
_
in
0
..
MAX_XCM_DECODE_DEPTH
-
1
{
good
=
Xcm
(
vec!
[
SetAppendix
(
good
)]);
}
new_test_ext
()
.execute_with
(||
{
configuration
::
ActiveConfig
::
<
crate
::
integration_tests
::
Test
>
::
mutate
(|
c
|
{
c
.max_downward_message_size
=
u32
::
MAX
;
});
// Check that the good message is validated:
assert_ok!
(
<
Router
as
SendXcm
>
::
validate
(
&
mut
Some
(
dest
.into
()),
&
mut
Some
(
good
.clone
())
));
// Nesting the message one more time should reject it:
let
bad
=
Xcm
(
vec!
[
SetAppendix
(
good
)]);
assert_eq!
(
Err
(
ExceedsMaxMessageSize
),
<
Router
as
SendXcm
>
::
validate
(
&
mut
Some
(
dest
.into
()),
&
mut
Some
(
bad
))
);
});
}
}
polkadot/runtime/parachains/src/coretime/migration.rs
View file @
aceda465
...
...
@@ -222,7 +222,7 @@ mod v_coretime {
mask
:
CoreMask
::
complete
(),
assignment
:
CoreAssignment
::
Task
(
p
.into
()),
}]);
mk_coretime_call
(
crate
::
coretime
::
CoretimeCalls
::
Reserve
(
schedule
))
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
Reserve
(
schedule
))
});
let
leases
=
lease_holding
.into_iter
()
.filter_map
(|
p
|
{
...
...
@@ -243,14 +243,14 @@ mod v_coretime {
let
round_up
=
if
valid_until
%
TIME_SLICE_PERIOD
>
0
{
1
}
else
{
0
};
let
time_slice
=
valid_until
/
TIME_SLICE_PERIOD
+
TIME_SLICE_PERIOD
*
round_up
;
log
::
trace!
(
target
:
"coretime-migration"
,
"Sending of lease holding para {:?}, valid_until: {:?}, time_slice: {:?}"
,
p
,
valid_until
,
time_slice
);
Some
(
mk_coretime_call
(
crate
::
coretime
::
CoretimeCalls
::
SetLease
(
p
.into
(),
time_slice
)))
Some
(
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
SetLease
(
p
.into
(),
time_slice
)))
});
let
core_count
:
u16
=
configuration
::
ActiveConfig
::
<
T
>
::
get
()
.scheduler_params
.num_cores
.saturated_into
();
let
set_core_count
=
iter
::
once
(
mk_coretime_call
(
let
set_core_count
=
iter
::
once
(
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
NotifyCoreCount
(
core_count
),
));
...
...
@@ -261,7 +261,7 @@ mod v_coretime {
}]);
// Reserved cores will come before lease cores, so cores will change their assignments
// when coretime chain sends us their assign_core calls -> Good test.
mk_coretime_call
(
crate
::
coretime
::
CoretimeCalls
::
Reserve
(
schedule
))
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
Reserve
(
schedule
))
});
let
message_content
=
iter
::
once
(
Instruction
::
UnpaidExecution
{
...
...
polkadot/runtime/parachains/src/coretime/mod.rs
View file @
aceda465
...
...
@@ -110,6 +110,11 @@ pub mod pallet {
/// Something that provides the weight of this pallet.
type
WeightInfo
:
WeightInfo
;
type
SendXcm
:
SendXcm
;
/// Maximum weight for any XCM transact call that should be executed on the coretime chain.
///
/// Basically should be `max_weight(set_leases, reserve, notify_core_count)`.
type
MaxXcmTransactWeight
:
Get
<
Weight
>
;
}
#[pallet::event]
...
...
@@ -225,7 +230,7 @@ impl<T: Config> Pallet<T> {
weight_limit
:
WeightLimit
::
Unlimited
,
check_origin
:
None
,
},
mk_coretime_call
(
crate
::
coretime
::
CoretimeCalls
::
NotifyCoreCount
(
core_count
)),
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
NotifyCoreCount
(
core_count
)),
]);
if
let
Err
(
err
)
=
send_xcm
::
<
T
::
SendXcm
>
(
Location
::
new
(
0
,
[
Junction
::
Parachain
(
T
::
BrokerId
::
get
())]),
...
...
@@ -244,7 +249,7 @@ impl<T: Config> Pallet<T> {
weight_limit
:
WeightLimit
::
Unlimited
,
check_origin
:
None
,
},
mk_coretime_call
(
crate
::
coretime
::
CoretimeCalls
::
SwapLeases
(
one
,
other
)),
mk_coretime_call
::
<
T
>
(
crate
::
coretime
::
CoretimeCalls
::
SwapLeases
(
one
,
other
)),
]);
if
let
Err
(
err
)
=
send_xcm
::
<
T
::
SendXcm
>
(
Location
::
new
(
0
,
[
Junction
::
Parachain
(
T
::
BrokerId
::
get
())]),
...
...
@@ -261,12 +266,10 @@ impl<T: Config> OnNewSession<BlockNumberFor<T>> for Pallet<T> {
}
}
fn
mk_coretime_call
(
call
:
crate
::
coretime
::
CoretimeCalls
)
->
Instruction
<
()
>
{
fn
mk_coretime_call
<
T
:
Config
>
(
call
:
crate
::
coretime
::
CoretimeCalls
)
->
Instruction
<
()
>
{
Instruction
::
Transact
{
origin_kind
:
OriginKind
::
Superuser
,
// Largest call is set_lease with 1526 byte:
// Longest call is reserve() with 31_000_000
require_weight_at_most
:
Weight
::
from_parts
(
170_000_000
,
20_000
),
require_weight_at_most
:
T
::
MaxXcmTransactWeight
::
get
(),
call
:
BrokerRuntimePallets
::
Broker
(
call
)
.encode
()
.into
(),
}
}
polkadot/runtime/parachains/src/disputes/slashing.rs
View file @
aceda465
...
...
@@ -64,7 +64,7 @@ use sp_runtime::{
KeyTypeId
,
Perbill
,
};
use
sp_session
::{
GetSessionNumber
,
GetValidatorCount
};
use
sp_staking
::
offence
::{
DisableStrategy
,
Kind
,
Offence
,
OffenceError
,
ReportOffence
};
use
sp_staking
::
offence
::{
Kind
,
Offence
,
OffenceError
,
ReportOffence
};
use
sp_std
::{
collections
::{
btree_map
::
Entry
,
btree_set
::
BTreeSet
},
prelude
::
*
,
...
...
@@ -134,15 +134,6 @@ where
self
.time_slot
.clone
()
}
fn
disable_strategy
(
&
self
)
->
DisableStrategy
{
match
self
.kind
{
SlashingOffenceKind
::
ForInvalid
=>
DisableStrategy
::
Always
,
// in the future we might change it based on number of disputes initiated:
// <https://github.com/paritytech/polkadot/issues/5946>
SlashingOffenceKind
::
AgainstValid
=>
DisableStrategy
::
Never
,
}
}
fn
slash_fraction
(
&
self
,
_offenders
:
u32
)
->
Perbill
{
self
.slash_fraction
}
...
...
polkadot/runtime/parachains/src/inclusion/mod.rs
View file @
aceda465
...
...
@@ -245,7 +245,7 @@ pub enum AggregateMessageOrigin {
/// Identifies a UMP queue inside the `MessageQueue` pallet.
///
/// It is written in verbose form since future variants like `Here` and `Bridged` are already
/// forseeable.
/// for
e
seeable.
#[derive(Encode,
Decode,
Clone,
MaxEncodedLen,
Eq,
PartialEq,
RuntimeDebug,
TypeInfo)]
pub
enum
UmpQueueId
{
/// The message originated from this parachain.
...
...
polkadot/runtime/parachains/src/mock.rs
View file @
aceda465
...
...
@@ -387,6 +387,7 @@ impl assigner_coretime::Config for Test {}
parameter_types!
{
pub
const
BrokerId
:
u32
=
10u32
;
pub
MaxXcmTransactWeight
:
Weight
=
Weight
::
from_parts
(
10_000_000
,
10_000
);
}
impl
coretime
::
Config
for
Test
{
...
...
@@ -396,6 +397,7 @@ impl coretime::Config for Test {
type
BrokerId
=
BrokerId
;
type
WeightInfo
=
crate
::
coretime
::
TestWeightInfo
;
type
SendXcm
=
DummyXcmSender
;
type
MaxXcmTransactWeight
=
MaxXcmTransactWeight
;
}
pub
struct
DummyXcmSender
;
...
...
polkadot/runtime/parachains/src/paras/mod.rs
View file @
aceda465
...
...
@@ -641,7 +641,7 @@ pub mod pallet {
///
/// This is only used at genesis or by root.
///
/// TODO: Remove once coretime is the standard ac
c
ross all chains.
/// TODO: Remove once coretime is the standard across all chains.
type
AssignCoretime
:
AssignCoretime
;
}
...
...
polkadot/runtime/parachains/src/paras_inherent/mod.rs
View file @
aceda465
...
...
@@ -1099,7 +1099,7 @@ fn limit_and_sanitize_disputes<
}
// Helper function for filtering candidates which don't pass the given predicate. When/if the first
// candidate which faile
s
the predicate is found, all the other candidates that follow are dropped.
// candidate which faile
d
the predicate is found, all the other candidates that follow are dropped.
fn
retain_candidates
<
T
:
inclusion
::
Config
+
paras
::
Config
+
inclusion
::
Config
,
F
:
FnMut
(
ParaId
,
&
mut
C
)
->
bool
,
...
...
polkadot/runtime/rococo/build.rs
View file @
aceda465
...
...
@@ -16,18 +16,11 @@
#[cfg(feature
=
"std"
)]
fn
main
()
{
substrate_wasm_builder
::
WasmBuilder
::
new
()
.with_current_project
()
.import_memory
()
.export_heap_base
()
.build
();
substrate_wasm_builder
::
WasmBuilder
::
build_using_defaults
();
substrate_wasm_builder
::
WasmBuilder
::
new
()
.with_current_project
()
substrate_wasm_builder
::
WasmBuilder
::
init_with_defaults
()
.set_file_name
(
"fast_runtime_binary.rs"
)
.enable_feature
(
"fast-runtime"
)
.import_memory
()
.export_heap_base
()
.build
();
}
...
...
polkadot/runtime/rococo/src/impls.rs
View file @
aceda465
...
...
@@ -167,16 +167,11 @@ where
},
]);
let
encoded_versioned_xcm
=
VersionedXcm
::
V4
(
program
)
.encode
()
.try_into
()
.map_err
(|
error
|
{
log
::
error!
(
target
:
"runtime::on_reap_identity"
,
"XCM too large, error: {:?}"
,
error
);
pallet_xcm
::
Error
::
<
Runtime
>
::
XcmTooLarge
})
?
;
// send
let
_
=
<
pallet_xcm
::
Pallet
<
Runtime
>>
::
send
_blob
(
let
_
=
<
pallet_xcm
::
Pallet
<
Runtime
>>
::
send
(
RawOrigin
::
Root
.into
(),
Box
::
new
(
VersionedLocation
::
V4
(
destination
)),
encoded_versioned_xcm
,
Box
::
new
(
VersionedXcm
::
V4
(
program
))
,
)
?
;
Ok
(())
}
...
...
polkadot/runtime/rococo/src/lib.rs
View file @
aceda465
...
...
@@ -1058,6 +1058,7 @@ impl parachains_scheduler::Config for Runtime {
parameter_types!
{
pub
const
BrokerId
:
u32
=
BROKER_ID
;
pub
MaxXcmTransactWeight
:
Weight
=
Weight
::
from_parts
(
200_000_000
,
20_000
);
}
impl
coretime
::
Config
for
Runtime
{
...
...
@@ -1067,6 +1068,7 @@ impl coretime::Config for Runtime {
type
BrokerId
=
BrokerId
;
type
WeightInfo
=
weights
::
runtime_parachains_coretime
::
WeightInfo
<
Runtime
>
;
type
SendXcm
=
crate
::
xcm_config
::
XcmRouter
;
type
MaxXcmTransactWeight
=
MaxXcmTransactWeight
;
}
parameter_types!
{
...
...
polkadot/runtime/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("rococo-dev")`, DB CACHE: 1024
// Executed Command:
...
...
@@ -60,26 +60,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `3645`
// Minimum execution time: 24_724_000 picoseconds.
Weight
::
from_parts
(
25_615_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3645
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
}
/// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0)
/// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `XcmPallet::SupportedVersion` (r:1 w:0)
/// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1)
/// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1)
/// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn
send_blob
()
->
Weight
{
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `3645`
// Minimum execution time: 24_709_000 picoseconds.
Weight
::
from_parts
(
25_326_000
,
0
)
// Minimum execution time: 25_043_000 picoseconds.
Weight
::
from_parts
(
25_682_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3645
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -98,8 +80,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `3645`
// Minimum execution time: 10
6_60
0_000 picoseconds.
Weight
::
from_parts
(
1
10_
78
1
_000
,
0
)
// Minimum execution time: 10
7_57
0_000 picoseconds.
Weight
::
from_parts
(
1
09_8
78_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3645
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -118,8 +100,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `232`
// Estimated: `3697`
// Minimum execution time: 10
3_030
_000 picoseconds.
Weight
::
from_parts
(
10
6_018
_000
,
0
)
// Minimum execution time: 10
6_341
_000 picoseconds.
Weight
::
from_parts
(
10
9_135
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3697
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -138,8 +120,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `3645`
// Minimum execution time: 10
7_017
_000 picoseconds.
Weight
::
from_parts
(
1
09_214
_000
,
0
)
// Minimum execution time: 10
8_372
_000 picoseconds.
Weight
::
from_parts
(
1
12_890
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3645
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -148,16 +130,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 6_864_000 picoseconds.
Weight
::
from_parts
(
7_135_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: 6_955_000 picoseconds.
Weight
::
from_parts
(
7_165_000
,
0
)
// Minimum execution time: 6_957_000 picoseconds.
Weight
::
from_parts
(
7_417_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `XcmPallet::SupportedVersion` (r:0 w:1)
...
...
@@ -166,8 +140,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time:
6_827
_000 picoseconds.
Weight
::
from_parts
(
7_
211
_000
,
0
)
// Minimum execution time:
7_053
_000 picoseconds.
Weight
::
from_parts
(
7_
462
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -175,8 +149,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_
78
8_000 picoseconds.
Weight
::
from_parts
(
2_0
21
_000
,
0
)
// Minimum execution time: 1_
91
8_000 picoseconds.
Weight
::
from_parts
(
2_0
37
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
}
/// Storage: `XcmPallet::VersionNotifiers` (r:1 w:1)
...
...
@@ -197,8 +171,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `180`
// Estimated: `3645`
// Minimum execution time: 30_
62
7_000 picoseconds.
Weight
::
from_parts
(
31_
350
_000
,
0
)
// Minimum execution time: 30_
41
7_000 picoseconds.
Weight
::
from_parts
(
31_
191
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3645
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
5
))
...
...
@@ -219,8 +193,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `360`
// Estimated: `3825`
// Minimum execution time: 36_6
88
_000 picoseconds.
Weight
::
from_parts
(
37_
345
_000
,
0
)
// Minimum execution time: 36_6
66
_000 picoseconds.
Weight
::
from_parts
(
37_
779
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3825
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -231,8 +205,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
2
9_000 picoseconds.
Weight
::
from_parts
(
1_986
_000
,
0
)
// Minimum execution time: 1_8
6
9_000 picoseconds.
Weight
::
from_parts
(
2_003
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
0
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
}
...
...
@@ -242,8 +216,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `22`
// Estimated: `13387`
// Minimum execution time: 16_1
04
_000 picoseconds.
Weight
::
from_parts
(
16_4
64
_000
,
0
)
// Minimum execution time: 16_1
88
_000 picoseconds.
Weight
::
from_parts
(
16_4
35
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13387
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -254,8 +228,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `26`
// Estimated: `13391`
// Minimum execution time: 16_
267
_000 picoseconds.
Weight
::
from_parts
(
16_
67
5_000
,
0
)
// Minimum execution time: 16_
431
_000 picoseconds.
Weight
::
from_parts
(
16_
93
5_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13391
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -266,8 +240,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `40`
// Estimated: `15880`
// Minimum execution time: 18_4
87
_000 picoseconds.
Weight
::
from_parts
(
1
9_102
_000
,
0
)
// Minimum execution time: 18_4
60
_000 picoseconds.
Weight
::
from_parts
(
1
8_885
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
15880
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
}
...
...
@@ -285,8 +259,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `216`
// Estimated: `6156`
// Minimum execution time: 29_6
0
3_000 picoseconds.
Weight
::
from_parts
(
3
1_002
_000
,
0
)
// Minimum execution time: 29_6
2
3_000 picoseconds.
Weight
::
from_parts
(
3
0_661
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
6156
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
6
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
3
))
...
...
@@ -297,8 +271,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `69`
// Estimated: `10959`
// Minimum execution time: 12_
18
3_000 picoseconds.
Weight
::
from_parts
(
12_
587
_000
,
0
)
// Minimum execution time: 12_
04
3_000 picoseconds.
Weight
::
from_parts
(
12_
360
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
10959
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
4
))
}
...
...
@@ -308,8 +282,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `33`
// Estimated: `13398`
// Minimum execution time: 16_
372
_000 picoseconds.
Weight
::
from_parts
(
1
6_967
_000
,
0
)
// Minimum execution time: 16_
511
_000 picoseconds.
Weight
::
from_parts
(
1
7_011
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13398
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
5
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -328,8 +302,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `216`
// Estimated: `13581`
// Minimum execution time: 3
8_
904_000 picoseconds.
Weight
::
from_parts
(
39_
9
83_000
,
0
)
// Minimum execution time: 39
_
04
1
_000 picoseconds.
Weight
::
from_parts
(
39_
8
83_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
13581
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
9
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
4
))
...
...
@@ -342,8 +316,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `1485`
// Minimum execution time: 2_0
67
_000 picoseconds.
Weight
::
from_parts
(
2_1
9
5_000
,
0
)
// Minimum execution time: 2_0
30
_000 picoseconds.
Weight
::
from_parts
(
2_15
0
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
1485
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
2
))
...
...
@@ -354,8 +328,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `7576`
// Estimated: `11041`
// Minimum execution time: 2
3_982
_000 picoseconds.
Weight
::
from_parts
(
2
4_409
_000
,
0
)
// Minimum execution time: 2
2_615
_000 picoseconds.
Weight
::
from_parts
(
2
3_008
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
11041
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
@@ -366,8 +340,8 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `23`
// Estimated: `3488`
// Minimum execution time: 3
3
_43
0
_000 picoseconds.
Weight
::
from_parts
(
3
4_433
_000
,
0
)
// Minimum execution time: 3
4
_43
8
_000 picoseconds.
Weight
::
from_parts
(
3
5_514
_000
,
0
)
.saturating_add
(
Weight
::
from_parts
(
0
,
3488
))
.saturating_add
(
T
::
DbWeight
::
get
()
.reads
(
1
))
.saturating_add
(
T
::
DbWeight
::
get
()
.writes
(
1
))
...
...
polkadot/runtime/test-runtime/Cargo.toml
View file @
aceda465
...
...
@@ -11,14 +11,10 @@ license.workspace = true
workspace
=
true
[dependencies]
bitvec
=
{
version
=
"1.0.0"
,
default-features
=
false
,
features
=
[
"alloc"
]
}
parity-scale-codec
=
{
version
=
"3.6.1"
,
default-features
=
false
,
features
=
[
"derive"
]
}
log
=
{
workspace
=
true
}
rustc-hex
=
{
version
=
"2.1.0"
,
default-features
=
false
}
scale-info
=
{
version
=
"2.11.1"
,
default-features
=
false
,
features
=
[
"derive"
]
}
serde
=
{
workspace
=
true
}
serde_derive
=
{
optional
=
true
,
workspace
=
true
}
smallvec
=
"1.8.0"
authority-discovery-primitives
=
{
package
=
"sp-authority-discovery"
,
path
=
"../../../substrate/primitives/authority-discovery"
,
default-features
=
false
}
babe-primitives
=
{
package
=
"sp-consensus-babe"
,
path
=
"../../../substrate/primitives/consensus/babe"
,
default-features
=
false
}
...
...
@@ -63,7 +59,6 @@ pallet-vesting = { path = "../../../substrate/frame/vesting", default-features =
runtime-common
=
{
package
=
"polkadot-runtime-common"
,
path
=
"../common"
,
default-features
=
false
}
primitives
=
{
package
=
"polkadot-primitives"
,
path
=
"../../primitives"
,
default-features
=
false
}
pallet-xcm
=
{
path
=
"../../xcm/pallet-xcm"
,
default-features
=
false
}
polkadot-parachain-primitives
=
{
path
=
"../../parachain"
,
default-features
=
false
}
polkadot-runtime-parachains
=
{
path
=
"../parachains"
,
default-features
=
false
}
xcm-builder
=
{
package
=
"staging-xcm-builder"
,
path
=
"../../xcm/xcm-builder"
,
default-features
=
false
}
xcm-executor
=
{
package
=
"staging-xcm-executor"
,
path
=
"../../xcm/xcm-executor"
,
default-features
=
false
}
...
...
@@ -92,7 +87,6 @@ std = [
"authority-discovery-primitives/std"
,
"babe-primitives/std"
,
"beefy-primitives/std"
,
"bitvec/std"
,
"block-builder-api/std"
,
"frame-election-provider-support/std"
,
"frame-executive/std"
,
...
...
@@ -118,14 +112,11 @@ std = [
"pallet-vesting/std"
,
"pallet-xcm/std"
,
"parity-scale-codec/std"
,
"polkadot-parachain-primitives/std"
,
"polkadot-runtime-parachains/std"
,
"primitives/std"
,
"runtime-common/std"
,
"rustc-hex/std"
,
"scale-info/std"
,
"serde/std"
,
"serde_derive"
,
"sp-api/std"
,
"sp-core/std"
,
"sp-genesis-builder/std"
,
...
...
@@ -157,7 +148,6 @@ runtime-benchmarks = [
"pallet-timestamp/runtime-benchmarks"
,
"pallet-vesting/runtime-benchmarks"
,
"pallet-xcm/runtime-benchmarks"
,
"polkadot-parachain-primitives/runtime-benchmarks"
,
"polkadot-runtime-parachains/runtime-benchmarks"
,
"primitives/runtime-benchmarks"
,
"runtime-common/runtime-benchmarks"
,
...
...
polkadot/runtime/test-runtime/build.rs
View file @
aceda465
...
...
@@ -17,9 +17,5 @@
use
substrate_wasm_builder
::
WasmBuilder
;
fn
main
()
{
WasmBuilder
::
new
()
.with_current_project
()
.import_memory
()
.export_heap_base
()
.build
()
WasmBuilder
::
build_using_defaults
();
}
polkadot/runtime/test-runtime/constants/Cargo.toml
View file @
aceda465
...
...
@@ -14,18 +14,12 @@ smallvec = "1.8.0"
frame-support
=
{
path
=
"../../../../substrate/frame/support"
,
default-features
=
false
}
primitives
=
{
package
=
"polkadot-primitives"
,
path
=
"../../../primitives"
,
default-features
=
false
}
runtime-common
=
{
package
=
"polkadot-runtime-common"
,
path
=
"../../common"
,
default-features
=
false
}
sp-runtime
=
{
path
=
"../../../../substrate/primitives/runtime"
,
default-features
=
false
}
sp-weights
=
{
path
=
"../../../../substrate/primitives/weights"
,
default-features
=
false
}
sp-core
=
{
path
=
"../../../../substrate/primitives/core"
,
default-features
=
false
}
[features]
default
=
[
"std"
]
std
=
[
"frame-support/std"
,
"primitives/std"
,
"runtime-common/std"
,
"sp-core/std"
,
"sp-runtime/std"
,
"sp-weights/std"
,
]
Prev
1
…
6
7
8
9
10
11
12
13
14
…
17
Next