Skip to content

Commit

Permalink
Ws-port argument has been repalced with rpc-port (paritytech#2140)
Browse files Browse the repository at this point in the history
* ws-port argument has been repalced with rpc-port

* fixed paras pallet weight and expose unsigned validation

* add bootnodes to RialtoParachain collators

* another bump + increase block proposal time

* revert RUST_LOG=trace for test network nodes
  • Loading branch information
svyatonik authored and serban300 committed Apr 8, 2024
1 parent ef7d5a9 commit 8535030
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bridges/bin/rialto-parachain/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ pub async fn start_node(
keystore,
force_authoring,
slot_duration,
// We got around 500ms for proposing
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
// We got around 1000ms for proposing
block_proposal_slot_portion: SlotProportion::new(1f32 / 12f32),
telemetry,
max_block_proposal_slot_portion: None,
},
Expand Down
2 changes: 1 addition & 1 deletion bridges/bin/rialto/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ construct_runtime!(
Inclusion: polkadot_runtime_parachains::inclusion::{Pallet, Call, Storage, Event<T>},
ParasInherent: polkadot_runtime_parachains::paras_inherent::{Pallet, Call, Storage, Inherent},
Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage},
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config},
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned},
Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage},
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage},
Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event},
Expand Down
50 changes: 48 additions & 2 deletions bridges/bin/rialto/runtime/src/parachains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic,
};

use frame_support::{parameter_types, traits::KeyOwnerProofSystem};
use frame_support::{parameter_types, traits::KeyOwnerProofSystem, weights::Weight};
use frame_system::EnsureRoot;
use polkadot_primitives::v4::{ValidatorId, ValidatorIndex};
use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots};
Expand Down Expand Up @@ -106,11 +106,57 @@ parameter_types! {

impl parachains_paras::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = parachains_paras::TestWeightInfo;
type WeightInfo = ParasWeightInfo;
type UnsignedPriority = ParasUnsignedPriority;
type NextSessionRotation = Babe;
}

/// Test weight for the `Paras` pallet.
///
/// We can't use `parachains_paras::TestWeightInfo` anymore, because it returns `Weight::MAX`
/// where we need some real-world weights. We'll use zero weights here, though to avoid
/// adding benchmarks to Rialto runtime.
pub struct ParasWeightInfo;

impl parachains_paras::WeightInfo for ParasWeightInfo {
fn force_set_current_code(_c: u32) -> Weight {
Weight::zero()
}
fn force_set_current_head(_s: u32) -> Weight {
Weight::zero()
}
fn force_schedule_code_upgrade(_c: u32) -> Weight {
Weight::zero()
}
fn force_note_new_head(_s: u32) -> Weight {
Weight::zero()
}
fn force_queue_action() -> Weight {
Weight::zero()
}
fn add_trusted_validation_code(_c: u32) -> Weight {
Weight::zero()
}
fn poke_unused_validation_code() -> Weight {
Weight::zero()
}
fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
Weight::zero()
}
fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
Weight::zero()
}
fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
Weight::zero()
}
fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
Weight::zero()
}
fn include_pvf_check_statement() -> Weight {
Weight::zero()
}
}

impl parachains_paras_inherent::Config for Runtime {
type WeightInfo = parachains_paras_inherent::TestWeightInfo;
}
Expand Down

0 comments on commit 8535030

Please sign in to comment.