Skip to content

Commit

Permalink
Update docs for node configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
satran004 committed Sep 13, 2024
1 parent 2e040e3 commit bef2cf9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
14 changes: 14 additions & 0 deletions docs/pages/multi-node-setup.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Callout } from 'nextra/components'

## Multi Node Setup (Experimental)

While the primary purpose of DevKit is to provide a simple way to get started with a single devnet node, it is possible to use
Expand All @@ -7,6 +9,18 @@ A multi-node setup can be useful for various testing scenarios.

The additional nodes can be on the **same machine** or on **different machines**. There are separate commands to start a block producing node or a relay node.

<Callout type={"default"}>
For non-development multi-node setups, it is recommended to set `shiftStartTimeBehind=false` in the `config/node.properties` file
and configure `conwayHardForkAtEpoch=1`. This way, the network will start in the Babbage era and transition to the Conway era at epoch 1.
This approach helps avoid a V2 cost model issue that occurs if the network starts in the Conway era at epoch 0.

For more details, check this issue: https://github.com/bloxbean/yaci-devkit/issues/65#issuecomment-2318155838."

`conwayHardForkAtEpoch=1` <br/>
`shiftStartTimeBehind=false`

</Callout>

**You need to following steps in order to setup a multi-node setup:**

### 1. Setup Additional Node folders
Expand Down
37 changes: 23 additions & 14 deletions docs/pages/node-configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
import { Callout } from 'nextra/components'

## Node Configuration

Apart from a few options like `block time`, `epoch length`, and `slot length` which are provided through Yaci CLI,
other devnet node-related configurations can be configured through the `env` file. The configurations defined in the
`env` file will be used during devnet node creation.
other devnet node-related configurations can be configured through the `node.properties` file. The configurations defined in the
`node.properties` file will be used during devnet node creation.

For **zip** based installation, this file is located under installation directory ``config/node.properties``.

For **zip** based installation, the env file is located under installation directory ``config/env``.
For **curl** based installation, this file is located under ``$HOME/.yaci-devkit/config/node.properties``.

For **curl** based installation, the env file is located under ``$HOME/.yaci-devkit/config/env``.
Please refer to the `config/node.properties` file for all the node specific configurations.

Currently, the following configuration can be done through env file:
## Example of few key configurations:

### node.securityParam
### securityParam
To set the security parameter for the node. Default value is 300. (300 blocks)

To change the configuration, add to the `env` file
To change the configuration, add to the `node.properties` file

```shell
node.securityParam=<int value>
securityParam=<int value>
```

**Note:** If you want to stop your node for some time and restart it later without a reset, allowing it to continue from where
it left off and use existing data, you may want to set `node.securityParam` to a higher value.
it left off and use existing data, you may want to set `securityParam` to a higher value.
Otherwise, the node may get stuck and you need to reset the node.

Let's say you want to stop your node and start the node again next day to continue from where it left off,
then you can set `node.securityParam` to a higher values like `86400` for 1 sec block time.
then you can set `securityParam` to a higher values like `86400` for 1 sec block time.

<Callout>
Currently, for Devnet work, the security parameter is set to a reasonable value to improve the developer experience.
For a real/multi-node network setup, please refer to this known issue/workaround: https://github.com/bloxbean/yaci-devkit/issues/65#issuecomment-2318155838
</Callout>

### node.peerSharing
### peerSharing

To enable or disable peer sharing. Default value is `true`.

### node.slotsPerKESPeriod
### slotsPerKESPeriod

To set the number of slots per KES period. Default value is `129600`.

### node.maxKESEvolutions
### maxKESEvolutions

To set the maximum KES evolutions. Default value is `60`.


**Note:** More configurations will be added in the future.
**Note:** More configurations can be found in `node.properties` file.

0 comments on commit bef2cf9

Please sign in to comment.