diff --git a/misc-configs/config.parachain.peaq-dev.100.yml b/misc-configs/config.parachain.peaq-dev.100.yml index 837ea78..4d7dd2d 100644 --- a/misc-configs/config.parachain.peaq-dev.100.yml +++ b/misc-configs/config.parachain.peaq-dev.100.yml @@ -124,3 +124,33 @@ parachains: port: 30443 relaychainFlags: # additional CLI flags for relaychain part - --name=relaychain-9 + - name: collator-10 + wsPort: 10055 + rpcPort: 20044 + port: 30444 + relaychainFlags: # additional CLI flags for relaychain part + - --name=relaychain-10 + - name: collator-11 + wsPort: 10056 + rpcPort: 20045 + port: 30445 + relaychainFlags: # additional CLI flags for relaychain part + - --name=relaychain-11 + - name: collator-12 + wsPort: 10057 + rpcPort: 20046 + port: 30446 + relaychainFlags: # additional CLI flags for relaychain part + - --name=relaychain-12 + - name: collator-13 + wsPort: 10058 + rpcPort: 20047 + port: 30447 + relaychainFlags: # additional CLI flags for relaychain part + - --name=relaychain-13 + - name: collator-14 + wsPort: 10059 + rpcPort: 20048 + port: 30448 + relaychainFlags: # additional CLI flags for relaychain part + - --name=relaychain-14 diff --git a/src/index.ts b/src/index.ts index a240d58..26034cb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -526,11 +526,13 @@ const generate = async (config: Config, { output, yes }: { output: string; yes: let idx = 0; for (const node of config.relaychain.nodes) { const name = `relaychain-${_.kebabCase(node.name)}`; + const port = node.port || 30333 + idx; + const nodeConfig: DockerNode = { ports: [ ...(node.wsPort === false ? [] : [`${node.wsPort || 9944 + idx}:9944`]), ...(node.rpcPort === false ? [] : [`${node.rpcPort || 9933 + idx}:9933`]), - ...(node.port === false ? [] : [`${node.port || 30333 + idx}:30333`]), + ...(node.port === false ? [] : [`${port}:${port}`]), ], volumes: [`${name}:/data`], build: { @@ -544,6 +546,8 @@ const generate = async (config: Config, { output, yes }: { output: string; yes: '--rpc-external', '--rpc-cors=all', `--name=${node.name}`, + '--in-peers=128', + '--out-peers=128', `--${node.name.toLowerCase()}`, ...(config.relaychain.flags || []), ...(node.flags || []), @@ -567,11 +571,13 @@ const generate = async (config: Config, { output, yes }: { output: string; yes: for (const parachainNode of parachain.nodes) { const name = `parachain-${parachain.id}-${nodeIdx}`; const parchainIdArgs = parachain.image.includes('peaq') ? [`--parachain-id=${parachain.id}`] : []; + const port = parachainNode.port || 30333 + idx; + const nodeConfig: DockerNode = { ports: [ `${parachainNode.wsPort || 9944 + idx}:9944`, `${parachainNode.rpcPort || 9933 + idx}:9933`, - `${parachainNode.port || 30333 + idx}:30333`, + `${port}:${port}`, ], volumes: [`${name}:${volumePath}`], build: { @@ -589,8 +595,10 @@ const generate = async (config: Config, { output, yes }: { output: string; yes: ...(parachainNode.flags || []), nodeIdx === 0 ? `--node-key=${nodeKey}` - : `--bootnodes=/dns/parachain-${parachain.id}-0/tcp/30333/p2p/${nodeAddress}`, - '--listen-addr=/ip4/0.0.0.0/tcp/30333', + : `--bootnodes=/dns/parachain-${parachain.id}-0/tcp/40444/p2p/${nodeAddress}`, + `--listen-addr=/ip4/0.0.0.0/tcp/${port}`, + '--in-peers=128', + '--out-peers=128', ...(parchainIdArgs || []), '--', `--chain=/app/${config.relaychain.chain}.json`,