Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
106 changes: 53 additions & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ cargo build --release --features real-overseer
./target/release/polkadot --chain ./rococo_local.json -d cumulus_relay0 --validator --alice --port 50556
```

* [polkadot-launch](https://github.com/paritytech/polkadot-launch) can be run by dropping the proper polkadot binary in the `./bin` folder and
* Run globally
* `polkadot-launch config.json`
* Run locally, navigate into polkadot-launch,
* ``` yarn ```
* ``` yarn start ```

Substrate Parachain Template:
```
# this command assumes the chain spec is in a directory named polkadot that is a sibling of the working directory
Expand Down
61 changes: 61 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"relaychain": {
"bin": "./bin/polkadot",
"chain": "rococo-local",
"nodes": [
{
"name": "alice",
"wsPort": 9944,
"port": 30444
},
{
"name": "bob",
"wsPort": 9955,
"port": 30555
},
{
"name": "charlie",
"wsPort": 9966,
"port": 30666
}
]
},
"parachains": [
{
"bin": "./target/release/pint",
"chain": "pint-dev",
"id": "1",
"wsPort": 9988,
"port": 31200,
"balance": "1000000000000000000000",
"flags": [
"--",
"--execution=wasm"
]
},
{
"bin": "./target/release/pint",
"chain": "pint-dev",
"id": "300",
"wsPort": 9999,
"port": 31300,
"balance": "1000000000000000000000",
"flags": [
"--",
"--execution=wasm"
]
}
],
"simpleParachains": [
],
"hrmpChannels": [
{
"sender": 1,
"recipient": 300,
"maxCapacity": 8,
"maxMessageSize": 512
}
],
"types": {},
"finalization": false
}
5 changes: 1 addition & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,14 @@ branch = 'rococo-v1'
git = "https://github.com/paritytech/polkadot"
branch = 'rococo-v1'

[[bin]]
name = 'parachain-collator'

[package]
authors = ['Anonymous']
build = 'build.rs'
description = 'A new Cumulus FRAME-based Substrate node, ready for hacking.'
edition = '2018'
homepage = 'https://substrate.dev'
license = 'LGPL-3.0-only'
name = 'parachain-collator'
name = 'pint'
repository = 'https://github.com/substrate-developer-hub/substrate-parachain-template'
version = '2.0.0'
[package.metadata.docs.rs]
Expand Down
14 changes: 7 additions & 7 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ where
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
}

pub fn development_config(id: ParaId) -> ChainSpec {
pub fn pint_development_config(id: ParaId) -> ChainSpec {
ChainSpec::from_genesis(
// Name
"Development",
"PINT Development",
// ID
"dev",
"pint_dev",
ChainType::Local,
move || {
testnet_genesis(
pint_testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
Expand All @@ -76,15 +76,15 @@ pub fn development_config(id: ParaId) -> ChainSpec {
)
}

pub fn local_testnet_config(id: ParaId) -> ChainSpec {
pub fn pint_local_config(id: ParaId) -> ChainSpec {
ChainSpec::from_genesis(
// Name
"Local Testnet",
// ID
"local_testnet",
ChainType::Local,
move || {
testnet_genesis(
pint_testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
Expand Down Expand Up @@ -114,7 +114,7 @@ pub fn local_testnet_config(id: ParaId) -> ChainSpec {
)
}

fn testnet_genesis(
fn pint_testnet_genesis(
root_key: AccountId,
endowed_accounts: Vec<AccountId>,
id: ParaId,
Expand Down
6 changes: 3 additions & 3 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ pub struct ExportGenesisStateCommand {

/// Id of the parachain this state is for.
///
/// Default: 100
#[structopt(long, conflicts_with = "chain")]
/// Default: 200
#[structopt(long)]
pub parachain_id: Option<u32>,

/// Write output in binary. Default is to write in hex.
#[structopt(short, long)]
pub raw: bool,

/// The name of the chain for that the genesis state should be exported.
#[structopt(long, conflicts_with = "parachain-id")]
#[structopt(long)]
pub chain: Option<String>,
}

Expand Down
16 changes: 8 additions & 8 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn load_spec(
para_id: ParaId,
) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
Ok(match id {
"dev" => Box::new(chain_spec::development_config(para_id)),
"" | "local" => Box::new(chain_spec::local_testnet_config(para_id)),
"pint-dev" => Box::new(chain_spec::pint_development_config(para_id)),
"pint-local" => Box::new(chain_spec::pint_local_config(para_id)),
path => Box::new(chain_spec::ChainSpec::from_json_file(
std::path::PathBuf::from(path),
)?),
Expand All @@ -40,7 +40,7 @@ fn load_spec(

impl SubstrateCli for Cli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"PINT Collator".into()
}

fn impl_version() -> String {
Expand All @@ -49,7 +49,7 @@ impl SubstrateCli for Cli {

fn description() -> String {
format!(
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
"PINT Collator\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relaychain node.\n\n\
{} [parachain-args] -- [relaychain-args]",
Expand All @@ -62,7 +62,7 @@ impl SubstrateCli for Cli {
}

fn support_url() -> String {
"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
"https://github.com/ChainSafe/PINT/issues/new".into()
}

fn copyright_start_year() -> i32 {
Expand All @@ -80,15 +80,15 @@ impl SubstrateCli for Cli {

impl SubstrateCli for RelayChainCli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"PINT Collator".into()
}

fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
}

fn description() -> String {
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
"PINT Collator\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relaychain node.\n\n\
rococo-collator [parachain-args] -- [relaychain-args]"
Expand All @@ -100,7 +100,7 @@ impl SubstrateCli for RelayChainCli {
}

fn support_url() -> String {
"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()
"https://github.com/ChainSafe/PINT/issues/new".into()
}

fn copyright_start_year() -> i32 {
Expand Down