Skip to content

Commit

Permalink
fix link errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandratran committed Dec 3, 2024
1 parent 6b32682 commit 4d50949
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
6 changes: 5 additions & 1 deletion docs/get-started/checkpoint-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ teku --eth1-endpoint=http://localhost:8545 \
```

The command uses the [`--checkpoint-sync-url`](../reference/cli/index.md#checkpoint-sync-url) option
to download the finalized checkpoint state. When using this option, you must delete your existing beacon node database, for example `<data-path>/beacon/db`, to enable Teku to download the new, finalized state for your node.
to download the finalized checkpoint state.
When using this option, you must delete your existing beacon node database, for example
`<data-path>/beacon/db`, to enable Teku to download the new, finalized state for your node.

:::note

You can also download a finalized checkpoint state file, and specify the location using the
[`--initial-state`](../reference/cli/index.md#initial-state) option.
To download the file and name it `state.ssz` run:
Expand All @@ -57,6 +60,7 @@ teku --eth1-endpoint=http://localhost:8545 \
--validator-keys=/Users/me/mainnet/validator/keys:/Users/me/mainnet/validator/passwords \
--initial-state=http://other-node:5051/eth/v2/debug/beacon/states/finalized
```

:::

<!--links-->
Expand Down
3 changes: 2 additions & 1 deletion docs/get-started/manage-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ The node uses more RAM to perform better if it’s available, especially during

## Manage the heap dump

If an out of memory error occurs, the heap dump file is placed in the directory that Teku runs from. The heap dump file is potentially large (1-2GB), to specify the directory to place the file, set the `-XX:HeapDumpPath` Java option to the required path.
If an out of memory error occurs, the heap dump file is placed in the directory that Teku runs from.
The heap dump file is potentially large (1-2 GB), to specify the directory to place the file, set the `-XX:HeapDumpPath` Java option to the required path.

Check warning on line 44 in docs/get-started/manage-memory.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Microsoft.Adverbs] Remove 'potentially' if it's not important to the meaning of the statement. Raw Output: {"message": "[Microsoft.Adverbs] Remove 'potentially' if it's not important to the meaning of the statement.", "location": {"path": "docs/get-started/manage-memory.md", "range": {"start": {"line": 44, "column": 23}}}, "severity": "WARNING"}

<Tabs>
<TabItem value="Environment variable" label="Environment variable" default>
Expand Down
23 changes: 14 additions & 9 deletions docs/get-started/start-teku.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ Don't pass the validator keys as a command line option to both the beacon node a

:::

By default, [validator clients] can connect to the beacon node at `http://127.0.0.1:5051`. Use the [`--rest-api-interface`](../reference/cli/index.md#rest-api-interface) and [`--rest-api-port`](../reference/cli/index.md#rest-api-port) options to update the address.
By default, [validator clients] can connect to the beacon node at `http://127.0.0.1:5051`.
Use the [`--rest-api-interface`](../reference/cli/index.md#rest-api-interface) and [`--rest-api-port`](../reference/cli/index.md#rest-api-port) options to update the address.

You can specify [`--rest-api-host-allowlist`](../reference/cli/index.md#rest-api-host-allowlist) to allow access to the REST API from specific hostnames.

### Start the validator

To run a validator, connect to a [running beacon node].

Use the [`validator-client`](../reference/cli/subcommands/validator-client.md#validator-client-vc) or [`vc`](../reference/cli/subcommands/validator-client.md#validator-client-vc) subcommand to run a Teku as a validator.
Use the [`validator-client`](../reference/cli/subcommands/validator-client.md#validator-client-vc) or
[`vc`](../reference/cli/subcommands/validator-client.md#validator-client-vc) subcommand to run a Teku as a validator.

```title="Example"
teku validator-client \
Expand Down Expand Up @@ -125,31 +127,34 @@ Content-Length: 0
</TabItem>
</Tabs>

## Exit Codes
## Exit codes

**Exit Code 1**
### Exit code 1

Check warning on line 132 in docs/get-started/start-teku.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Consensys.Headings] 'Exit code 1' should use sentence-style capitalization. Raw Output: {"message": "[Consensys.Headings] 'Exit code 1' should use sentence-style capitalization.", "location": {"path": "docs/get-started/start-teku.md", "range": {"start": {"line": 132, "column": 5}}}, "severity": "WARNING"}

This code indicates a scenario where Teku has exited with a fatal error; however, restarting Teku without changes is a logical step in correcting it. This code represents the error is related to something external to Teku.
This code indicates a scenario where Teku has exited with a fatal error; however, restarting Teku without changes is a logical step in correcting it.
This code represents the error is related to something external to Teku.

Example: If the beacon chain controller has issues starting P2P services on a particular port, the system will exit with a fatal error code of 1. This could correct itself with a restart.

Example 2: If the migrate database command does not successfully migrate the database, Teku will exit with a code 1 fatal error. Restarting the system could correct this.

**Exit Code 2**
### Exit code 2

Check warning on line 141 in docs/get-started/start-teku.md

View workflow job for this annotation

GitHub Actions / Spelling

[vale] reported by reviewdog 🐶 [Consensys.Headings] 'Exit code 2' should use sentence-style capitalization. Raw Output: {"message": "[Consensys.Headings] 'Exit code 2' should use sentence-style capitalization.", "location": {"path": "docs/get-started/start-teku.md", "range": {"start": {"line": 141, "column": 5}}}, "severity": "WARNING"}

This code indicates a scenario where Teku has exited with a fatal error. Restarting Teku will not correct this.

Note that most user configuration errors fall into this category.

Example: If you specify an invalid database version in the migrate database command, Teku will exit with a code 2 fatal error. To correct this, make the appropriate changes to the setup and then restart Teku.
Example: If you specify an invalid database version in the migrate database command, Teku will exit with a code 2 fatal error.
To correct this, make the appropriate changes to the setup and then restart Teku.

**Usages**
### Usages

The exit codes for Teku are important to understand so that you know how to approach a restart and mitigate the issue.

The **service unit configuration** file is an example of how status codes can be used. `RestartPreventExitStatus=` and `RestartForceExitStatus=` can be used to automatically restart Teku or stop it in case of failure.

Check failure on line 154 in docs/get-started/start-teku.md

View workflow job for this annotation

GitHub Actions / Lint

Line length

docs/get-started/start-teku.md:154:201 MD013/line-length Line length [Expected: 200; Actual: 217] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md013.md

[systemd.service](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html) File Example
The following is an example of a [`systemd.service`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html) file:

```

Check failure on line 158 in docs/get-started/start-teku.md

View workflow job for this annotation

GitHub Actions / Lint

Fenced code blocks should have a language specified

docs/get-started/start-teku.md:158 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md040.md
RestartForceExitStatus=1
RestartPreventExitStatus=2
Expand Down

0 comments on commit 4d50949

Please sign in to comment.