Skip to content

Commit 0914995

Browse files
authored
Merge pull request #295 from paritytech/upgrade-polkadot-stable2503
2 parents bea63d7 + c58ca1a commit 0914995

File tree

77 files changed

+4455
-4045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+4455
-4045
lines changed

Cargo.lock

+1,955-2,029
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+95-94
Large diffs are not rendered by default.

node/src/command.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ pub fn run() -> Result<()> {
378378
testnet_runtime::RuntimeApi,
379379
TestnetRuntimeExecutor,
380380
sc_network::NetworkWorker<_, _>
381-
>(config, polkadot_config, collator_options, id, hwbench)
381+
>(config, polkadot_config, collator_options, id, hwbench, cli.run.experimental_max_pov_percentage)
382382
.await
383383
.map(|r| r.0)
384384
.map_err(Into::into)
@@ -391,7 +391,7 @@ pub fn run() -> Result<()> {
391391
mainnet_runtime::RuntimeApi,
392392
MainnetRuntimeExecutor,
393393
sc_network::NetworkWorker<_, _>
394-
>(config, polkadot_config, collator_options, id, hwbench)
394+
>(config, polkadot_config, collator_options, id, hwbench, cli.run.experimental_max_pov_percentage)
395395
.await
396396
.map(|r| r.0)
397397
.map_err(Into::into)

node/src/service.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ async fn start_node_impl<RuntimeApi, Executor, BIQ, SC, Net>(
211211
build_import_queue: BIQ,
212212
start_consensus: SC,
213213
hwbench: Option<sc_sysinfo::HwBench>,
214+
max_pov_percentage: Option<u32>,
214215
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
215216
where
216217
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
@@ -253,6 +254,7 @@ where
253254
CollatorPair,
254255
OverseerHandle,
255256
Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
257+
Option<u32>,
256258
) -> Result<(), sc_service::Error>,
257259
Net: NetworkBackend<Block, Hash>,
258260
{
@@ -286,7 +288,7 @@ where
286288
let transaction_pool = params.transaction_pool.clone();
287289
let import_queue_service = params.import_queue.service();
288290

289-
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
291+
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
290292
build_network(BuildNetworkParams {
291293
parachain_config: &parachain_config,
292294
net_config,
@@ -419,11 +421,10 @@ where
419421
collator_key.expect("Command line arguments do not allow this. qed"),
420422
overseer_handle,
421423
announce_block,
424+
max_pov_percentage,
422425
)?;
423426
}
424427

425-
start_network.start_network();
426-
427428
Ok((task_manager, client))
428429
}
429430

@@ -485,6 +486,7 @@ fn start_consensus<RuntimeApi>(
485486
collator_key: CollatorPair,
486487
overseer_handle: OverseerHandle,
487488
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
489+
max_pov_percentage: Option<u32>,
488490
) -> Result<(), sc_service::Error>
489491
where
490492
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
@@ -539,6 +541,7 @@ where
539541
collator_service,
540542
authoring_duration: Duration::from_millis(2000),
541543
reinitialize: false,
544+
max_pov_percentage,
542545
};
543546

544547
let fut = aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(
@@ -556,6 +559,7 @@ pub async fn start_parachain_node<RuntimeApi, Executor, Net: NetworkBackend<Bloc
556559
collator_options: CollatorOptions,
557560
para_id: ParaId,
558561
hwbench: Option<sc_sysinfo::HwBench>,
562+
max_pov_percentage: Option<u32>,
559563
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
560564
where
561565
Executor: NativeExecutionDispatch + 'static,
@@ -580,6 +584,7 @@ where
580584
build_import_queue::<RuntimeApi>,
581585
start_consensus::<RuntimeApi>,
582586
hwbench,
587+
max_pov_percentage,
583588
)
584589
.await
585590
}

pallets/dmarket/src/types.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::Config;
22
use frame_support::traits::fungible::Inspect;
3-
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
3+
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
44
use scale_info::TypeInfo;
55

66
pub type BalanceOf<T> =
@@ -9,7 +9,7 @@ pub type BalanceOf<T> =
99
pub type Item = u128;
1010
pub type Domain = [u8; 8];
1111

12-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
12+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
1313
pub struct TradeParams<Amount, ItemId, Expiration> {
1414
pub price: Amount,
1515
pub fee: Amount,
@@ -24,7 +24,7 @@ pub type TradeParamsOf<T> = TradeParams<
2424
<T as pallet_timestamp::Config>::Moment,
2525
>;
2626

27-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
27+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
2828
pub struct TradeSignatures<OffchainSignature> {
2929
pub ask_signature: OffchainSignature,
3030
pub bid_signature: OffchainSignature,

pallets/marketplace/src/types.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use frame_support::{pallet_prelude::DispatchResult, traits::fungible::Inspect};
2-
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
2+
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
33
use scale_info::TypeInfo;
44
use sp_std::vec::Vec;
55

@@ -43,7 +43,7 @@ pub struct Bid<AccountId, Amount, Expiration> {
4343
pub fee: Amount,
4444
}
4545

46-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
46+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
4747
pub enum OrderType {
4848
Ask,
4949
Bid,
@@ -55,7 +55,7 @@ pub enum ExecOrder<AccountId, Amount, Expiration, Agent> {
5555
Bid(Bid<AccountId, Amount, Expiration>),
5656
}
5757

58-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
58+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
5959
pub struct Order<CollectionId, ItemId, Amount, Expiration, OffchainSignature, Agent, BoundedString>
6060
{
6161
pub order_type: OrderType,
@@ -68,7 +68,7 @@ pub struct Order<CollectionId, ItemId, Amount, Expiration, OffchainSignature, Ag
6868
pub signature_data: SignatureData<OffchainSignature, BoundedString>,
6969
}
7070

71-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
71+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
7272
pub struct SignatureData<OffchainSignature, BoundedString> {
7373
pub signature: OffchainSignature,
7474
pub nonce: BoundedString,
@@ -105,7 +105,7 @@ impl<CollectionId, ItemId, Amount, Expiration, OffchainSignature, Agent, Bounded
105105
}
106106
}
107107

108-
#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
108+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
109109
pub enum Execution {
110110
/// The order must be executed otherwise it should fail
111111
Force,

pallets/multibatching/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ pub mod pallet {
9494
}
9595

9696
/// A call in a batch.
97-
#[derive(Clone, Encode, Decode, PartialEq, Eq, TypeInfo, MaxEncodedLen)]
97+
#[derive(
98+
Clone, Encode, Decode, DecodeWithMemTracking, PartialEq, Eq, TypeInfo, MaxEncodedLen,
99+
)]
98100
#[scale_info(skip_type_params(T))]
99101
pub struct BatchedCall<T: Config> {
100102
/// The public key that will be the origin of this call.
@@ -114,7 +116,7 @@ pub mod pallet {
114116
}
115117

116118
/// A signature of a batch by one of its participants.
117-
#[derive(Clone, Encode, Decode, PartialEq, TypeInfo, MaxEncodedLen)]
119+
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, PartialEq, TypeInfo, MaxEncodedLen)]
118120
#[scale_info(skip_type_params(T))]
119121
pub struct Approval<T: Config> {
120122
pub from: T::Signer,

pallets/myth-proxy/src/mock.rs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl pallet_balances::Config for Test {
4141
PartialOrd,
4242
Encode,
4343
Decode,
44+
DecodeWithMemTracking,
4445
RuntimeDebug,
4546
MaxEncodedLen,
4647
scale_info::TypeInfo,

0 commit comments

Comments
 (0)