Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring to properly handle Parachain chain-specs. #187

Closed
wants to merge 6 commits into from
Closed
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ and building them with the specific flags below:
git clone https://github.com/paritytech/polkadot
cd polkadot
cargo build --release
cp ./target/release/polkadot ../polkadot-launch/bin/polkadot-relaychain
cp ./target/release/polkadot ../polkadot-launch/examples/bin/polkadot-relaychain
```

and
Expand All @@ -37,13 +37,13 @@ and
git clone https://github.com/paritytech/cumulus
cd cumulus
cargo build --release -p polkadot-parachain
cp ./target/release/polkadot-parachain ../polkadot-launch/bin/polkadot-parachain
cp ./target/release/polkadot-parachain ../polkadot-launch/examples/bin/polkadot-parachain
```

## Use

```bash
polkadot-launch config.json
polkadot-launch examples/config.json
```

### Configuration File
Expand All @@ -52,8 +52,8 @@ The required configuration file defines the properties of the network you want t
You may use a json or a js file.

You can see the examples:
- [config.json](config.json)
- [config.js](config.js)
- [config.json](examples/config.json)
- [config.js](examples/config.js)

You may find the .js alternative more convenient if you need comments, trailing commas or if you prefer do dedup some portions of the config.

Expand Down Expand Up @@ -235,7 +235,7 @@ yarn
Start the application with:

```bash
yarn start config.json
yarn start examples/config.json
```

When you have finished your changes, make a [pull
Expand Down
2 changes: 1 addition & 1 deletion config.js → examples/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var flags = ["--force-authoring", "--", "--execution=wasm"];

var config = {
relaychain: {
bin: "./bin/polkadot",
bin: "./bin/polkadot-relaychain",
chain: "rococo-local",
nodes: [
{
Expand Down
2 changes: 1 addition & 1 deletion config.json → examples/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"relaychain": {
"bin": "./bin/polkadot",
"bin": "./bin/polkadot-relaychain",
"chain": "rococo-local",
"nodes": [
{
Expand Down
72 changes: 72 additions & 0 deletions examples/config_specs_from_files.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"relaychain": {
"bin": "./bin/polkadot-relaychain",
"chain": "./rococo-no-paras-raw.json",
"nodes": [
{
"name": "alice",
"wsPort": 9944,
"port": 30444
},
{
"name": "bob",
"wsPort": 9945,
"port": 30555
},
{
"name": "charlie",
"wsPort": 9946,
"port": 30666
},
{
"name": "dave",
"wsPort": 9947,
"port": 30777
}
],
"genesis": {
"runtime": {
"runtime_genesis_config": {
"configuration": {
"config": {
"validation_upgrade_frequency": 10,
"validation_upgrade_delay": 10
}
}
}
}
}
},
"parachains": [
{
"bin": "./bin/polkadot-parachain",
"chain": "./parachain-2000-raw.json",
"id": "2000",
"balance": "1000000000000000000000",
"nodes": [
{
"wsPort": 9954,
"port": 31200,
"name": "alice",
"flags": ["--", "--execution=wasm"]
}
]
},
{
"bin": "./bin/polkadot-parachain",
"chain": "./parachain-2002-raw.json",
"id": "2002",
"balance": "1000000000000000000000",
"nodes": [
{
"wsPort": 9955,
"port": 31300,
"name": "alice",
"flags": ["--", "--execution=wasm"]
}
]
}
],
"types": {},
"finalization": false
}
Loading