Skip to content

Commit 334df22

Browse files
authored
Ws-port argument has been repalced with rpc-port (#2140)
* 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
1 parent 106173c commit 334df22

File tree

8 files changed

+337
-285
lines changed

8 files changed

+337
-285
lines changed

Cargo.lock

Lines changed: 262 additions & 262 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/rialto-parachain/node/src/service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ pub async fn start_node(
502502
keystore,
503503
force_authoring,
504504
slot_duration,
505-
// We got around 500ms for proposing
506-
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
505+
// We got around 1000ms for proposing
506+
block_proposal_slot_portion: SlotProportion::new(1f32 / 12f32),
507507
telemetry,
508508
max_block_proposal_slot_portion: None,
509509
},

bin/rialto/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ construct_runtime!(
495495
Inclusion: polkadot_runtime_parachains::inclusion::{Pallet, Call, Storage, Event<T>},
496496
ParasInherent: polkadot_runtime_parachains::paras_inherent::{Pallet, Call, Storage, Inherent},
497497
Scheduler: polkadot_runtime_parachains::scheduler::{Pallet, Storage},
498-
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config},
498+
Paras: polkadot_runtime_parachains::paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned},
499499
Initializer: polkadot_runtime_parachains::initializer::{Pallet, Call, Storage},
500500
Dmp: polkadot_runtime_parachains::dmp::{Pallet, Storage},
501501
Ump: polkadot_runtime_parachains::ump::{Pallet, Call, Storage, Event},

bin/rialto/runtime/src/parachains.rs

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use crate::{
2121
RuntimeOrigin, ShiftSessionManager, Slots, UncheckedExtrinsic,
2222
};
2323

