Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
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 \
2 changes: 1 addition & 1 deletion deployments/networks/millau.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- --unsafe-rpc-external
- --prometheus-external
environment:
RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,sc_basic_authorship=trace,beefy=trace,xcm=trace
RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,sc_basic_authorship=trace,beefy=trace,xcm=trace,trace
ports:
- "19933:9933"
- "19944:9944"
Expand Down
38 changes: 22 additions & 16 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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some recent changes in networking && I guess our parachain nodes can't connect to each other because of that => I've added stuff similar to what we have in Rialto and Millau

--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
RUST_LOG: runtime=trace,rpc=trace,txpool=trace,parachain=trace,parity_ws=trace,sc_basic_authorship=trace,xcm=trace,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
2 changes: 1 addition & 1 deletion deployments/networks/rialto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- --unsafe-rpc-external
- --prometheus-external
environment:
RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,beefy=trace,xcm=trace
RUST_LOG: runtime=trace,rpc=debug,txpool=trace,runtime::bridge=trace,beefy=trace,xcm=trace,trace
ports:
- "9933:9933"
- "9944:9944"
Expand Down