Skip to content

Commit

Permalink
Better prettier command to avoid missing file alert (paritytech#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
crystalin authored Nov 20, 2020
1 parent bc81057 commit 362f563
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Check with Prettier
run: npx prettier --check --ignore-path .gitignore **.json **.js **.ts **.yml
run: npx prettier --check --ignore-path .gitignore '**/*.(yml|js|ts|json)' **.json **.js **.ts **.yml

####### Building and Testing binaries #######

Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ source $HOME/.cargo/env
## Docker image

### Standlone node

An alternative to the steps higlighted before is to use docker to run a pre-build binary. Doing so, you prevent having to install Substrate and all the dependencies, and you can skip the building the node process as well. The only requirement is to have Docker installed, and then you can execute the following command to download the corresponding image:

```bash
Expand All @@ -92,16 +93,16 @@ because it takes 1284 milliseconds for a moonbeam to reach Earth.

Moonbeam nodes support multiple public chains and testnets, with the following Chain Ids.

| Network Description | Chain ID |
| ----------------------------------- | ----------- |
| Local Parachain TestNet | 1280 |
| Local Standalone TestNet | 1281 |
| Reserved for other TestNets | 1282 - 1283 |
| Moonbeam (Polkadot) | 1284 |
| Moonriver (Kusama) | 1285 |
| Moonrock (Rococo) | 1286 |
| Moonbase Alpha TestNet | 1287 |
| Reserved for other public networks | 1288 - 1289 |
| Network Description | Chain ID |
| ---------------------------------- | ----------- |
| Local Parachain TestNet | 1280 |
| Local Standalone TestNet | 1281 |
| Reserved for other TestNets | 1282 - 1283 |
| Moonbeam (Polkadot) | 1284 |
| Moonriver (Kusama) | 1285 |
| Moonrock (Rococo) | 1286 |
| Moonbase Alpha TestNet | 1287 |
| Reserved for other public networks | 1288 - 1289 |

## Runtime Architecture

Expand Down
52 changes: 25 additions & 27 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,55 @@

# Scripts
This folder contains a list of script useful to develop/test the Moonbeam Node

This folder contains a list of script useful to develop/test the Moonbeam Node

## Requirements

For running nodes, you need to have **docker** running.
It is used to run the polkadot relay node (also needed to generate the relay specs for the parachain)


!!All the commands are to be executed from the repository root folder.!!


The node scripts are based on the USER_PORT env variable to set their
ports, following this strategy:
(for USER_PORT=33000)
(for USER_PORT=33000)

```
Standalone Nodes: 33[5-8]XX (supports 3 standalone nodes)
P2P: 34[5-8]42
RPC: 34[5-8]43
WS: 34[5-8]44
Standalone Nodes: 33[5-8]XX (supports 3 standalone nodes)
P2P: 34[5-8]42
RPC: 34[5-8]43
WS: 34[5-8]44
```
(so your first standalone node will have RPC at 33443)

(so your first standalone node will have RPC at 33443)

```
Relay Nodes: 33[0-2]XX (supports 3 relay nodes)
P2P: 33[0-9]42
RPC: 33[0-9]43
WS: 33[0-9]44
P2P: 33[0-9]42
RPC: 33[0-9]43
WS: 33[0-9]44
```
(so your first relay node will have RPC at 33043)

(so your first relay node will have RPC at 33043)

```
Parachain Nodes: 34[0-9]XX (supports 9 parachain nodes)
P2P: 34[0-9]52
RPC: 34[0-9]53
WS: 34[0-9]54
Parachain Nodes: 34[0-9]XX (supports 9 parachain nodes)
P2P: 34[0-9]52
RPC: 34[0-9]53
WS: 34[0-9]54
```
(so your first parachain node will have RPC at 34053)

(so your first parachain node will have RPC at 34053)

### Setting your USER_PORT

If you are running this on a shared remote computer, it is highly suggested to change the USER_PORT.


In your `~/.bashrc`, add at the end:

```
export USER_PORT=<XX000>
```

(replace XX by any digit that is not taken by someone else)

### Building the nodes
Expand All @@ -61,16 +59,16 @@ cargo build --release
```

# Standalone nodes

The standalone nodes are made to be executed without explicitly supplied specs.
They also don't require any runtime wasm file or genesis state.

```bash
scripts/run-moonbase-standalone.sh
```



# Alphanet nodes

The alphanet nodes require having relay nodes (at least 2) and parachain nodes (at least 1).
Those require sharing many files (specs, runtime wasm, genesis state).

Expand Down Expand Up @@ -99,6 +97,7 @@ The files generated are (by default) stored in `build/moonbase-alphanet-specs-[p
It also generates the `build/parachain.wasm` and `build/parachain.genesis`

### Alternate parachain specs

If you want to use an alternative spec template (like [../moonbase-alphanet-dev-specs-template.json](moonbase-alphanet-dev-specs-template.json which contains gerald funds)),
you can provide the template like this:

Expand All @@ -110,22 +109,21 @@ PARACHAIN_SPEC_TEMPLATE=specs/moonbase-alphanet-dev-specs-template.json scripts/

You can run up to 3 relay chain validators with this script. We use the `purestake/moonbase-relay-testnet` docker image for validators. Currently this image is manually published from commit (TODO), but this will change in the future.
Each node will get its key inserted 5 seconds after starting, using curl command.
(*The grandpa finality gadget is not yet supported as it requires to restart the node.*)
(_The grandpa finality gadget is not yet supported as it requires to restart the node._)

```bash
scripts/run-alphanet-relay.sh
```
```

## Running Parachain nodes

You can run up to 3 relay nodes with this script

```bash
scripts/run-alphanet-parachain.sh
```

```

# Development

The scripts are based on env variables.
Most of them are initiated within [_init_var.sh](_init_var.sh) script.
Most of them are initiated within [\_init_var.sh](_init_var.sh) script.

0 comments on commit 362f563

Please sign in to comment.