Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add teku and lodestar in Interactive guide #383

Closed
wants to merge 8 commits into from
168 changes: 168 additions & 0 deletions docs/node/guide/beacon/_partials/_install_cl_lodestar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


<Tabs className="tabgroup-with-label network-tabgroup" groupId="network" defaultValue="gnosis" values={[
{label: 'Gnosis', value: 'gnosis'},
{label: 'Chiado', value: 'chiado'}
]}>
<TabItem value="gnosis">

<Tabs className="tabgroup-with-label os-tabgroup" groupId="os" defaultValue="others" values={[
{label: 'Linux, MacOS, Arm64', value: 'others'},
{label: 'Windows', value: 'win'}
]}>
<TabItem value="others">

- Go to the [lodestar releases page](https://github.com/ChainSafe/lodestar/releases/tag/v1.2.2) and copy the url of the latest release.

- Download the lodestar VERSION-ARQ.tar.gz binary.
```bash
wget [URL_FROM_PREVIOUS_STEP]
```

- Extract the downloaded file and move under consensus directory.
```bash
tar -xvf VERSION-ARQ.tar.gz --directory consensus
```

Your repo will look like this
```
📂gnosis
├── 📂 jwtsecret/
├── 📂 execution/
└── 📂 consensus/
├── 📂 lodestar-${version}/
├── 📂 data/
├── 📂 keystores/
└── 📂 validators/
```

- Get into the lodestar folder
```bash
cd consensus && cd lodestar-${version}
```
- Install and build across all packages
```bash
yarn install --ignore-optional
yarn run build
```

:::tip
Check that you are install correctly by running `./lodestar --help'
:::

- Execute Lodestar Beacon Chain
```bash
./lodestar \
--network=gnosis \
--dataDir=/data \
--preset=gnosis \
--eth1=true \
--execution.urls=http://execution:8551 \
--jwt-secret=../../jwtsecret/jwt.hex \
--logFile=/data/logs/beacon.log \
--logFileLevel=info \
--port=9000 \
--rest=true \
--rest.address=0.0.0.0 \
--rest.port=4000 \
--rest.cors=* \
--discv5=true \
--targetPeers=50 \
--metrics=true \
--metrics.port=5054 \
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
```



</TabItem>
<TabItem value="win">

Lodestar only runs on Linux. To run it on Windows, [Install Linux on Windows with WSL](https://learn.microsoft.com/en-us/windows/wsl/install), and follow the instructions on the WSL terminal.

- Go to the [lodestar releases page](https://github.com/ChainSafe/lodestar/releases/tag/v1.2.2) and copy the url of the latest release, currently v1.2.2.

- Download the lodestar VERSION-ARQ.tar.gz binary.
```bash
wget [URL_FROM_PREVIOUS_STEP]
```

- Extract the downloaded file and move under consensus directory
```bash
tar -xvf VERSION-ARQ.tar.gz --directory consensus
```
Your repo will look like this
```
📂gnosis
├── 📂 jwtsecret/
├── 📂 execution/
└── 📂 consensus/
├── 📂 lodestar-${version}/
├── 📂 data/
├── 📂 keystores/
└── 📂 validators/
```

- Get into the lodestar folder
```bash
cd consensus && cd lodestar-${version}
```
- Install and build across all packages
```bash
yarn install --ignore-optional
yarn run build
```

:::tip
Check that you are install correctly by running `./lodestar --help'
:::

- Execute Lodestar Beacon Chain
```bash
./lodestar \
--network=gnosis \
--dataDir=/data \
--preset=gnosis \
--eth1=true \
--execution.urls=http://execution:8551 \
--jwt-secret=../../jwtsecret/jwt.hex \
--logFile=/data/logs/beacon.log \
--logFileLevel=info \
--port=9000 \
--rest=true \
--rest.address=0.0.0.0 \
--rest.port=4000 \
--rest.cors=* \
--discv5=true \
--targetPeers=50 \
--metrics=true \
--metrics.port=5054 \
--checkpointSyncUrl=https://checkpoint.gnosischain.com/
```

</TabItem>
</Tabs>

</TabItem>
<TabItem value="chiado">

<Tabs className="tabgroup-with-label os-tabgroup" groupId="os" defaultValue="others" values={[
{label: 'Linux, MacOS, Arm64', value: 'others'},
{label: 'Windows', value: 'win'}
]}>
<TabItem value="others">

Lodestar doesn't support Chiado at the moment.

</TabItem>
<TabItem value="win">

Lodestar doesn't support Chiado at the moment.

</TabItem>
</Tabs>

</TabItem>
</Tabs>
160 changes: 160 additions & 0 deletions docs/node/guide/beacon/_partials/_install_cl_teku.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


<Tabs className="tabgroup-with-label network-tabgroup" groupId="network" defaultValue="gnosis" values={[
{label: 'Gnosis', value: 'gnosis'},
{label: 'Chiado', value: 'chiado'}
]}>
<TabItem value="gnosis">

<Tabs className="tabgroup-with-label os-tabgroup" groupId="os" defaultValue="others" values={[
{label: 'Linux, MacOS, Arm64', value: 'others'},
{label: 'Windows', value: 'win'}
]}>
<TabItem value="others">

## Prerequisites
1. Java 11+


## Install and Run

- Go to the [Teku release page](https://github.com/ConsenSys/teku/releases) and copy the url of the binary distribution under **Downloads** section.


- Download the teku Source code .tar.gz binary.
```bash
wget [URL_FROM_PREVIOUS_STEP]
```

- Extract the downloaded file and move under consensus directory
```bash
tar -xvf VERSION.tar.gz --directory consensus
```

- Get into the teku folder
```bash
cd consensus && cd teku-${version}
```

Your repo will look like this



```
📂gnosis
├── 📂 jwtsecret/
├── 📂 execution/
└── 📂 consensus/
├── 📂 teku-${version}/
├── 📂 data/
├── 📂 keystores/
└── 📂 validators/
```

If you're installing on macOS with Homebrew, check out [here](https://docs.teku.consensys.net/en/latest/HowTo/Get-Started/Installation-Options/Install-Binaries/#macos-with-homebrew).

Check that you are installing correctly by running `./bin/teku --help'


:::tip
You can run both beacon and validator with a single command. If you wish to run with a single command, skip to [step 4: Run a validator](../../README.md#step-4-run-a-validator).
:::

- Execute beacon node(Optional)

```
./bin/teku \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=../../jwtsecret/jwt.hex \
--metrics-enabled=true \
--rest-api-enabled=true
```

</TabItem>

<TabItem value="win">

## Prerequisites
1. Java 11+
2. [Microsoft Visual C++ 2010 security update](https://www.microsoft.com/en-us/download/details.aspx?id=26999)

## Install and Run

- Go to the [Teku release page](https://github.com/ConsenSys/teku/releases) and copy the url of the binary distribution under **Downloads** section.


- Download the teku Source code .tar.gz binary.
```bash
wget [URL_FROM_PREVIOUS_STEP]
```

- Extract the downloaded file and move under consensus directory
```bash
tar -xvf VERSION.tar.gz --directory consensus
```

- Get into the teku folder
```bash
cd consensus && cd teku-${version}
```

Your repo will look like this



```
📂gnosis
├── 📂 jwtsecret/
├── 📂 execution/
└── 📂 consensus/
├── 📂 teku-${version}/
├── 📂 data/
├── 📂 keystores/
└── 📂 validators/
```

If you're installing on macOS with Homebrew, check out [here](https://docs.teku.consensys.net/en/latest/HowTo/Get-Started/Installation-Options/Install-Binaries/#macos-with-homebrew).

Check that you are installing correctly by running `bin\teku --help'


:::tip
You can run both beacon and validator with a single command. If you wish to run with a single command, skip to [step 4: Run a validator](../../README.md#step-4-run-a-validator).
:::

- Execute beacon node(Optional)

```
./bin/teku \
--ee-endpoint=http://localhost:8551 \
--ee-jwt-secret-file=../jwtsecret/jwt.hex \
--metrics-enabled=true \
--rest-api-enabled=true
```

</TabItem>
</Tabs>

</TabItem>
<TabItem value="chiado">

<Tabs className="tabgroup-with-label os-tabgroup" groupId="os" defaultValue="others" values={[
{label: 'Linux, MacOS, Arm64', value: 'others'},
{label: 'Windows', value: 'win'}
]}>
<TabItem value="others">

Teku doesn't support Chiado at the moment.

</TabItem>
<TabItem value="win">

Teku doesn't support Chiado at the moment.

</TabItem>
</Tabs>

</TabItem>
</Tabs>
9 changes: 9 additions & 0 deletions docs/node/guide/beacon/_partials/_run-consensus-client.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import InstallLighthousePartial from '@site/docs/node/guide/beacon/_partials/_install_cl_lighthouse.md';
import InstallLodestarPartial from '@site/docs/node/guide/beacon/_partials/_install_cl_lodestar.md';
import InstallTekuPartial from '@site/docs/node/guide/beacon/_partials/_install_cl_teku.md';


```mdx-code-block

Expand All @@ -27,6 +30,8 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md)

:::

<InstallLodestarPartial/>

```mdx-code-block
</TabItem>

Expand All @@ -37,8 +42,12 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md)

Please refer to [Run a Beacon Node: Teku](../teku.md)


:::

<InstallTekuPartial/>


```mdx-code-block
</TabItem>

Expand Down
Loading