From 259156885be2977f4561e22e0a4baa4048c52383 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 13 Mar 2024 16:41:56 +0900 Subject: [PATCH] Default ports Relay chain default rpc port diffrent from parachain default port Docker example in Readme verified to work Auto reformat --- README.md | 4 +++- node/src/command.rs | 4 ++++ node/src/service.rs | 2 +- pallets/sponsorship/src/lib.rs | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e8a731b6052..2bdf2fc57f1 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,6 @@ cargo build --release -p nodle-parachain && polkadot-launch launch.json ## With docker 1. Build the image: `docker build -t nodle/chain -f ./Dockerfile .`. -2. Run it: `docker run -v /path/to/local/repertory:/data -p 9944:9944 -it nodle/chain`. +2. Run it: `docker run -v /path/to/local/repertory:/data -p 9944:9944 -it nodle/chain --chain=eden-testing --base-path=/data`. + for instance as: + `docker run -v /mnt/d1/.local/share/nodle-parachain-2.2.2:/data -p 9944:9944 -p 9933:9933 -p30333:30333 -it nodle/chain --chain=eden-testing --base-path=/data --rpc-methods=safe --rpc-cors all --rpc-external -- --rpc-external` diff --git a/node/src/command.rs b/node/src/command.rs index aa6a1de3f52..4884b4c3293 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -282,6 +282,10 @@ impl DefaultConfigurationValues for RelayChainCli { fn prometheus_listen_port() -> u16 { 9616 } + + fn rpc_listen_port() -> u16 { + 9933 + } } impl CliConfiguration for RelayChainCli { diff --git a/node/src/service.rs b/node/src/service.rs index 29596b11e6b..bb918399bba 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -23,7 +23,7 @@ use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; // Local Runtime Types -use runtime_eden::{RuntimeApi}; +use runtime_eden::RuntimeApi; use polkadot_primitives::{Block, Hash}; diff --git a/pallets/sponsorship/src/lib.rs b/pallets/sponsorship/src/lib.rs index 3db150b8b63..109c2b9679b 100644 --- a/pallets/sponsorship/src/lib.rs +++ b/pallets/sponsorship/src/lib.rs @@ -25,7 +25,8 @@ use frame_support::{ dispatch::{DispatchInfo, DispatchResult, GetDispatchInfo, Pays, PostDispatchInfo}, traits::{ Currency, - ExistenceRequirement::{AllowDeath, KeepAlive}, InstanceFilter, IsSubType, IsType, OriginTrait, ReservableCurrency, + ExistenceRequirement::{AllowDeath, KeepAlive}, + InstanceFilter, IsSubType, IsType, OriginTrait, ReservableCurrency, }, }; use pallet_transaction_payment::OnChargeTransaction;