Skip to content

Upgrade polkadot stable2503 #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3510baf
Hitting deadline
alexggh Mar 20, 2025
5164f7c
Squeze even more transactions into the block
alexggh Mar 21, 2025
06bd8e6
Add optimization from polkadot-sdk
alexggh Mar 21, 2025
f4cacc1
Regenerated weights
alexggh Mar 21, 2025
66d38d1
Update lib.rs
alexggh Mar 24, 2025
ad83219
Update lib.rs
alexggh Mar 24, 2025
6518487
Revert "Regenerated weights"
alexggh Apr 4, 2025
d103b71
Merge remote-tracking branch 'origin/main' into alexggh/main2
alexggh Apr 4, 2025
f9d1499
remove production profile
alexggh Apr 4, 2025
ac2b12a
Adjust per read/write costs
alexggh Apr 3, 2025
e4a7cc4
Add a few more comments
alexggh Apr 4, 2025
fd1f099
Update runtime/common/src/lib.rs
alexggh Apr 4, 2025
17190a5
Upgrade to polkadot-stable2503-rc1
Moliholy Apr 7, 2025
6c3985b
Add max pov percentage to node
Moliholy Apr 7, 2025
2dd10e5
Merge remote-tracking branch 'origin/alexggh/main' into upgrade-polka…
Moliholy Apr 7, 2025
6bf1d95
Increase mainnet spec version
Moliholy Apr 7, 2025
d73bd53
Add WeightReclaim pallet to benchmarks
Moliholy Apr 7, 2025
679a25f
Add the bounties pallet
Moliholy Apr 7, 2025
bb72188
Add the identity pallet
Moliholy Apr 7, 2025
d5271b6
Increase binary versions
Moliholy Apr 7, 2025
abd347a
Do not use text output in zombienet
Moliholy Apr 7, 2025
5d99ce6
Improve zombienet script
Moliholy Apr 7, 2025
0f02ed4
Link Treasury and Bounties
Moliholy Apr 7, 2025
f5a2d25
Fix bounties benchmarks
Moliholy Apr 7, 2025
1275828
Fix identity authority origin
Moliholy Apr 7, 2025
9021b36
Upgrade to polkadot-stable2503-rc2
Moliholy Apr 8, 2025
952afdf
Add weights for testnet
Moliholy Apr 8, 2025
97639ad
Upgrade to polkadot-stable2503
Moliholy Apr 8, 2025
85f3064
Use the v1.3.0 version of pallet-collator-staking
Moliholy Apr 8, 2025
0c18b98
Add mainnet weights
Moliholy Apr 8, 2025
091d195
Improve pallet-identity configuration
Moliholy Apr 8, 2025
61838ac
Tweat parameters for new pallets
Moliholy Apr 8, 2025
8f94bff
Make 2/3 council greather than or equal
Moliholy Apr 8, 2025
f362731
Remove pallet-identity
Moliholy Apr 8, 2025
0309209
Remove pallet-bounties
Moliholy Apr 8, 2025
3ed3369
Simplify pallet naming
Moliholy Apr 9, 2025
c58ca1a
Add rocksdb mainnet weights
Moliholy Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,984 changes: 1,955 additions & 2,029 deletions Cargo.lock

Large diffs are not rendered by default.

