From 93e993c0a90f5f5168c630fda4ac7d5820b5ca14 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Fri, 27 Jan 2023 19:12:53 +0800 Subject: [PATCH 1/7] WIP: add lodestar configuration on Interactive Guide page --- .../beacon/_partials/_install_cl_lodestar.md | 237 ++++++++++++++++++ .../beacon/_partials/_run-consensus-client.md | 3 + .../validator/_partials/_install-validator.md | 8 + .../clients/_install_validator_lodestar.md | 71 ++++++ 4 files changed, 319 insertions(+) create mode 100644 docs/node/guide/beacon/_partials/_install_cl_lodestar.md create mode 100644 docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md new file mode 100644 index 00000000..03a5c996 --- /dev/null +++ b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md @@ -0,0 +1,237 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + + + + +- 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/lodestar-${version} #cd consensus/lodestar-1.2.2 + ``` +- 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=/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/ + ``` + + + + + + +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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + + - Execute Lighthouse + ```bash + ./lighthouse \ + --network gnosis beacon_node \ + --datadir=data \ + --http \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt ../jwtsecret/jwt.hex \ + --checkpoint-sync-url "https://checkpoint.gnosischain.com" + ``` + + + + + + + + + + +- Go to the [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + +- Create a new folder `network_config` and download Chiado config files: + ```bash + mkdir network_config && + cd network_config && + wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && + wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && + wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt + ``` + +- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. + ```bash + ./lighthouse \ + --testnet-dir=./network_config bn \ + --datadir=data \ + --disable-upnp \ + --port=9000 \ + --http \ + --http-address=0.0.0.0 \ + --http-port=4000 \ + --target-peers=50 \ + --boot-nodes=enr:[BOOTNODES] \ + --execution-endpoints=http://localhost:8551 \ + --execution-jwt=../jwtsecret/jwt.hex \ + --eth1-endpoints=http://localhost:8545 \ + --debug-level=info \ + --suggested-fee-recipient=[YOUR_ADDRESS] \ + --validator-monitor-auto \ + --subscribe-all-subnets \ + --import-all-attestations \ + --metrics \ + --metrics-port=5054 \ + --metrics-address=0.0.0.0 \ + --checkpoint-sync-url https://checkpoint.chiadochain.net + ``` + + + + +Lighthouse 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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + +- Create a new folder `network_config` and download Chiado config files: + ```bash + mkdir network_config && + cd network_config && + wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && + wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && + wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt + ``` + +- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. + ```bash + ./lighthouse \ + --testnet-dir=./network_config bn \ + --datadir=data \ + --disable-upnp \ + --port=9000 \ + --http \ + --http-address=0.0.0.0 \ + --http-port=4000 \ + --target-peers=50 \ + --boot-nodes=enr:[BOOTNODES] \ + --execution-endpoints=http://localhost:8551 \ + --execution-jwt=../jwtsecret/jwt.hex \ + --eth1-endpoints=http://localhost:8545 \ + --debug-level=info \ + --suggested-fee-recipient=[YOUR_ADDRESS] \ + --validator-monitor-auto \ + --subscribe-all-subnets \ + --import-all-attestations \ + --metrics \ + --metrics-port=5054 \ + --metrics-address=0.0.0.0 \ + --checkpoint-sync-url https://checkpoint.chiadochain.net + ``` + + + + + + \ No newline at end of file diff --git a/docs/node/guide/beacon/_partials/_run-consensus-client.md b/docs/node/guide/beacon/_partials/_run-consensus-client.md index 27ea31ea..5ad9e587 100644 --- a/docs/node/guide/beacon/_partials/_run-consensus-client.md +++ b/docs/node/guide/beacon/_partials/_run-consensus-client.md @@ -1,6 +1,7 @@ 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'; ```mdx-code-block @@ -27,6 +28,8 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md) ::: + + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/_install-validator.md b/docs/node/guide/validator/_partials/_install-validator.md index 3915e2a2..70db1dec 100644 --- a/docs/node/guide/validator/_partials/_install-validator.md +++ b/docs/node/guide/validator/_partials/_install-validator.md @@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem'; import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lighthouse.md'; + @@ -20,12 +21,19 @@ import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_ ``` +import InstallLodestarValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md'; + + :::info + Please refer to [Run a Beacon Node: Lodestar](../../beacon/lodestar.md) + ::: + + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md new file mode 100644 index 00000000..f100c5f5 --- /dev/null +++ b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md @@ -0,0 +1,71 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +:::info +Lighthouse 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. +::: + + + + + + + +To run a validator, we need to first import the keys generated in the previous step. + +* In a new command line window, navigate to the `consensus` folder and execute Lighthouse validator client +* To ease the import process, we will create a `password.txt` file containing the password used to encrypt the validator keys. + +```shell +echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt +``` + +* Import the validator keys using lighthouse: + +```shell +./lighthouse account_manager validator import \ + --network gnosis \ + --password-file keystores/password.txt \ + --reuse-password \ + --directory keystores \ + --datadir validators +``` + +* Start your lighhouse validator: + +```shell +./lighthouse validator_client \ + --network gnosis \ + --datadir validators \ + --enable-doppelganger-protection \ +# highlight-start + --suggested-fee-recipient="0x0" \ # Change this value +# highlight-end + --metrics \ + --metrics-address=0.0.0.0 \ + --metrics-port=5064 \ +# highlight-start + --graffiti "gnosis-docs-graffiti" # Change this value +# highlight-end +``` + +Replace `gnosis-docs-graffiti` with your [graffiti](https://lighthouse-book.sigmaprime.io/graffiti.html). Make sure to delete `# Change this value` before running this command. Learn more about the [`enable-doppelganger-protection`](https://lighthouse-book.sigmaprime.io/validator-doppelganger.html) flag in Lighthouse docs. + + + + + +
+
+ +
From c8a5382a9c2420a214b9f1f784d00cce88585f48 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Fri, 27 Jan 2023 19:18:39 +0800 Subject: [PATCH 2/7] Revert "WIP: add lodestar configuration on Interactive Guide page" This reverts commit 93e993c0a90f5f5168c630fda4ac7d5820b5ca14. --- .../beacon/_partials/_install_cl_lodestar.md | 237 ------------------ .../beacon/_partials/_run-consensus-client.md | 3 - .../validator/_partials/_install-validator.md | 8 - .../clients/_install_validator_lodestar.md | 71 ------ 4 files changed, 319 deletions(-) delete mode 100644 docs/node/guide/beacon/_partials/_install_cl_lodestar.md delete mode 100644 docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md deleted file mode 100644 index 03a5c996..00000000 --- a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md +++ /dev/null @@ -1,237 +0,0 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - - - - - -- 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/lodestar-${version} #cd consensus/lodestar-1.2.2 - ``` -- 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=/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/ - ``` - - - - - - -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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. - -- Download the lighthouse-VERSION-ARQ.tar.gz binary. - ```bash - wget [URL_FROM_PREVIOUS_STEP] - ``` - -- Extract the downloaded file - ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus - ``` - -- Get into the folder - ```bash - cd consensus - ``` - - - Execute Lighthouse - ```bash - ./lighthouse \ - --network gnosis beacon_node \ - --datadir=data \ - --http \ - --execution-endpoint http://localhost:8551 \ - --execution-jwt ../jwtsecret/jwt.hex \ - --checkpoint-sync-url "https://checkpoint.gnosischain.com" - ``` - - - - - - - - - - -- Go to the [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. - -- Download the lighthouse-VERSION-ARQ.tar.gz binary. - ```bash - wget [URL_FROM_PREVIOUS_STEP] - ``` - -- Extract the downloaded file - ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus - ``` - -- Get into the folder - ```bash - cd consensus - ``` - -- Create a new folder `network_config` and download Chiado config files: - ```bash - mkdir network_config && - cd network_config && - wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && - wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && - wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt - ``` - -- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. - ```bash - ./lighthouse \ - --testnet-dir=./network_config bn \ - --datadir=data \ - --disable-upnp \ - --port=9000 \ - --http \ - --http-address=0.0.0.0 \ - --http-port=4000 \ - --target-peers=50 \ - --boot-nodes=enr:[BOOTNODES] \ - --execution-endpoints=http://localhost:8551 \ - --execution-jwt=../jwtsecret/jwt.hex \ - --eth1-endpoints=http://localhost:8545 \ - --debug-level=info \ - --suggested-fee-recipient=[YOUR_ADDRESS] \ - --validator-monitor-auto \ - --subscribe-all-subnets \ - --import-all-attestations \ - --metrics \ - --metrics-port=5054 \ - --metrics-address=0.0.0.0 \ - --checkpoint-sync-url https://checkpoint.chiadochain.net - ``` - - - - -Lighthouse 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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. - -- Download the lighthouse-VERSION-ARQ.tar.gz binary. - ```bash - wget [URL_FROM_PREVIOUS_STEP] - ``` - -- Extract the downloaded file - ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus - ``` - -- Get into the folder - ```bash - cd consensus - ``` - -- Create a new folder `network_config` and download Chiado config files: - ```bash - mkdir network_config && - cd network_config && - wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && - wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && - wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt - ``` - -- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. - ```bash - ./lighthouse \ - --testnet-dir=./network_config bn \ - --datadir=data \ - --disable-upnp \ - --port=9000 \ - --http \ - --http-address=0.0.0.0 \ - --http-port=4000 \ - --target-peers=50 \ - --boot-nodes=enr:[BOOTNODES] \ - --execution-endpoints=http://localhost:8551 \ - --execution-jwt=../jwtsecret/jwt.hex \ - --eth1-endpoints=http://localhost:8545 \ - --debug-level=info \ - --suggested-fee-recipient=[YOUR_ADDRESS] \ - --validator-monitor-auto \ - --subscribe-all-subnets \ - --import-all-attestations \ - --metrics \ - --metrics-port=5054 \ - --metrics-address=0.0.0.0 \ - --checkpoint-sync-url https://checkpoint.chiadochain.net - ``` - - - - - - \ No newline at end of file diff --git a/docs/node/guide/beacon/_partials/_run-consensus-client.md b/docs/node/guide/beacon/_partials/_run-consensus-client.md index 5ad9e587..27ea31ea 100644 --- a/docs/node/guide/beacon/_partials/_run-consensus-client.md +++ b/docs/node/guide/beacon/_partials/_run-consensus-client.md @@ -1,7 +1,6 @@ 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'; ```mdx-code-block @@ -28,8 +27,6 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md) ::: - - ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/_install-validator.md b/docs/node/guide/validator/_partials/_install-validator.md index 70db1dec..3915e2a2 100644 --- a/docs/node/guide/validator/_partials/_install-validator.md +++ b/docs/node/guide/validator/_partials/_install-validator.md @@ -13,7 +13,6 @@ import TabItem from '@theme/TabItem'; import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lighthouse.md'; - @@ -21,19 +20,12 @@ import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_ ``` -import InstallLodestarValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md'; - - :::info - Please refer to [Run a Beacon Node: Lodestar](../../beacon/lodestar.md) - ::: - - ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md deleted file mode 100644 index f100c5f5..00000000 --- a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md +++ /dev/null @@ -1,71 +0,0 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - - - - -:::info -Lighthouse 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. -::: - - - - - - - -To run a validator, we need to first import the keys generated in the previous step. - -* In a new command line window, navigate to the `consensus` folder and execute Lighthouse validator client -* To ease the import process, we will create a `password.txt` file containing the password used to encrypt the validator keys. - -```shell -echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt -``` - -* Import the validator keys using lighthouse: - -```shell -./lighthouse account_manager validator import \ - --network gnosis \ - --password-file keystores/password.txt \ - --reuse-password \ - --directory keystores \ - --datadir validators -``` - -* Start your lighhouse validator: - -```shell -./lighthouse validator_client \ - --network gnosis \ - --datadir validators \ - --enable-doppelganger-protection \ -# highlight-start - --suggested-fee-recipient="0x0" \ # Change this value -# highlight-end - --metrics \ - --metrics-address=0.0.0.0 \ - --metrics-port=5064 \ -# highlight-start - --graffiti "gnosis-docs-graffiti" # Change this value -# highlight-end -``` - -Replace `gnosis-docs-graffiti` with your [graffiti](https://lighthouse-book.sigmaprime.io/graffiti.html). Make sure to delete `# Change this value` before running this command. Learn more about the [`enable-doppelganger-protection`](https://lighthouse-book.sigmaprime.io/validator-doppelganger.html) flag in Lighthouse docs. - - - - - -
-
- -
From 8bb12f8eefce700be676cd296323ae2c790f61d4 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Fri, 27 Jan 2023 19:25:46 +0800 Subject: [PATCH 3/7] WIP: add Lodestar config to Interactive Guide #241 --- .../beacon/_partials/_install_cl_lodestar.md | 237 ++++++++++++++++++ .../beacon/_partials/_run-consensus-client.md | 3 + .../validator/_partials/_install-validator.md | 8 + .../clients/_install_validator_lodestar.md | 71 ++++++ 4 files changed, 319 insertions(+) create mode 100644 docs/node/guide/beacon/_partials/_install_cl_lodestar.md create mode 100644 docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md new file mode 100644 index 00000000..03a5c996 --- /dev/null +++ b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md @@ -0,0 +1,237 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + + + + +- 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/lodestar-${version} #cd consensus/lodestar-1.2.2 + ``` +- 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=/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/ + ``` + + + + + + +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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + + - Execute Lighthouse + ```bash + ./lighthouse \ + --network gnosis beacon_node \ + --datadir=data \ + --http \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt ../jwtsecret/jwt.hex \ + --checkpoint-sync-url "https://checkpoint.gnosischain.com" + ``` + + + + + + + + + + +- Go to the [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + +- Create a new folder `network_config` and download Chiado config files: + ```bash + mkdir network_config && + cd network_config && + wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && + wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && + wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt + ``` + +- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. + ```bash + ./lighthouse \ + --testnet-dir=./network_config bn \ + --datadir=data \ + --disable-upnp \ + --port=9000 \ + --http \ + --http-address=0.0.0.0 \ + --http-port=4000 \ + --target-peers=50 \ + --boot-nodes=enr:[BOOTNODES] \ + --execution-endpoints=http://localhost:8551 \ + --execution-jwt=../jwtsecret/jwt.hex \ + --eth1-endpoints=http://localhost:8545 \ + --debug-level=info \ + --suggested-fee-recipient=[YOUR_ADDRESS] \ + --validator-monitor-auto \ + --subscribe-all-subnets \ + --import-all-attestations \ + --metrics \ + --metrics-port=5054 \ + --metrics-address=0.0.0.0 \ + --checkpoint-sync-url https://checkpoint.chiadochain.net + ``` + + + + +Lighthouse 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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. + +- Download the lighthouse-VERSION-ARQ.tar.gz binary. + ```bash + wget [URL_FROM_PREVIOUS_STEP] + ``` + +- Extract the downloaded file + ```bash + tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + ``` + +- Get into the folder + ```bash + cd consensus + ``` + +- Create a new folder `network_config` and download Chiado config files: + ```bash + mkdir network_config && + cd network_config && + wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && + wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && + wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt + ``` + +- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. + ```bash + ./lighthouse \ + --testnet-dir=./network_config bn \ + --datadir=data \ + --disable-upnp \ + --port=9000 \ + --http \ + --http-address=0.0.0.0 \ + --http-port=4000 \ + --target-peers=50 \ + --boot-nodes=enr:[BOOTNODES] \ + --execution-endpoints=http://localhost:8551 \ + --execution-jwt=../jwtsecret/jwt.hex \ + --eth1-endpoints=http://localhost:8545 \ + --debug-level=info \ + --suggested-fee-recipient=[YOUR_ADDRESS] \ + --validator-monitor-auto \ + --subscribe-all-subnets \ + --import-all-attestations \ + --metrics \ + --metrics-port=5054 \ + --metrics-address=0.0.0.0 \ + --checkpoint-sync-url https://checkpoint.chiadochain.net + ``` + + + + + + \ No newline at end of file diff --git a/docs/node/guide/beacon/_partials/_run-consensus-client.md b/docs/node/guide/beacon/_partials/_run-consensus-client.md index 27ea31ea..5ad9e587 100644 --- a/docs/node/guide/beacon/_partials/_run-consensus-client.md +++ b/docs/node/guide/beacon/_partials/_run-consensus-client.md @@ -1,6 +1,7 @@ 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'; ```mdx-code-block @@ -27,6 +28,8 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md) ::: + + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/_install-validator.md b/docs/node/guide/validator/_partials/_install-validator.md index 3915e2a2..70db1dec 100644 --- a/docs/node/guide/validator/_partials/_install-validator.md +++ b/docs/node/guide/validator/_partials/_install-validator.md @@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem'; import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lighthouse.md'; + @@ -20,12 +21,19 @@ import InstallLighthouseValidatorPartial from '@site/docs/node/guide/validator/_ ``` +import InstallLodestarValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md'; + + :::info + Please refer to [Run a Beacon Node: Lodestar](../../beacon/lodestar.md) + ::: + + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md new file mode 100644 index 00000000..f100c5f5 --- /dev/null +++ b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md @@ -0,0 +1,71 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +:::info +Lighthouse 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. +::: + + + + + + + +To run a validator, we need to first import the keys generated in the previous step. + +* In a new command line window, navigate to the `consensus` folder and execute Lighthouse validator client +* To ease the import process, we will create a `password.txt` file containing the password used to encrypt the validator keys. + +```shell +echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt +``` + +* Import the validator keys using lighthouse: + +```shell +./lighthouse account_manager validator import \ + --network gnosis \ + --password-file keystores/password.txt \ + --reuse-password \ + --directory keystores \ + --datadir validators +``` + +* Start your lighhouse validator: + +```shell +./lighthouse validator_client \ + --network gnosis \ + --datadir validators \ + --enable-doppelganger-protection \ +# highlight-start + --suggested-fee-recipient="0x0" \ # Change this value +# highlight-end + --metrics \ + --metrics-address=0.0.0.0 \ + --metrics-port=5064 \ +# highlight-start + --graffiti "gnosis-docs-graffiti" # Change this value +# highlight-end +``` + +Replace `gnosis-docs-graffiti` with your [graffiti](https://lighthouse-book.sigmaprime.io/graffiti.html). Make sure to delete `# Change this value` before running this command. Learn more about the [`enable-doppelganger-protection`](https://lighthouse-book.sigmaprime.io/validator-doppelganger.html) flag in Lighthouse docs. + + + + + +
+
+ +
From 461c7b9db5be8ce305199c32969ccf6b1d2cb24f Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Mon, 30 Jan 2023 17:43:29 +0800 Subject: [PATCH 4/7] add Lodestar Validator config in Interactive guide #241 --- .../beacon/_partials/_install_cl_lodestar.md | 166 +++++------------- .../clients/_install_validator_lodestar.md | 40 ++--- 2 files changed, 65 insertions(+), 141 deletions(-) diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md index 03a5c996..de801d6e 100644 --- a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md +++ b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md @@ -81,32 +81,64 @@ Check that you are install correctly by running `./lodestar --help' 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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. +- 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 lighthouse-VERSION-ARQ.tar.gz binary. +- Download the lodestar VERSION-ARQ.tar.gz binary. ```bash wget [URL_FROM_PREVIOUS_STEP] ``` -- Extract the downloaded file +- Extract the downloaded file and move under consensus directory ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus + 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 folder +- Get into the lodestar folder + ```bash + cd consensus/lodestar-${version} #cd consensus/lodestar-1.2.2 + ``` +- Install and build across all packages ```bash - cd consensus + yarn install --ignore-optional + yarn run build ``` - - Execute Lighthouse +:::tip +Check that you are install correctly by running `./lodestar --help' +::: + + - Execute Lodestar Beacon Chain ```bash - ./lighthouse \ - --network gnosis beacon_node \ - --datadir=data \ - --http \ - --execution-endpoint http://localhost:8551 \ - --execution-jwt ../jwtsecret/jwt.hex \ - --checkpoint-sync-url "https://checkpoint.gnosischain.com" + ./lodestar \ + --network=gnosis + --dataDir=/data + --preset=gnosis + --eth1=true + --execution.urls=http://execution:8551 + --jwt-secret=/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/ ``` @@ -121,114 +153,12 @@ Lodestar only runs on Linux. To run it on Windows, [Install Linux on Windows wit ]}> -- Go to the [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. - -- Download the lighthouse-VERSION-ARQ.tar.gz binary. - ```bash - wget [URL_FROM_PREVIOUS_STEP] - ``` - -- Extract the downloaded file - ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus - ``` - -- Get into the folder - ```bash - cd consensus - ``` - -- Create a new folder `network_config` and download Chiado config files: - ```bash - mkdir network_config && - cd network_config && - wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && - wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && - wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt - ``` - -- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. - ```bash - ./lighthouse \ - --testnet-dir=./network_config bn \ - --datadir=data \ - --disable-upnp \ - --port=9000 \ - --http \ - --http-address=0.0.0.0 \ - --http-port=4000 \ - --target-peers=50 \ - --boot-nodes=enr:[BOOTNODES] \ - --execution-endpoints=http://localhost:8551 \ - --execution-jwt=../jwtsecret/jwt.hex \ - --eth1-endpoints=http://localhost:8545 \ - --debug-level=info \ - --suggested-fee-recipient=[YOUR_ADDRESS] \ - --validator-monitor-auto \ - --subscribe-all-subnets \ - --import-all-attestations \ - --metrics \ - --metrics-port=5054 \ - --metrics-address=0.0.0.0 \ - --checkpoint-sync-url https://checkpoint.chiadochain.net - ``` +Lodestar doesn't support Chiado at the moment. -Lighthouse 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 [lighhouse releases page](https://github.com/sigp/lighthouse/releases) and copy the url of the latest release based on your OS version. - -- Download the lighthouse-VERSION-ARQ.tar.gz binary. - ```bash - wget [URL_FROM_PREVIOUS_STEP] - ``` - -- Extract the downloaded file - ```bash - tar -xvf lighthouse-VERSION-ARQ.tar.gz --directory consensus - ``` - -- Get into the folder - ```bash - cd consensus - ``` - -- Create a new folder `network_config` and download Chiado config files: - ```bash - mkdir network_config && - cd network_config && - wget https://github.com/gnosischain/configs/raw/main/chiado/config.yaml && - wget https://github.com/gnosischain/configs/raw/main/chiado/genesis.ssz && - wget https://github.com/gnosischain/configs/raw/main/chiado/deploy_block.txt - ``` - -- Execute Lighthouse, replace `[BOOTNODES]` with a comma-separated bootnodes from [this file](https://github.com/gnosischain/configs/blob/main/chiado/bootnodes.yaml); and `[YOUR_ADDRESS]` with your fee recipient address. - ```bash - ./lighthouse \ - --testnet-dir=./network_config bn \ - --datadir=data \ - --disable-upnp \ - --port=9000 \ - --http \ - --http-address=0.0.0.0 \ - --http-port=4000 \ - --target-peers=50 \ - --boot-nodes=enr:[BOOTNODES] \ - --execution-endpoints=http://localhost:8551 \ - --execution-jwt=../jwtsecret/jwt.hex \ - --eth1-endpoints=http://localhost:8545 \ - --debug-level=info \ - --suggested-fee-recipient=[YOUR_ADDRESS] \ - --validator-monitor-auto \ - --subscribe-all-subnets \ - --import-all-attestations \ - --metrics \ - --metrics-port=5054 \ - --metrics-address=0.0.0.0 \ - --checkpoint-sync-url https://checkpoint.chiadochain.net - ``` +Lodestar doesn't support Chiado at the moment. diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md index f100c5f5..5b87a79a 100644 --- a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md +++ b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md @@ -23,43 +23,37 @@ Lighthouse only runs on Linux. To run it on Windows, [Install Linux on Windows w To run a validator, we need to first import the keys generated in the previous step. -* In a new command line window, navigate to the `consensus` folder and execute Lighthouse validator client +* In a new command line window, navigate to the `consensus` folder and execute Lodestar validator client * To ease the import process, we will create a `password.txt` file containing the password used to encrypt the validator keys. ```shell echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/password.txt ``` - + +You can import the keys when starting the validator. + * Import the validator keys using lighthouse: ```shell -./lighthouse account_manager validator import \ - --network gnosis \ - --password-file keystores/password.txt \ - --reuse-password \ +./lodestar validator \ + --network=gnosis \ + --importKeystores=/keystores \ + --importKeystoresPassword=keystores/password.txt \ --directory keystores \ - --datadir validators + --dataDir=/data/validators \ + # highlight-start + --suggestedFeeRecipient=$FEE_RECIPIENT \ # Change this value + # highlight-start + # highlight-start + --graffiti=$GRAFFITI # Change this value + # highlight-start ``` * Start your lighhouse validator: -```shell -./lighthouse validator_client \ - --network gnosis \ - --datadir validators \ - --enable-doppelganger-protection \ -# highlight-start - --suggested-fee-recipient="0x0" \ # Change this value -# highlight-end - --metrics \ - --metrics-address=0.0.0.0 \ - --metrics-port=5064 \ -# highlight-start - --graffiti "gnosis-docs-graffiti" # Change this value -# highlight-end -``` -Replace `gnosis-docs-graffiti` with your [graffiti](https://lighthouse-book.sigmaprime.io/graffiti.html). Make sure to delete `# Change this value` before running this command. Learn more about the [`enable-doppelganger-protection`](https://lighthouse-book.sigmaprime.io/validator-doppelganger.html) flag in Lighthouse docs. + +Replace `$GRAFFITI` with your [graffiti](https://lighthouse-book.sigmaprime.io/graffiti.html)and `$FEE_RECIPIENT` with your fee recipient address. Make sure to delete `# Change this value` before running this command. Learn more about the CLI commands and their options [here](https://chainsafe.github.io/lodestar/reference/cli/) From d86c6978c0b4a7e6aecd6fc39f2fbab16c79e0d3 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Mon, 30 Jan 2023 18:24:02 +0800 Subject: [PATCH 5/7] add teku md files --- docs/node/guide/beacon/_partials/_install_cli_teku.md | 0 .../guide/validator/_partials/clients/_install_validator_teku.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/node/guide/beacon/_partials/_install_cli_teku.md create mode 100644 docs/node/guide/validator/_partials/clients/_install_validator_teku.md diff --git a/docs/node/guide/beacon/_partials/_install_cli_teku.md b/docs/node/guide/beacon/_partials/_install_cli_teku.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_teku.md b/docs/node/guide/validator/_partials/clients/_install_validator_teku.md new file mode 100644 index 00000000..e69de29b From d4ac7d8d7c6e9047526770ceaded0f4096033129 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Tue, 31 Jan 2023 14:40:04 +0800 Subject: [PATCH 6/7] add Teku config in Interactive Guide #241 --- .../beacon/_partials/_install_cl_lodestar.md | 4 +- .../beacon/_partials/_install_cl_teku.md | 160 ++++++++++++++++++ .../beacon/_partials/_install_cli_teku.md | 0 .../beacon/_partials/_run-consensus-client.md | 6 + .../validator/_partials/_install-validator.md | 4 + .../clients/_install_validator_lodestar.md | 2 +- .../clients/_install_validator_teku.md | 74 ++++++++ 7 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 docs/node/guide/beacon/_partials/_install_cl_teku.md delete mode 100644 docs/node/guide/beacon/_partials/_install_cli_teku.md diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md index de801d6e..df1ad8c4 100644 --- a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md +++ b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md @@ -59,7 +59,7 @@ Check that you are install correctly by running `./lodestar --help' --preset=gnosis --eth1=true --execution.urls=http://execution:8551 - --jwt-secret=/jwt.hex + --jwt-secret=../jwtsecret/jwt.hex --logFile=/data/logs/beacon.log --logFileLevel=info --port=9000 @@ -126,7 +126,7 @@ Check that you are install correctly by running `./lodestar --help' --preset=gnosis --eth1=true --execution.urls=http://execution:8551 - --jwt-secret=/jwt.hex + --jwt-secret=../jwtsecret/jwt.hex --logFile=/data/logs/beacon.log --logFileLevel=info --port=9000 diff --git a/docs/node/guide/beacon/_partials/_install_cl_teku.md b/docs/node/guide/beacon/_partials/_install_cl_teku.md new file mode 100644 index 00000000..3fd13559 --- /dev/null +++ b/docs/node/guide/beacon/_partials/_install_cl_teku.md @@ -0,0 +1,160 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + + + + +## 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 +``` + + + + + +## 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 +``` + + + + + + + + + + +Teku doesn't support Chiado at the moment. + + + + +Teku doesn't support Chiado at the moment. + + + + + + \ No newline at end of file diff --git a/docs/node/guide/beacon/_partials/_install_cli_teku.md b/docs/node/guide/beacon/_partials/_install_cli_teku.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/node/guide/beacon/_partials/_run-consensus-client.md b/docs/node/guide/beacon/_partials/_run-consensus-client.md index 5ad9e587..85cfc4d0 100644 --- a/docs/node/guide/beacon/_partials/_run-consensus-client.md +++ b/docs/node/guide/beacon/_partials/_run-consensus-client.md @@ -2,6 +2,8 @@ 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 @@ -40,8 +42,12 @@ Please refer to [Run a Beacon Node: Lodestar](../lodestar.md) Please refer to [Run a Beacon Node: Teku](../teku.md) + ::: + + + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/_install-validator.md b/docs/node/guide/validator/_partials/_install-validator.md index 70db1dec..9dd4ddc9 100644 --- a/docs/node/guide/validator/_partials/_install-validator.md +++ b/docs/node/guide/validator/_partials/_install-validator.md @@ -1,6 +1,8 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import InstallTekuValidatorPartial from '@site/docs/node/guide/validator/_partials/clients/_install_validator_teku.md'; + ```mdx-code-block + ```mdx-code-block diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md index 5b87a79a..cd4f9e4f 100644 --- a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md +++ b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md @@ -9,7 +9,7 @@ import TabItem from '@theme/TabItem'; :::info -Lighthouse 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. +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. ::: diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_teku.md b/docs/node/guide/validator/_partials/clients/_install_validator_teku.md index e69de29b..2543352b 100644 --- a/docs/node/guide/validator/_partials/clients/_install_validator_teku.md +++ b/docs/node/guide/validator/_partials/clients/_install_validator_teku.md @@ -0,0 +1,74 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + +:::info +If you're using Windows, please [Install Linux on Windows with WSL](https://learn.microsoft.com/en-us/windows/wsl/install), and follow the instructions on the WSL terminal. +::: + + + + + + + +To run a validator, we need to first import the keys generated in the previous step. + +* In a new command line window, navigate to the `consensus` folder and execute Teku validator client +* To ease the import process, we will create a password txt file containing the password used to encrypt the validator keys. + + + +```shell +echo 'PLACE_HERE_YOUR_PASSWORD' > keystores/keystore-${m_...}.json.txt +``` + +If the Launchpad creates a key named keystore-m_12381_3600_0_0_0-1596485378.json, then the password file must be named keystore-m_12381_3600_0_0_0-1596485378.txt to comply with [EIP-2335](https://docs.teku.consensys.net/en/latest/HowTo/Get-Started/Connect/Connect-To-Mainnet/#create-a-password-file-for-each-validator-key) + +You can import the keys when starting the validator. + +* navigate to teku folder + +```shell +cd teku-${version} +``` + +* Execute Teku Beacon Chain and Validator(s): + +```shell +./bin/teku \ + --ee-endpoint=http://localhost:8551 \ + --ee-jwt-secret-file=../jwtsecret/jwt.hex \ + --metrics-enabled=true \ + --rest-api-enabled=true \ + --validators-proposer-default-fee-recipient=${Fee Recipient Address} \ + --validator-keys=${path to key file}:${path to password file} +``` + +If you wish to run validator only, run the following command: + +```shell +./bin/teku validator-client \ + --beacon-node-api-endpoint=${endpoint} \ + --validator-keys=${path to key file}:${path to password file} +``` + +Replace `$FEE_RECIPIENT` with your fee recipient address, `${path to key file}` and `{path to password file}`with the location where `keystores- *.json` and `keystore- *.txt` are stored, and `${endpoint}` with the endpoint of the beacon node’s REST API (default is http://127.0.0.1:5051). Learn more about the CLI commands and their options [here](https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/). + + + + + +
+
+ +
From a1587f8edcf74d4a7ceff4d5629ff30145dd6482 Mon Sep 17 00:00:00 2001 From: zengzengzenghuy Date: Mon, 6 Feb 2023 10:09:24 +0800 Subject: [PATCH 7/7] fix: minor typo #241 --- .../beacon/_partials/_install_cl_lodestar.md | 77 ++++++++++--------- .../beacon/_partials/_install_cl_teku.md | 2 +- .../clients/_install_validator_lodestar.md | 8 +- .../clients/_install_validator_teku.md | 6 +- 4 files changed, 49 insertions(+), 44 deletions(-) diff --git a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md index df1ad8c4..8d6d7f35 100644 --- a/docs/node/guide/beacon/_partials/_install_cl_lodestar.md +++ b/docs/node/guide/beacon/_partials/_install_cl_lodestar.md @@ -14,17 +14,18 @@ import TabItem from '@theme/TabItem'; ]}> -- 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. +- 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 +- 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 @@ -39,7 +40,7 @@ Your repo will look like this - Get into the lodestar folder ```bash - cd consensus/lodestar-${version} #cd consensus/lodestar-1.2.2 + cd consensus && cd lodestar-${version} ``` - Install and build across all packages ```bash @@ -54,23 +55,23 @@ 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 + --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/ ``` @@ -106,7 +107,7 @@ Your repo will look like this - Get into the lodestar folder ```bash - cd consensus/lodestar-${version} #cd consensus/lodestar-1.2.2 + cd consensus && cd lodestar-${version} ``` - Install and build across all packages ```bash @@ -121,23 +122,23 @@ 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 + --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/ ``` diff --git a/docs/node/guide/beacon/_partials/_install_cl_teku.md b/docs/node/guide/beacon/_partials/_install_cl_teku.md index 3fd13559..ed643cbe 100644 --- a/docs/node/guide/beacon/_partials/_install_cl_teku.md +++ b/docs/node/guide/beacon/_partials/_install_cl_teku.md @@ -67,7 +67,7 @@ You can run both beacon and validator with a single command. If you wish to run ``` ./bin/teku \ --ee-endpoint=http://localhost:8551 \ - --ee-jwt-secret-file=../jwtsecret/jwt.hex \ + --ee-jwt-secret-file=../../jwtsecret/jwt.hex \ --metrics-enabled=true \ --rest-api-enabled=true ``` diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md index cd4f9e4f..21307a0f 100644 --- a/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md +++ b/docs/node/guide/validator/_partials/clients/_install_validator_lodestar.md @@ -41,12 +41,12 @@ You can import the keys when starting the validator. --importKeystoresPassword=keystores/password.txt \ --directory keystores \ --dataDir=/data/validators \ - # highlight-start +# highlight-start --suggestedFeeRecipient=$FEE_RECIPIENT \ # Change this value - # highlight-start - # highlight-start +# highlight-end +# highlight-start --graffiti=$GRAFFITI # Change this value - # highlight-start +# highlight-end ``` * Start your lighhouse validator: diff --git a/docs/node/guide/validator/_partials/clients/_install_validator_teku.md b/docs/node/guide/validator/_partials/clients/_install_validator_teku.md index 2543352b..80e50928 100644 --- a/docs/node/guide/validator/_partials/clients/_install_validator_teku.md +++ b/docs/node/guide/validator/_partials/clients/_install_validator_teku.md @@ -47,19 +47,23 @@ cd teku-${version} ```shell ./bin/teku \ --ee-endpoint=http://localhost:8551 \ - --ee-jwt-secret-file=../jwtsecret/jwt.hex \ + --ee-jwt-secret-file=../../jwtsecret/jwt.hex \ --metrics-enabled=true \ --rest-api-enabled=true \ +# highlight-start --validators-proposer-default-fee-recipient=${Fee Recipient Address} \ --validator-keys=${path to key file}:${path to password file} +# highlight-end ``` If you wish to run validator only, run the following command: ```shell ./bin/teku validator-client \ +# highlight-start --beacon-node-api-endpoint=${endpoint} \ --validator-keys=${path to key file}:${path to password file} +# highlight-end ``` Replace `$FEE_RECIPIENT` with your fee recipient address, `${path to key file}` and `{path to password file}`with the location where `keystores- *.json` and `keystore- *.txt` are stored, and `${endpoint}` with the endpoint of the beacon node’s REST API (default is http://127.0.0.1:5051). Learn more about the CLI commands and their options [here](https://docs.teku.consensys.net/en/latest/Reference/CLI/CLI-Syntax/).