Skip to content

Commit

Permalink
feat: add fairground and validators testnet to restart data-node from…
Browse files Browse the repository at this point in the history
… network history
  • Loading branch information
daniel1302 committed Jun 19, 2023
1 parent f3083cb commit 1680e5e
Showing 1 changed file with 68 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: How to restart data-node from the network history
sidebar_label: Restart data-node from the network history
hide_title: false
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


## Why would you start/restart your data node from network history?
Expand Down Expand Up @@ -64,6 +66,11 @@ vega tm unsafe_reset_all --home <tendermint-home>

The config is located in the `<vega_home>/config/data-node/config.toml`. Update the following parameters in your `config.toml` file for the data node:


<Tabs groupId="network">
<TabItem value="mainnet" label="Mainnet">


```toml
AutoInitialiseFromNetworkHistory = true

Expand All @@ -80,10 +87,31 @@ AutoInitialiseFromNetworkHistory = true
TimeOut = "4h"
```

</TabItem>

<TabItem value="fairground" label="Fairground">

TBD for fairground

</TabItem>

<TabItem value="validators-testnet" label="Validator testnet">

TBD for validators-testnet

</TabItem>

</Tabs>

#### b. The vega core config

The config is located in the `<vega_home>/config/node/config.toml`. Update the following parameters in your `config.toml` file for the vega core:

<Tabs groupId="network">

<TabItem value="mainnet" label="Mainnet">


```toml
[Snapshot]
StartHeight = -1
Expand All @@ -93,6 +121,22 @@ The config is located in the `<vega_home>/config/node/config.toml`. Update the f
DialTimeout = "4h"
```

</TabItem>

<TabItem value="fairground" label="Fairground">

TBD for fairground

</TabItem>

<TabItem value="validators-testnet" label="Validator testnet">

TBD for validators-testnet

</TabItem>

</Tabs>

#### c. Tendermint config

To update tendermint, you have to know the trust block and height. To collect the above information, please visit one of the following link:
Expand All @@ -106,12 +150,17 @@ Then select one of the latest pair for block height and hash

Once you have thrusted block, you can update the following parameters in the `<tendermint_home>/config/config.toml` file:

<Tabs groupId="network">

<TabItem value="mainnet" label="Mainnet">


```toml
[statesync]
enable = true
rpc_servers = "api0.vega.community:26657,api1.vega.community:26657,api2.vega.community:26657,api7.vega.community:26657"
trust_height = <height for collected block>
trust_hash = "<hash for collected block>"
trust_height = &lt;height for collected block&gt;
trust_hash = "&lt;hash for collected block&gt;"
```

Example config:
Expand All @@ -128,6 +177,22 @@ trust_height = 3040600
trust_hash = "b4b500d8fc84cce3a42b141193db7ba23ff03cc80b70cc817f6536582ebd5eda"
```

</TabItem>

<TabItem value="fairground" label="Fairground">

TBD for fairground

</TabItem>

<TabItem value="validators-testnet" label="Validator testnet">

TBD for validators-testnet

</TabItem>

</Tabs>

### 4. Start your node

:::warning
Expand Down Expand Up @@ -181,4 +246,4 @@ Open the `<vega_home>/config/data-node/config.toml` file and update the followin

:::info
Do not restart your node. Just update config to avoid issues in the future restarts.
:::
:::

0 comments on commit 1680e5e

Please sign in to comment.