189 changes: 95 additions & 94 deletions Cargo.toml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ pub fn run() -> Result<()> {
testnet_runtime::RuntimeApi,
TestnetRuntimeExecutor,
sc_network::NetworkWorker<_, _>
>(config, polkadot_config, collator_options, id, hwbench)
>(config, polkadot_config, collator_options, id, hwbench, cli.run.experimental_max_pov_percentage)
.await
.map(|r| r.0)
.map_err(Into::into)
Expand All @@ -391,7 +391,7 @@ pub fn run() -> Result<()> {
mainnet_runtime::RuntimeApi,
MainnetRuntimeExecutor,
sc_network::NetworkWorker<_, _>
>(config, polkadot_config, collator_options, id, hwbench)
>(config, polkadot_config, collator_options, id, hwbench, cli.run.experimental_max_pov_percentage)
.await
.map(|r| r.0)
.map_err(Into::into)
Expand Down
11 changes: 8 additions & 3 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ async fn start_node_impl<RuntimeApi, Executor, BIQ, SC, Net>(
build_import_queue: BIQ,
start_consensus: SC,
hwbench: Option<sc_sysinfo::HwBench>,
max_pov_percentage: Option<u32>,
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
where
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
Expand Down Expand Up @@ -253,6 +254,7 @@ where
CollatorPair,
OverseerHandle,
Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
Option<u32>,
) -> Result<(), sc_service::Error>,
Net: NetworkBackend<Block, Hash>,
{
Expand Down Expand Up @@ -286,7 +288,7 @@ where
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();

let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
build_network(BuildNetworkParams {
parachain_config: &parachain_config,
net_config,
Expand Down Expand Up @@ -419,11 +421,10 @@ where
collator_key.expect("Command line arguments do not allow this. qed"),
overseer_handle,
announce_block,
max_pov_percentage,
)?;
}

start_network.start_network();

Ok((task_manager, client))
}

Expand Down Expand Up @@ -485,6 +486,7 @@ fn start_consensus<RuntimeApi>(
collator_key: CollatorPair,
overseer_handle: OverseerHandle,
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
max_pov_percentage: Option<u32>,
) -> Result<(), sc_service::Error>
where
RuntimeApi: ConstructRuntimeApi<Block, ParachainClient<RuntimeApi>> + Send + Sync + 'static,
Expand Down Expand Up @@ -539,6 +541,7 @@ where
collator_service,
authoring_duration: Duration::from_millis(2000),
reinitialize: false,
max_pov_percentage,
};

let fut = aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(
Expand All @@ -556,6 +559,7 @@ pub async fn start_parachain_node<RuntimeApi, Executor, Net: NetworkBackend<Bloc
collator_options: CollatorOptions,
para_id: ParaId,
hwbench: Option<sc_sysinfo::HwBench>,
max_pov_percentage: Option<u32>,
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
where
Executor: NativeExecutionDispatch + 'static,
Expand All @@ -580,6 +584,7 @@ where
build_import_queue::<RuntimeApi>,
start_consensus::<RuntimeApi>,
hwbench,
max_pov_percentage,
)
.await
}
6 changes: 3 additions & 3 deletions pallets/dmarket/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::Config;
use frame_support::traits::fungible::Inspect;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;

pub type BalanceOf<T> =
Expand All @@ -9,7 +9,7 @@ pub type BalanceOf<T> =
pub type Item = u128;
pub type Domain = [u8; 8];

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

#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
pub struct TradeSignatures<OffchainSignature> {
pub ask_signature: OffchainSignature,
pub bid_signature: OffchainSignature,
Expand Down
10 changes: 5 additions & 5 deletions pallets/marketplace/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use frame_support::{pallet_prelude::DispatchResult, traits::fungible::Inspect};
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_std::vec::Vec;

Expand Down Expand Up @@ -43,7 +43,7 @@ pub struct Bid<AccountId, Amount, Expiration> {
pub fee: Amount,
}

#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
pub enum OrderType {
Ask,
Bid,
Expand All @@ -55,7 +55,7 @@ pub enum ExecOrder<AccountId, Amount, Expiration, Agent> {
Bid(Bid<AccountId, Amount, Expiration>),
}

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

#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
pub struct SignatureData<OffchainSignature, BoundedString> {
pub signature: OffchainSignature,
pub nonce: BoundedString,
Expand Down Expand Up @@ -105,7 +105,7 @@ impl<CollectionId, ItemId, Amount, Expiration, OffchainSignature, Agent, Bounded
}
}

#[derive(Clone, Encode, Decode, Debug, Eq, PartialEq, TypeInfo)]
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, Debug, Eq, PartialEq, TypeInfo)]
pub enum Execution {
/// The order must be executed otherwise it should fail
Force,
Expand Down
6 changes: 4 additions & 2 deletions pallets/multibatching/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ pub mod pallet {
}

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

/// A signature of a batch by one of its participants.
#[derive(Clone, Encode, Decode, PartialEq, TypeInfo, MaxEncodedLen)]
#[derive(Clone, Encode, Decode, DecodeWithMemTracking, PartialEq, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(T))]
pub struct Approval<T: Config> {
pub from: T::Signer,
Expand Down
1 change: 1 addition & 0 deletions pallets/myth-proxy/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl pallet_balances::Config for Test {
PartialOrd,
Encode,
Decode,
DecodeWithMemTracking,
RuntimeDebug,
MaxEncodedLen,
scale_info::TypeInfo,
Expand Down
Loading