Skip to content

Commit

Permalink
chore(docs): update README and installation doc to include dev node (C…
Browse files Browse the repository at this point in the history
  • Loading branch information
noot authored and timwu20 committed Dec 6, 2021
1 parent 549dc25 commit f66f35f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 31 deletions.
44 changes: 26 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,41 +58,47 @@ build gossamer command:
make gossamer
```

### Run Default Node
### Run Development Node

To initialise a development node:

initialise default node:
```
./bin/gossamer --chain gssmr init
./bin/gossamer --chain dev init
```

start default node:
To start the development node:
```
./bin/gossamer --chain gssmr --key alice
./bin/gossamer --chain dev
```

The built-in keys available for the node are `alice`, `bob`, `charlie`, `dave`, `eve`, `ferdie`, `george`, and `ian`.
The development node is configured to produce a block every slot and to finalise a block every round (as there is only one authority, `alice`.)

The node will not build blocks every slot by default; it will appear that the node is doing nothing, but it is actually waiting for a slot to build a block. If you wish to force it to build blocks every slot, you update the `[core]` section of `chain/gssmr/config.toml` to the following:
### Run Gossamer Node

The gossamer node runs by default as an authority with 9 authorites set at genesis. The built-in keys, corresponding to the authorities, that are available for the node are `alice`, `bob`, `charlie`, `dave`, `eve`, `ferdie`, `george`, and `ian`.

To initialise a gossamer node:
```
[core]
roles = 4
babe-authority = true
grandpa-authority = true
babe-threshold-numerator = 1
babe-threshold-denominator = 1
./bin/gossamer --chain gssmr init
```

Then, re-run the above steps. NOTE: this feature is for testing only; if you wish to change the BABE block production parameters, you need to create a modified runtime.
To start the gossamer node:
```
./bin/gossamer --chain gssmr --key alice
```

Note: If you only run one gossamer node, the node will not build blocks every slot or finalize blocks; it will appear that the node is doing nothing, but it is actually waiting for a slot to build a block. This is because there are 9 authorities set, so at least 6 of the authorities should be run for a functional network. If you wish to reduce the number of authorities, you can modify the genesis file in `chain/gssmr/genesis-spec.json`.

### Run Kusama Node

initialise kusama node:
Kusama is currently supported as a **full node**, ie. it can sync the chain but not act as an authority.

To initialise a kusama node:
```
./bin/gossamer --chain kusama init
```

start kusama node:
To start the kusama node:
```
./bin/gossamer --chain kusama
```
Expand All @@ -108,12 +114,14 @@ After it's finished bootstrapping, the node should begin to sync.

### Run Polkadot Node

initialise polkadot node:
Polkadot is currently supported as a **full node**, ie. it can sync the chain but not act as an authority.

To initialise a polkadot node:
```
./bin/gossamer --chain polkadot init
```

start polkadot node:
To start the polkadot node:
```
./bin/gossamer --chain polkadot
```
Expand Down
31 changes: 18 additions & 13 deletions docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,36 @@ Run the following command to build the Gossamer binary:
make gossamer
```

## Run a Gossamer Node
### Run Development Node

To initialise a development node:

To run default Gossamer node, first initialise the node. This writes the genesis state to the database.
```
./bin/gossamer --chain gssmr init
./bin/gossamer --chain dev init
```

The gossamer node runs as an authority by default. The built-in authorities are `alice`, `bob`, `charlie`, `dave`, `eve`, `ferdie`, `george`, and `ian`. To start the node as an authority, provide it with a built-in key:
To start the development node:
```
./bin/gossamer --chain gssmr --key alice
./bin/gossamer --chain dev
```

The development node is configured to produce a block every slot and to finalise a block every round (as there is only one authority, `alice`.)

The node will not build blocks every slot by default; it will appear that the node is doing nothing, but it is actually waiting for a slot to build a block. If you wish to force it to build blocks every slot, you update the `[core]` section of `chain/gssmr/config.toml` to the following:
### Run Gossamer Node

The gossamer node runs by default as an authority with 9 authorites set at genesis. The built-in keys, corresponding to the authorities, that are available for the node are `alice`, `bob`, `charlie`, `dave`, `eve`, `ferdie`, `george`, and `ian`.

To initialise a gossamer node:
```
[core]
roles = 4
babe-authority = true
grandpa-authority = true
babe-threshold-numerator = 1
babe-threshold-denominator = 1
./bin/gossamer --chain gssmr init
```

To start the gossamer node:
```
./bin/gossamer --chain gssmr --key alice
```

Then, re-run the above steps. NOTE: this feature is for testing only; if you wish to change the BABE block production parameters, you need to create a modified runtime.
Note: If you only run one gossamer node, the node will not build blocks every slot or finalize blocks; it will appear that the node is doing nothing, but it is actually waiting for a slot to build a block. This is because there are 9 authorities set, so at least 6 of the authorities should be run for a functional network. If you wish to reduce the number of authorities, you can modify the genesis file in `chain/gssmr/genesis-spec.json`.

If you wish to run the default node as a non-authority, you can specify `roles=1`:
```
Expand Down

0 comments on commit f66f35f

Please sign in to comment.