Skip to content

Commit

Permalink
Update configs and images (#175)
Browse files Browse the repository at this point in the history
* Update configs and images

* fix lint

* revert runtimeGenesis & patch

* update parity/polkadot:v1.1.0

* update yarn.lock

* fix lint
  • Loading branch information
zjb0807 authored Dec 11, 2023
1 parent ff50460 commit e155125
Show file tree
Hide file tree
Showing 9 changed files with 715 additions and 1,045 deletions.
2 changes: 1 addition & 1 deletion bin/parachain-launch
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node

require("../lib/index");
require('../lib/index');
10 changes: 4 additions & 6 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Relaychain Configuration
relaychain:
image: parity/polkadot:v0.9.31 # the docker image to use
image: parity/polkadot:v1.1.0 # the docker image to use
chain: rococo-local # the chain to use
runtimeGenesisConfig: # additonal genesis override
configuration:
Expand All @@ -15,8 +15,7 @@ relaychain:
- --rpc-methods=unsafe
nodes: # nodes config
- name: alice # the node name and session key, this imply `--alice`
wsPort: 9944 # default ws port number is `9944 + global_node_index`
rpcPort: 9933 # default rpc port number is `9933 + global_node_index`
rpcPort: 9944 # default ws & rpc port number is `9944 + global_node_index`
port: 30333 # default libp2p port number is `30333 + global_node_index`
flags: # additional CLI flags for this node
- --force-authoring
Expand All @@ -28,7 +27,7 @@ relaychain:
# Parachain Configuration
parachains:
# Config for first parachain
- image: acala/karura-node:2.11.0
- image: acala/karura-node:2.21.0
chain: # this could be a string like `dev` or a config object
base: karura-local # the chain to use
collators: # override collators
Expand All @@ -55,8 +54,7 @@ parachains:
RUST_LOG: sc_basic_authorship=trace
volumePath: /acala/data # The path to mount volume and base path, default to /data
nodes: # nodes config
- wsPort: 9947
rpcPort: 9936
- rpcPort: 9947
port: 30336
flags: # additional CLI flags for this node
- --alice
Expand Down
4 changes: 2 additions & 2 deletions configs/acala.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parity/polkadot:v0.9.31
image: parity/polkadot:v1.1.0
chain: rococo-local
runtimeGenesisConfig:
configuration:
Expand All @@ -17,7 +17,7 @@ relaychain:
- name: bob

parachains:
- image: acala/acala-node:2.11.0
- image: acala/acala-node:2.21.0
chain:
base: acala-local
collators:
Expand Down
4 changes: 2 additions & 2 deletions configs/karura.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parity/polkadot:v0.9.31
image: parity/polkadot:v1.1.0
chain: rococo-local
runtimeGenesisConfig:
configuration:
Expand All @@ -17,7 +17,7 @@ relaychain:
- name: bob

parachains:
- image: acala/karura-node:2.11.0
- image: acala/karura-node:2.21.0
chain:
base: karura-local
collators:
Expand Down
18 changes: 6 additions & 12 deletions configs/kusama.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parity/polkadot:v0.9.31
image: parity/polkadot:v1.1.0
chain: rococo-local
runtimeGenesisConfig:
configuration:
Expand All @@ -23,24 +23,20 @@ relaychain:
- --execution=wasm
nodes:
- name: alice
wsPort: 19944
rpcPort: 19933
rpcPort: 19944
port: 31333
- name: bob
wsPort: false
rpcPort: false
port: false
- name: charlie
wsPort: false
rpcPort: false
port: false
- name: dave
wsPort: false
rpcPort: false
port: false

parachains:
- image: acala/karura-node:2.11.0
- image: acala/karura-node:2.21.0
chain:
base: karura-local
collators:
Expand All @@ -60,11 +56,10 @@ parachains:
nodes:
- flags:
- --alice
wsPort: 19946
rpcPort: 19935
rpcPort: 19946
port: 31335

- image: bifrostnetwork/bifrost:bifrost-v0.9.66
- image: bifrostnetwork/bifrost:bifrost-v0.9.88
chain:
base: bifrost-local
sudo: alice
Expand All @@ -81,7 +76,6 @@ parachains:
nodes:
- flags:
- --alice
wsPort: 19947
rpcPort: 1996
rpcPort: 19947
port: 31336

2 changes: 1 addition & 1 deletion configs/relaychain-only.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parity/polkadot:v0.9.31
image: parity/polkadot:v1.1.0
chain: rococo-local
runtimeGenesisConfig:
configuration:
Expand Down
11 changes: 2 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,7 @@ const generate = async (config: Config, { output, yes }: { output: string; yes:
const name = `relaychain-${_.kebabCase(node.name)}`;
const nodeConfig: DockerNode = {
ports: [
...(node.wsPort === false ? [] : [`${node.wsPort || 9944 + idx}:9944`]),
...(node.rpcPort === false ? [] : [`${node.rpcPort || 9933 + idx}:9933`]),
...(node.rpcPort === false ? [] : [`${node.rpcPort || 9944 + idx}:9944`]),
...(node.port === false ? [] : [`${node.port || 30333 + idx}:30333`]),
],
volumes: [`${name}:/data`],
Expand All @@ -500,7 +499,6 @@ const generate = async (config: Config, { output, yes }: { output: string; yes:
'--base-path=/data',
`--chain=/app/${config.relaychain.chain}.json`,
'--validator',
'--ws-external',
'--rpc-external',
'--rpc-cors=all',
`--name=${node.name}`,
Expand Down Expand Up @@ -528,11 +526,7 @@ const generate = async (config: Config, { output, yes }: { output: string; yes:
const name = `parachain-${parachain.id}-${nodeIdx}`;

const nodeConfig: DockerNode = {
ports: [
`${parachainNode.wsPort || 9944 + idx}:9944`,
`${parachainNode.rpcPort || 9933 + idx}:9933`,
`${parachainNode.port || 30333 + idx}:30333`,
],
ports: [`${parachainNode.rpcPort || 9944 + idx}:9944`, `${parachainNode.port || 30333 + idx}:30333`],
volumes: [`${name}:${volumePath}`],
build: {
context: '.',
Expand All @@ -541,7 +535,6 @@ const generate = async (config: Config, { output, yes }: { output: string; yes:
command: [
`--base-path=${volumePath}`,
`--chain=/app/${getChainspecName(parachain.chain, parachain.id)}`,
'--ws-external',
'--rpc-external',
'--rpc-cors=all',
`--name=${name}`,
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export interface Node {
name: string;
flags?: string[];
port?: number | false;
wsPort?: number | false;
rpcPort?: number | false;
relaychainFlags?: string[];
}
Expand Down
Loading

0 comments on commit e155125

Please sign in to comment.