Skip to content

Commit

Permalink
* Uptdated dependencies to polkadot v1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DidacSF committed Jun 3, 2024
1 parent 82bb057 commit 21cc712
Show file tree
Hide file tree
Showing 9 changed files with 1,654 additions and 1,134 deletions.
2,465 changes: 1,489 additions & 976 deletions Cargo.lock

Large diffs are not rendered by default.

246 changes: 123 additions & 123 deletions Cargo.toml

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions node/src/fake_runtime_api/aura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
//! These are used to provide a type that implements these runtime APIs without requiring to import
//! the native runtimes.
use frame_support::weights::Weight;
use bajun_runtime::RuntimeGenesisConfig;
use frame_support::{
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
};
use parachains_common::{AccountId, AuraId, Balance, Nonce};
use polkadot_primitives::Block;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
Expand Down Expand Up @@ -189,12 +193,16 @@ sp_api::impl_runtime_apis! {
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
unimplemented!()
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}

fn build_config(_: Vec<u8>) -> sp_genesis_builder::Result {
unimplemented!()
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, |_| None)
}

fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
Default::default()
}
}
}
4 changes: 3 additions & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ where
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
let net_config = FullNetworkConfiguration::new(&parachain_config.network);
let net_config = FullNetworkConfiguration::<_, _, sc_network::NetworkWorker<Block, Hash>>::new(
&parachain_config.network,
);

let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
build_network(BuildNetworkParams {
Expand Down
14 changes: 9 additions & 5 deletions runtime/bajun/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use sp_version::RuntimeVersion;
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config},
genesis_builder_helper::{build_state, get_preset},
migrations::{FailedMigrationHandler, FailedMigrationHandling, MigrationStatusHandler},
pallet_prelude::ConstU32,
parameter_types,
Expand Down Expand Up @@ -1257,12 +1257,16 @@ impl_runtime_apis! {
}

impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}

fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, |_| None)
}

fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
Default::default()
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions runtime/bajun/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,18 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
.saturating_add(Weight::from_parts(0, 1501))
.saturating_add(T::DbWeight::get().reads(1))
}
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 30_151_000 picoseconds.
Weight::from_parts(30_968_000, 0)
}
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 20_055_000 picoseconds.
Weight::from_parts(20_711_000, 0)
}
}
22 changes: 0 additions & 22 deletions runtime/bajun/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,26 +393,4 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn execute_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 37_251_000 picoseconds.
Weight::from_parts(38_075_000, 0)
.saturating_add(Weight::from_parts(0, 3625))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn send_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `160`
// Estimated: `3625`
// Minimum execution time: 37_251_000 picoseconds.
Weight::from_parts(38_075_000, 0)
.saturating_add(Weight::from_parts(0, 3625))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
}
3 changes: 2 additions & 1 deletion runtime/bajun/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ impl staging_xcm_executor::Config for XcmConfig {
type HrmpNewChannelOpenRequestHandler = ();
type HrmpChannelAcceptedHandler = ();
type HrmpChannelClosingHandler = ();
type XcmRecorder = ();
}

// Converts a Signed Local Origin into a Location
Expand Down Expand Up @@ -427,7 +428,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
type ControllerOrigin = EnsureRoot<AccountId>;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight<Runtime>;
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
type PriceForSiblingDelivery = NoPriceForMessageDelivery<ParaId>;
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.74.1"
channel = "1.78.0"
components = [ "clippy", "rustfmt", "rust-src" ]
profile = "minimal"
targets = [ "wasm32-unknown-unknown" ]

0 comments on commit 21cc712

Please sign in to comment.