Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

add statemine parachain-launch config #1812

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
24 changes: 24 additions & 0 deletions scripts/parachain-launch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# parachain-launch
samelamin marked this conversation as resolved.
Show resolved Hide resolved



# Introduction

[Parachain-launch](https://github.com/open-web3-stack/parachain-launch) is a script that generates a docker compose file allowing you to launch a testnet of multiple blockchain nodes.

The output directory already contains a generated docker-compose file so you can spin a testnet up without needing to install `parachain-launch`

To get the testnet up and running run the below command

```
docker-compose -f output/docker-compose.yml up -d
```

To regenerate the compose file, first ensure `parachain-launch` is installed and run the following command

```
parachain-launch generate statemine.yml
```
samelamin marked this conversation as resolved.
Show resolved Hide resolved

# Requirements
The only requirement to spin a testnet up is to have [docker-compose](https://docs.docker.com/compose/install/) installed, however to generate your own compose file then please follow the instructions to install `parachain-launch`
92 changes: 92 additions & 0 deletions scripts/parachain-launch/output/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
version: "3.7"
services:
relaychain-alice:
ports:
- 9944:9944
- 9933:9933
- 30333:30333
volumes:
- relaychain-alice:/data
build:
context: .
dockerfile: relaychain.Dockerfile
command:
- --base-path=/data
- --chain=/app/rococo-local.json
- --validator
- --ws-external
- --rpc-external
- --rpc-cors=all
- --name=alice
- --alice
- --rpc-methods=unsafe
- --wasm-execution=compiled
- --execution=wasm
environment:
RUST_LOG: parachain::candidate-backing=trace,parachain::candidate-selection=trace,parachain::pvf=debug,parachain::provisioner=trace
ulimits:
&a1
nofile:
soft: 65536
hard: 65536
relaychain-bob:
ports:
- 9945:9944
- 9934:9933
- 30334:30333
volumes:
- relaychain-bob:/data
build:
context: .
dockerfile: relaychain.Dockerfile
command:
- --base-path=/data
- --chain=/app/rococo-local.json
- --validator
- --ws-external
- --rpc-external
- --rpc-cors=all
- --name=bob
- --bob
- --rpc-methods=unsafe
- --wasm-execution=compiled
- --execution=wasm
environment:
RUST_LOG: parachain::candidate-backing=trace,parachain::candidate-selection=trace,parachain::pvf=debug,parachain::provisioner=trace
ulimits: *a1
parachain-2000-0:
ports:
- 9946:9944
- 9935:9933
- 30335:30333
volumes:
- parachain-2000-0:/data
build:
context: .
dockerfile: parachain-2000.Dockerfile
command:
- --base-path=/data
- --chain=/app/statemine-local-2000.json
- --ws-external
- --rpc-external
- --rpc-cors=all
- --name=parachain-2000-0
- --collator
- --rpc-methods=unsafe
- --force-authoring
- --wasm-execution=compiled
- --execution=wasm
- --alice
- --node-key=15c931b2a198ea9bcb8170d41e4d838e11300d7b678f0e23c4f6b1e50977e4ef
- --listen-addr=/ip4/0.0.0.0/tcp/30333
- --
- --chain=/app/rococo-local.json
- --wasm-execution=compiled
- --execution=wasm
environment:
RUST_LOG: sc_basic_authorship=trace,cumulus-consensus=trace,cumulus-collator=trace,collator_protocol=trace,collation_generation=trace,aura=debug
ulimits: *a1
volumes:
relaychain-alice: null
relaychain-bob: null
parachain-2000-0: null
2 changes: 2 additions & 0 deletions scripts/parachain-launch/output/parachain-2000.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM docker.io/parity/polkadot-parachain:latest
COPY . /app
2 changes: 2 additions & 0 deletions scripts/parachain-launch/output/relaychain.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM parity/polkadot:v0.9.29
COPY . /app
145 changes: 145 additions & 0 deletions scripts/parachain-launch/output/rococo-local.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions scripts/parachain-launch/output/statemine-local-2000.json

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions scripts/parachain-launch/statemine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
relaychain:
image: parity/polkadot:v0.9.29
chain: rococo-local
runtimeGenesisConfig:
configuration:
config:
validation_upgrade_cooldown: 10
validation_upgrade_delay: 10
env:
RUST_LOG: parachain::candidate-backing=trace,parachain::candidate-selection=trace,parachain::pvf=debug,parachain::provisioner=trace
samelamin marked this conversation as resolved.
Show resolved Hide resolved
flags:
- --rpc-methods=unsafe
- --wasm-execution=compiled
- --execution=wasm
samelamin marked this conversation as resolved.
Show resolved Hide resolved
nodes:
- name: alice
- name: bob

parachains:
- image: docker.io/parity/polkadot-parachain:latest
chain:
base: statemine-local
collators:
- alice
sudo: alice
id: 2000
parachain: true
flags:
- --rpc-methods=unsafe
- --force-authoring
- --wasm-execution=compiled
- --execution=wasm
relaychainFlags:
- --wasm-execution=compiled
- --execution=wasm
samelamin marked this conversation as resolved.
Show resolved Hide resolved
env:
RUST_LOG: sc_basic_authorship=trace,cumulus-consensus=trace,cumulus-collator=trace,collator_protocol=trace,collation_generation=trace,aura=debug
samelamin marked this conversation as resolved.
Show resolved Hide resolved
nodes:
- flags:
- --alice