Skip to content

Commit

Permalink
Ws-port argument has been repalced with rpc-port (#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 May 18, 2023
1 parent 106173c commit 334df22
Show file tree
Hide file tree
Showing 8 changed files with 337 additions and 285 deletions.
524 changes: 262 additions & 262 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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 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 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
2 changes: 1 addition & 1 deletion deployments/local-scripts/run-millau-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ MILLAU_PORT="${MILLAU_PORT:-9945}"
RUST_LOG=runtime=trace \
./target/debug/millau-bridge-node --dev --tmp \
--rpc-cors=all --unsafe-rpc-external --unsafe-rpc-external \
--port 33044 --rpc-port 9934 --ws-port $MILLAU_PORT \
--port 33044 --rpc-port $MILLAU_PORT \
2 changes: 1 addition & 1 deletion deployments/local-scripts/run-rialto-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RIALTO_PORT="${RIALTO_PORT:-9944}"
RUST_LOG=runtime=trace \
./target/debug/rialto-bridge-node --dev --tmp \
--rpc-cors=all --unsafe-rpc-external \
--port 33033 --rpc-port 9933 --ws-port $RIALTO_PORT \
--port 33033 --rpc-port $RIALTO_PORT \
2 changes: 1 addition & 1 deletion deployments/local-scripts/run-westend-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ WESTEND_PORT="${WESTEND_PORT:-9944}"
RUST_LOG=runtime=trace,runtime::bridge=trace \
./target/debug/polkadot --chain=westend-dev --alice --tmp \
--rpc-cors=all --unsafe-rpc-external \
--port 33033 --rpc-port 9933 --ws-port $WESTEND_PORT \
--port 33033 --rpc-port $WESTEND_PORT \
36 changes: 21 additions & 15 deletions deployments/networks/rialto-parachain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,74 @@ services:
entrypoint: >
/home/user/rialto-parachain-collator
--alice
--node-key=80cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
--collator
--force-authoring
--parachain-id 2000
--rpc-port 9933
--ws-port 9944
--rpc-port 9944
--rpc-cors=all
--unsafe-rpc-external
--bootnodes
/dns/rialto-parachain-collator-bob/tcp/30333/p2p/12D3KooWEEkzPUdahNXAtzJpkmornEZXHhyyPbTvDkJK383LFvdR
--
--execution wasm
--chain /rialto-share/rialto-relaychain-spec-raw.json
--rpc-port 9934
--ws-port 9945
--rpc-port 9945
--bootnodes
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
volumes:
- rialto-share:/rialto-share:z
environment:
RUST_LOG: runtime=trace,rpc=trace,txpool=trace,parachain=trace,parity_ws=trace,sc_basic_authorship=trace,xcm=trace
depends_on:
- rialto-chainspec-exporter
ports:
- "20433:9933"
- "20444:9944"

rialto-parachain-collator-bob:
<<: *rialto-parachain-collator
entrypoint: >
/home/user/rialto-parachain-collator
--bob
--node-key=90cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
--collator
--force-authoring
--parachain-id 2000
--rpc-port 9933
--ws-port 9944
--rpc-port 9944
--rpc-cors=all
--unsafe-rpc-external
--bootnodes
/dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5
--
--execution wasm
--chain /rialto-share/rialto-relaychain-spec-raw.json
--rpc-port 9934
--ws-port 9945
--rpc-port 9945
--bootnodes
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
ports:
- "20533:9933"
- "20544:9944"

rialto-parachain-collator-charlie:
<<: *rialto-parachain-collator
entrypoint: >
/home/user/rialto-parachain-collator
--charlie
--node-key=42cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
--collator
--force-authoring
--parachain-id 2000
--rpc-port 9933
--ws-port 9944
--rpc-port 9944
--rpc-cors=all
--unsafe-rpc-external
--bootnodes
/dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5
--
--execution wasm
--chain /rialto-share/rialto-relaychain-spec-raw.json
--rpc-port 9934
--ws-port 9945
--rpc-port 9945
--bootnodes
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
ports:
- "20633:9933"
- "20644:9944"

rialto-parachain-registrar:
Expand Down

0 comments on commit 334df22

Please sign in to comment.