24-
use frame_support::{parameter_types, traits::KeyOwnerProofSystem};
24+
use frame_support::{parameter_types, traits::KeyOwnerProofSystem, weights::Weight};
2525
use frame_system::EnsureRoot;
2626
use polkadot_primitives::v4::{ValidatorId, ValidatorIndex};
2727
use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots};
@@ -106,11 +106,57 @@ parameter_types! {
106106

107107
impl parachains_paras::Config for Runtime {
108108
type RuntimeEvent = RuntimeEvent;
109-
type WeightInfo = parachains_paras::TestWeightInfo;
109+
type WeightInfo = ParasWeightInfo;
110110
type UnsignedPriority = ParasUnsignedPriority;
111111
type NextSessionRotation = Babe;
112112
}
113113

114+
/// Test weight for the `Paras` pallet.
115+
///
116+
/// We can't use `parachains_paras::TestWeightInfo` anymore, because it returns `Weight::MAX`
117+
/// where we need some real-world weights. We'll use zero weights here, though to avoid
118+
/// adding benchmarks to Rialto runtime.
119+
pub struct ParasWeightInfo;
120+
121+
impl parachains_paras::WeightInfo for ParasWeightInfo {
122+
fn force_set_current_code(_c: u32) -> Weight {
123+
Weight::zero()
124+
}
125+
fn force_set_current_head(_s: u32) -> Weight {
126+
Weight::zero()
127+
}
128+
fn force_schedule_code_upgrade(_c: u32) -> Weight {
129+
Weight::zero()
130+
}
131+
fn force_note_new_head(_s: u32) -> Weight {
132+
Weight::zero()
133+
}
134+
fn force_queue_action() -> Weight {
135+
Weight::zero()
136+
}
137+
fn add_trusted_validation_code(_c: u32) -> Weight {
138+
Weight::zero()
139+
}
140+
fn poke_unused_validation_code() -> Weight {
141+
Weight::zero()
142+
}
143+
fn include_pvf_check_statement_finalize_upgrade_accept() -> Weight {
144+
Weight::zero()
145+
}
146+
fn include_pvf_check_statement_finalize_upgrade_reject() -> Weight {
147+
Weight::zero()
148+
}
149+
fn include_pvf_check_statement_finalize_onboarding_accept() -> Weight {
150+
Weight::zero()
151+
}
152+
fn include_pvf_check_statement_finalize_onboarding_reject() -> Weight {
153+
Weight::zero()
154+
}
155+
fn include_pvf_check_statement() -> Weight {
156+
Weight::zero()
157+
}
158+
}
159+
114160
impl parachains_paras_inherent::Config for Runtime {
115161
type WeightInfo = parachains_paras_inherent::TestWeightInfo;
116162
}

deployments/local-scripts/run-millau-node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ MILLAU_PORT="${MILLAU_PORT:-9945}"
88
RUST_LOG=runtime=trace \
99
./target/debug/millau-bridge-node --dev --tmp \
1010
--rpc-cors=all --unsafe-rpc-external --unsafe-rpc-external \
11-
--port 33044 --rpc-port 9934 --ws-port $MILLAU_PORT \
11+
--port 33044 --rpc-port $MILLAU_PORT \

deployments/local-scripts/run-rialto-node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ RIALTO_PORT="${RIALTO_PORT:-9944}"
88
RUST_LOG=runtime=trace \
99
./target/debug/rialto-bridge-node --dev --tmp \
1010
--rpc-cors=all --unsafe-rpc-external \
11-
--port 33033 --rpc-port 9933 --ws-port $RIALTO_PORT \
11+
--port 33033 --rpc-port $RIALTO_PORT \

deployments/local-scripts/run-westend-node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ WESTEND_PORT="${WESTEND_PORT:-9944}"
1111
RUST_LOG=runtime=trace,runtime::bridge=trace \
1212
./target/debug/polkadot --chain=westend-dev --alice --tmp \
1313
--rpc-cors=all --unsafe-rpc-external \
14-
--port 33033 --rpc-port 9933 --ws-port $WESTEND_PORT \
14+
--port 33033 --rpc-port $WESTEND_PORT \

deployments/networks/rialto-parachain.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,74 @@ services:
99
entrypoint: >
1010
/home/user/rialto-parachain-collator
1111
--alice
12+
--node-key=80cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
1213
--collator
1314
--force-authoring
1415
--parachain-id 2000
15-
--rpc-port 9933
16-
--ws-port 9944
16+
--rpc-port 9944
1717
--rpc-cors=all
1818
--unsafe-rpc-external
19+
--bootnodes
20+
/dns/rialto-parachain-collator-bob/tcp/30333/p2p/12D3KooWEEkzPUdahNXAtzJpkmornEZXHhyyPbTvDkJK383LFvdR
1921
--
2022
--execution wasm
2123
--chain /rialto-share/rialto-relaychain-spec-raw.json
22-
--rpc-port 9934
23-
--ws-port 9945
24+
--rpc-port 9945
25+
--bootnodes
26+
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
2427
volumes:
2528
- rialto-share:/rialto-share:z
2629
environment:
2730
RUST_LOG: runtime=trace,rpc=trace,txpool=trace,parachain=trace,parity_ws=trace,sc_basic_authorship=trace,xcm=trace
2831
depends_on:
2932
- rialto-chainspec-exporter
3033
ports:
31-
- "20433:9933"
3234
- "20444:9944"
3335

3436
rialto-parachain-collator-bob:
3537
<<: *rialto-parachain-collator
3638
entrypoint: >
3739
/home/user/rialto-parachain-collator
3840
--bob
41+
--node-key=90cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
3942
--collator
4043
--force-authoring
4144
--parachain-id 2000
42-
--rpc-port 9933
43-
--ws-port 9944
45+
--rpc-port 9944
4446
--rpc-cors=all
4547
--unsafe-rpc-external
48+
--bootnodes
49+
/dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5
4650
--
4751
--execution wasm
4852
--chain /rialto-share/rialto-relaychain-spec-raw.json
49-
--rpc-port 9934
50-
--ws-port 9945
53+
--rpc-port 9945
54+
--bootnodes
55+
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
5156
ports:
52-
- "20533:9933"
5357
- "20544:9944"
5458

5559
rialto-parachain-collator-charlie:
5660
<<: *rialto-parachain-collator
5761
entrypoint: >
5862
/home/user/rialto-parachain-collator
5963
--charlie
64+
--node-key=42cf382988364291a7968ae7825c01f68c50d679796a8983237d07fe0ccf363b
6065
--collator
6166
--force-authoring
6267
--parachain-id 2000
63-
--rpc-port 9933
64-
--ws-port 9944
68+
--rpc-port 9944
6569
--rpc-cors=all
6670
--unsafe-rpc-external
71+
--bootnodes
72+
/dns/rialto-parachain-collator-alice/tcp/30333/p2p/12D3KooWPoJr9Z2PyrFvTYCtto4iorLH11GKBwebJAyqAaFQxow5
6773
--
6874
--execution wasm
6975
--chain /rialto-share/rialto-relaychain-spec-raw.json
70-
--rpc-port 9934
71-
--ws-port 9945
76+
--rpc-port 9945
77+
--bootnodes
78+
/dns/rialto-node-alice/tcp/30333/p2p/12D3KooWMF6JvV319a7kJn5pqkKbhR3fcM2cvK5vCbYZHeQhYzFE
7279
ports:
73-
- "20633:9933"
7480
- "20644:9944"
7581

7682
rialto-parachain-registrar:

0 commit comments

Comments
 (0)